summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* * strace.c (handle_stopped_tcbs): Fix cast for 4th argument passed to ptrace().obsolete/HEADDmitry V. Levin2009-06-012-2/+5
|
* * bjm.c (sys_query_module): Fix format warning reported byDmitry V. Levin2009-06-015-4/+11
| | | | | | | gcc -Wformat-security. * file.c (tprint_open_modes): Likewise. * process.c (printargv): Likewise. * signal.c (printsignal): Likewise.
* Clean up header checksDmitry V. Levin2009-06-013-4/+44
| | | | | | | | | | * configure.ac: Reformat AC_CHECK_HEADERS to keep it sorted and easily updated, and reduce merging errors in the future. * system.c: Convert all non-standard #ifdef checks for specific headers to regular #ifdef HAVE_*_H checks. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* fix thinko in ChangeLogDenys Vlasenko2009-04-201-1/+1
|
* * strace.c (printstatsol, printstat_sparc64):Denys Vlasenko2009-04-202-42/+37
| | | | | | | Remove NULL and error check for addr parameter. (printoldstat, printstat, printoldstat64): Move NULL and error check for addr parameter so that it happens before printstatsol/printstat_sparc64 calls.
* * strace.c (collect_stopped_tcbs): Do not enable/disable signalsDenys Vlasenko2009-04-202-5/+14
| | | | multiple times, do it just once per collecting pass.
* * file.c (print_dirfd): Use int for file descriptor, not a long.Denys Vlasenko2009-04-163-11/+22
| | | | * process.c (printwaitn): Use int for PID, not a long.
* * signal (sys_rt_sigtimedwait): Fix sigtimedwait syscall decoding.Denys Vlasenko2009-04-152-7/+22
|
* * signal (sys_rt_sigaction): Print struct sigaction correctlyDenys Vlasenko2009-04-153-58/+114
| | | | | | in 32/64 environment. * desc.c (printflock): Add #ifdefs around earlier flock 32/64 fix so that we don't waste time on arches with one personality.
* * signal.c: Whitespace, comment, and style fixes, no code changes.Denys Vlasenko2009-04-146-720/+574
| | | | | | | * file.c: Ditto. * time.c: Ditto. * process.c: Ditto. * resource.c: Ditto.
* * system.c (sram_alloc_flag): Add L2_SRAM constant.Denys Vlasenko2009-03-233-9/+15
| | | | | | | | by Mike Frysinger (vapier AT gentoo.org). (sys_sram_alloc): Fix improperly used %zu: tcp->u_arg is not a size_t, it is a long. * net.c (printcmsghdr): Fix improperly used %zu: struct cmsghdr::cmsg_len is not a size_t.
* Update Changelog to more accurately describe the changes.Denys Vlasenko2009-03-201-2/+3
|
* As it turned out, "if (interrupted) break;" is needed in both loops,Denys Vlasenko2009-03-201-0/+2
| | | | | | | in "collect tasks" loop and in enclosing "collect/process" loop. Before this patch, "strace cat" + "killall -INT strace" wasn't making strace stop and exit. This patch restores 4.5.18 behavior in this regard.
* Remove "better attach to SIGSTOP", it is not correct...Denys Vlasenko2009-03-172-25/+9
| | | | (^C fix remains).
* * strace.c (startup_attach): Take care to correctly attachDenys Vlasenko2009-03-172-13/+33
| | | | | | to stopped processes by resending SIGSTOP. (collect_stopped_tcbs): Check for ^C here, not in trace(). (trace): Remove check for ^C.
* Decode fcntl's F_{GET,SET}LEASE, F_NOTIFY, and F_DUPFD_CLOEXEC.Denys Vlasenko2009-03-105-55/+147
| | | | | | | | | | | | | | | | | By Mike Frysinger (vapier AT gentoo.org) * desc.c: Add F_SETLEASE, F_GETLEASE, F_NOTIFY, F_DUPFD_CLOEXEC to fcntlcmds[]. Create notifyflags[] array. (sys_fcntl): Handle new flags. Optimize printing of open modes. * defs.h: Declare sprint_open_modes(), remove unused parameter in tprint_open_modes(). * desc.c (sprint_open_modes): Move fuction definition from here... * file.c (sprint_open_modes): To here. (tprint_open_modes): Use sprint_open_modes(), it already generates needed string. * ipc.c: Remove unused parameter from calls to tprint_open_modes().
* defs.h: cosmetics (wrap overlong line)Denys Vlasenko2009-03-061-1/+4
|
* AVR32 support by Hans-Christian EgtvedtDenys Vlasenko2009-02-2716-111/+549
| | | | | | | | | | | | | (hans-christian.egtvedt AT atmel.com). * configure.ac: Make it recognize avr32. * defs.h: Define LINUX_AVR32. * linux/avr32/syscallent.h: New file. * Makefile.am: Reference linux/avr32/syscallent.h. * proc.c (change_syscall, setarg): Add support for avr32. (struct xlat struct_user_offsets[]): Ditto. * syscall.c (get_scno): Ditto. (get_error, force_result, syscall_enter): Ditto. * util.c (getpc, printcall): Ditto.
* CRIS support by Hinko Kocevar (hinko.kocevar AT cetrtapot.si)Denys Vlasenko2009-02-256-167/+283
| | | | | | | | | | | | | | * configure.ac: Make it recognize cris. * process.c: Define ARG_xxx constants for cris. (change_syscall): Add support for cris. (struct_user_offsets): Add cris-specific data. * signal.c (sys_sigreturn): Add support for cris. * syscall.c (get_scno): Add support for cris. (syscall_fixup): Add support for cris. (get_error): Add support for cris. (syscall_enter): Add support for cris. (force_result): While at it, fix cpp directives indentation. * util.c (printcall): Add support for cris.
* By Hans-Christian Egtvedt (hans-christian.egtvedt AT atmel.com):Denys Vlasenko2009-02-2513-124/+178
| | | | | | | strace.c: suppress "warning: unused static" message by adding #ifdef's around a variable .gitignore: trivial test/*.c: cleanup (suppress warnings, much better style).
* Replace many more bare ptrace calls with calls to wrappersDenys Vlasenko2009-02-247-298/+287
| | | | | | | | | | | | | | | | | | | | | which do proper error-checking and set tcp->ptrace_errno. In some cases, missing error checking is added. Error handling for trace_syscall() failures and other cases where tcp->ptrace_errno is nonzero is cleaned up a bit and made more verbose if we see error other than ESRC. Some comments are added or expanded. * defs.h: Declare ptrace_cmds[]. Modify do_ptrace declaration (last parameter is long, not void *). * process.c: Make ptrace_cmds[] non-static. (change_syscall): Use do_ptrace() instead of bare ptrace(). * signal.c: Use do_ptrace() instead of bare ptrace(). * strace.c: Update trace_syscall() failure handling. * syscall.c: Use do_ptrace() instead of bare ptrace(). * util.c: Use do_ptrace() instead of bare ptrace(). Update do_ptrace() wrapper. (str_PTRACE_xxx): New function - helper returning "PTRACE_xxx". (do_ptrace_peekdata): New function - wrapper for PTRACE_PEEKDATA (do_ptrace5): New function - wrapper for 5-argument ptrace calls.
* * process.c: Indent preprocessor directives so that nestingDenys Vlasenko2009-02-242-179/+176
| | | | can be figured out. Add PTRACE_SET_SYSCALL to ptrace_cmds[].
* linux/ioctlent.sh: update by Mike Frysinger (now collects enums too)Denys Vlasenko2009-02-231-11/+73
|
* More cleanups from Mike Frysingler:Denys Vlasenko2009-02-235-3297/+23
| | | | | | | README: update an URL .gitignore: added config.guess config.sub install-sh: removed, they are revenerated by autoconf anyway
* HACKING-scripts: new doc file by Mike FrysingerDenys Vlasenko2009-02-231-0/+58
|
* s/sort | uniq/sort -u/Denys Vlasenko2009-02-221-1/+1
|
* Further signalent.h cleanup.Denys Vlasenko2009-02-205-103/+14
| | | | | | | | | | * linux/ia64/signalent.h: Remove, it is identical to common signalent.h sans "SIGRTnn" definitions which are redundant. * linux/powerpc/signalent.h: Remove, it is identical to common signalent.h sans outdated "SIGUNUSED" which should be "SIGSYS". * linux/s390/signalent.h: Ditto. * linux/s390x/signalent.h: Ditto. * Makefile.am: Remove references to the above files.
* Patch by Mike Frysinger (vapier AT gentoo.org).Denys Vlasenko2009-02-202-1/+11
| | | | | * linux/ioctlent.sh: Update sed machinery to parse _IOC() macros with two constants.
* Patch by Mike Frysinger (vapier AT gentoo.org).Denys Vlasenko2009-02-203-34/+7
| | | | | * Makefile.am: Remove reference to linux/sh/signalent.h. * linux/sh/signalent.h: Remove, it is identical to common signalent.h.
* fix accidental damage to ChangeLogDenys Vlasenko2009-02-201-0/+1
|
* Patch by Mike Frysinger (vapier AT gentoo.org).Denys Vlasenko2009-02-204-534/+15
| | | | | | * linux/errnoent.h: Make ERRNO_58 show EDEADLOCK for POWERPC. * Makefile.am: Remove reference to linux/powerpc/errnoent.h. * linux/powerpc/errnoent.h: Remove, we can use common errnoent.h now.
* Patch by Mike Frysinger (vapier AT gentoo.org).Denys Vlasenko2009-02-206-922/+15
| | | | | | | | | | Removing redundant errnoent.h files. * Makefile.am: Remove references to linux/ia64/errnoent.h, linux/s390/errnoent.h, linux/s390x/errnoent.h and linux/sh/errnoent.h. * linux/ia64/errnoent.h: Remove, this arch uses common errnoent.h. * linux/s390/errnoent.h: Ditto. * linux/s390x/errnoent.h: Ditto. * linux/sh/errnoent.h: Ditto.
* test/sigkill_rain.c: a testcase with lots of async deathsDenys Vlasenko2009-02-131-0/+62
|
* .Roland McGrath2009-02-111-0/+7
|
* 2009-02-10 Roland McGrath <roland@redhat.com>Roland McGrath2009-02-112-2/+3
| | | | | | | * configure.ac: Check for struct sigcontext. * signal.c [LINUX] [M68K] (struct sigcontext): Don't define it if [HAVE_STRUCT_SIGCONTEXT]. From Muttley Meen <muttley.meen@gmail.com>.
* Cleanup after tcb table expansion simplification.Denys Vlasenko2009-02-105-45/+35
| | | | | | | | | | There was code which was trying to continue tracing even if table expansion fails. Now we treat it as fatal failure, so this code is removed by this change. * defs.h: Delete TCB_FOLLOWFORK constant. * process.c: Delete fork_tcb() and all calls of it. * strace.c (startup_attach): Remove usage of TCB_FOLLOWFORK. * syscall.c: Indent preprocessor directives.
* * defs.h: Correct the comment about TCB_SUSPENDED.Denys Vlasenko2009-02-094-244/+259
| | | | | | | | * strace.c: Fix misplaced #endif. * util.c: Indent preprocessor directives, mark code parts which can never be reached by compilation because of the combination of #if directives. These are likely dead code, I want to remove them later.
* * strace.c (newoutf): Prevent -o FILENAME overflowing the stack.Denys Vlasenko2009-01-292-37/+44
| | | | | | | | (startup_attach): Fix wrong pid in "Process <PID> attached". (handle_group_exit): Do not consider exit to be spurious if tcb has TCB_STARTUP bit set - we can attach to the task right before its death, it can legitimately happen. (handle_stopped_tcbs): Ditto.
* * process.c (internal_clone): Check and complain if pid valueDenys Vlasenko2009-01-283-23/+48
| | | | | | | | looks insane. * strace.c (alloc_tcb): Clear *all* fields in reused tcb. (main): Query and remember uname() info on startup. (handle_stopped_tcbs): Do not use PTRACE_SETOPTIONS on Linux < 2.6.29. (printleader): Correct printing of "<unavailable>" markers.
* * strace.c (collect_stopped_tcbs): Guard against the case whenDenys Vlasenko2009-01-272-5/+63
| | | | | waitpid() reports the same task multiple times. Run tested.
* * process.c (printwaitn): Add comment about wait4() pid expansion.Denys Vlasenko2009-01-264-16/+26
| | | | | | | Use #ifdef ALPHA instead of LINUX_64BIT, it was misleading (by implying "any 64-bit platform"). * defs.h: Remove now-unused LINUX_64BIT define. * resource.c (sys_osf_getrusage): Fix indentation.
* fix fallout from recent tcb table expansion error handling changeDenys Vlasenko2009-01-262-2/+10
|
* syscall.c (get_scno): Fix warnings about unused 'pid' variableDenys Vlasenko2009-01-232-14/+15
|
* By Michal Nowak <mnowak@redhat.com>:Denys Vlasenko2009-01-232-3/+8
| | | | | | * mem.c (print_ldt_entry): Fix warning: Format '%#08lx' expects type 'long unsigned int', but argument 2 was type 'unsigned int'.
* * strace.c (collect_stopped_tcbs): Do not return NULL when ECHILDDenys Vlasenko2009-01-212-12/+16
| | | | | is detected, return collected list instead. Fixes symptom when the last "+++ killed by SIGxxx +++" is not printed.
* Two cleanups: tcb table expansion failure is not really a survivableDenys Vlasenko2009-01-175-80/+62
| | | | | | | | | | | | | | | | | | | | | event, we do not have any viable way to continue. No wonder most places where that is detected have FIXMEs. It's way simpler to treat as fatal failure, and handle it inside tcb table expansion finctions. Second cleanup: tidy up haphazard locations of a few externs. * defs.h: Change return type of expand_tcbtab() to void. Declare change_syscall(). * process.c: Change all callsites of alloctcb(), alloc_tcb() and fork_tcb(), removing now-redundant error checks. (fork_tcb): Change return type to void - it can't fail now. * strace.c: Move extern declarations out of function bodies. Change all callsites of alloctcb(), alloc_tcb() and fork_tcb(), removing now-redundant error checks. (expand_tcbtab): Change return type to void - it can't fail now. On failure to expand, print a message, clean up, and exit. (alloc_tcb): On failure to expand, print a message, clean up, and exit. * util.c (setbpt): Remove extern declaration from function body.
* * defs.h: Update a comment. No code changes.Denys Vlasenko2009-01-174-8/+52
| | | | | | | | | * strace.c (handle_stopped_tcbs): Discard all execve stops and clear TCB_WAITEXECVE bit. * syscall.c (get_scno): Add the code to not mistakenly treat ptrace stop as execve stop (execve stops can be blocked by traced program). Fixes RH#477775 "strace hangs if the target process blocks SIGTRAP".
* * process.c: Add a comment. No code changes.Denys Vlasenko2009-01-173-17/+40
| | | | | | | | | | | * strace.c (collect_stopped_tcbs): Stop reversing list of stopped tcp's. I'm not totally convinced it is crucial, but this is surely fits the concept of "least surprise". Do not collect TCB_SUSPENDED tcp's (this is closer to how it was before). (handle_stopped_tcbs): Remove the code to reject TCB_SUSPENDED tcp's, it's done earlier now. In an unobvious way, this was causing SIGSTOPs from freshly attached children to be misinterpreted.
* * linux/bfin/syscallent.h: sys_futex has 6 parameters, not 5.Denys Vlasenko2009-01-142-1/+5
|
* Fixes for ptrace() argument parsing.Denys Vlasenko2009-01-139-19/+109
| | | | | | | | | | | | | | * process.c: Add parsing of PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO. * strace.c (handle_stopped_tcbs): Make PTRACE_SETOPTIONS define check more robust. * defs.h: Declare several "extern const struct xlat" arrays here. * desc.c: Remove open_mode_flags[] and open_access_modes[] extern declarations. * net.c: Remove open_mode_flags[] extern declaration. * sock.c: Remove addrfams[] extern declaration. * util.c: Remove struct_user_offsets[] extern declaration. * signal.c: Remove open_mode_flags[] extern declaration.