2009-07-08 Dmitry V. Levin
Clean up spacing to fix warnings reported by git diff --check.
* ChangeLog: Fix spaces before tab in indent.
* bjm.c: Likewise.
* debian/changelog: Likewise.
* strace-graph: Likewise.
* syscall.c: Likewise.
* INSTALL: Fix trailing blank lines.
* README-linux: Likewise.
* README-svr4: Likewise.
* linux/sparc/gen.pl: Likewise.
* linux/sparc/syscall1.h: Likewise.
* linux/sparc64/syscall1.h: Likewise.
* linux/x86_64/gentab.pl: Likewise.
* sunos4/syscall.h: Likewise.
* test/Makefile: Likewise.
* debian/rules: Fix trailing whitespaces.
* desc.c: Likewise.
* svr4/syscallent.h: Likewise.
* test/childthread.c: Likewise.
* test/leaderkill.c: Likewise.
2009-07-07 Dmitry V. Levin
* .cvsignore: Remove.
* README-CVS: Rename to README-hacking.
* Makefile.am (EXTRA_DIST): Remove README-CVS.
2009-06-01 Dmitry V. Levin
* bjm.c (sys_query_module): Fix format warning reported by
gcc -Wformat-security.
* file.c (tprint_open_modes): Likewise.
* process.c (printargv): Likewise.
* signal.c (printsignal): Likewise.
Clean up header checks.
* 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
2009-04-20 Denys Vlasenko
* file.c (printstatsol, printstat_sparc64):
Remove NULL/error check for addr parameter.
(printoldstat, printstat, printoldstat64):
Move NULL/error check for addr parameter
so that it happens before printstatsol/printstat_sparc64 calls.
2009-04-16 Denys Vlasenko
* file.c (print_dirfd): Use int for file descriptor, not a long.
* process.c (printwaitn): Use int for PID, not a long.
2009-04-15 Denys Vlasenko
* signal (sys_rt_sigtimedwait): Fix sigtimedwait syscall decoding.
2009-04-15 Denys Vlasenko
* signal (sys_rt_sigaction): Print struct sigaction correctly
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.
2009-04-14 Denys Vlasenko
* signal.c: Whitespace, comment, and style fixes, no code changes.
* file.c: Ditto.
* time.c: Ditto.
* process.c: Ditto.
* resource.c: Ditto.
2009-03-23 Denys Vlasenko
* system.c (sram_alloc_flag): Add L2_SRAM constant.
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.
2009-03-10 Denys Vlasenko
Decode fcntl's F_{GET,SET}LEASE, F_NOTIFY, and F_DUPFD_CLOEXEC.
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().
2009-02-27 Denys Vlasenko
AVR32 support by Hans-Christian Egtvedt
(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.
2009-02-25 Denys Vlasenko
CRIS support by Hinko Kocevar (hinko.kocevar AT cetrtapot.si)
* 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.
2009-02-24 Denys Vlasenko
* process.c: Indent preprocessor directives so that nesting
can be figured out. Add PTRACE_SET_SYSCALL to ptrace_cmds[].
* ioctlent.sh: Improved by Mike Frysinger.
* HACKING-scripts: New file by Mike Frysinger.
2009-02-20 Denys Vlasenko
Further signalent.h cleanup.
* 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.
2009-02-20 Denys Vlasenko
Patch by Mike Frysinger (vapier AT gentoo.org).
* linux/ioctlent.sh: Update sed machinery to parse _IOC() macros
with two constants.
2009-02-20 Denys Vlasenko
Patch by Mike Frysinger (vapier AT gentoo.org).
* Makefile.am: Remove reference to linux/sh/signalent.h.
* linux/sh/signalent.h: Remove, it is identical to common signalent.h.
2009-02-20 Denys Vlasenko
Patch by Mike Frysinger (vapier AT gentoo.org).
* 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.
2009-02-20 Denys Vlasenko
Patch by Mike Frysinger (vapier AT gentoo.org).
Removing redundant errnoent.h files.
* Makefile.am: Remove reference 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.
2009-02-10 Roland McGrath
* configure.ac: Check for struct sigcontext.
* signal.c [LINUX] [M68K] (struct sigcontext): Don't define it if
[HAVE_STRUCT_SIGCONTEXT].
From Muttley Meen .
2009-02-09 Denys Vlasenko
* defs.h: Correct the comment about TCB_SUSPENDED.
* 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.
2009-01-29 Denys Vlasenko
* strace.c (newoutf): Prevent -o FILENAME overflowing the stack.
(startup_attach): Fix wrong pid in "Process 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.
2009-01-26 Denys Vlasenko
* process.c (printwaitn): Add comment about wait4() pid expansion.
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.
2009-01-26 Denys Vlasenko
* process.c (internal_clone): Fix fallout from tcb table expansion
simplification. Due to overlooked else, I forgot to group
fork_tcb(tcp) and alloctcb(pid) in a block.
2009-01-23 Michal Nowak
* syscall.c (get_scno): Fix warnings about unused variable 'pid'.
2009-01-23 Michal Nowak
* mem.c (print_ldt_entry): Fix warning:
Format '%#08lx' expects type 'long unsigned int', but
argument 2 was type 'unsigned int'.
2009-01-17 Denys Vlasenko
Two cleanups: tcb table expansion failure is not really a survivable
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.
2009-01-14 Denys Vlasenko
* linux/bfin/syscallent.h: sys_futex has 6 parameters, not 5.
2009-01-13 Denys Vlasenko
Fixes for ptrace() argument parsing.
* process.c: Add parsing of PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG,
PTRACE_GETSIGINFO, PTRACE_SETSIGINFO.
* 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.
2009-01-06 Denys Vlasenko
Output format fixes, improving the situation after recent
change which added beeter handling of processes suddenly
disappearing. Now we often do not finish last line
before exiting in those cases.
The only change affecting something other than output
is change in umovestr where we were calling
abort() on ptrace error.
* strace.c (trace): If trace_syscall() failed with ESRCH,
finish current output line with " ".
(mp_ioctl): While we are at it, fix gross style mismatch
in this function definition. No code chages.
* syscall.c (trace_syscall): If decode fails on syscall exit,
finish current output line with "= ? ".
* util.c (umoven): Do not complain if error is ESRCH.
(umovestr): Do not complain and do not abort() if error is ESRCH.
* defs.h: Remove unused tcp parameter from printtrailer().
* process.c: Adjust printtrailer() calls accordingly.
* strace.c: Adjust printtrailer() calls accordingly.
* syscall.c: Adjust printtrailer() calls accordingly.
2009-01-06 Denys Vlasenko
* desc.c (printflock): Fix display of fcntl(F_SETLK) on
non-native 32-bit architecture.
Fixes RH#471169 "format fcntl64() system calls for
32 bit application incorrect".
* desc.c: const'ify two static struct xlat vector[]'s,
convert all remaining old style C parameter declarations
in this file.
2008-11-13 Kirill A. Shutemov
* linux/arm/syscallent.h: Update syscalls.
Based on patch by Enrico Scholz.
* linux/arm/syscallent.h: Fix build on ARM EABI which does not
provide syscalls socketcall and ipc.
2009-01-01 Andreas Schwab
* net.c (sys_accept): Properly decode third argument as pointer to
int.
2008-12-30 Denys Vlasenko
Experimental support for -D option.
Unlike normal case, with -D *grandparent* process exec's,
becoming a traced process. Child exits (this prevents traced process
from having children it doesn't expect to have), and grandchild
attaches to grandparent similarly to strace -p PID.
This allows for more transparent interaction in cases
when process and its parent are communicating via signals,
wait() etc. Without -D, strace process gets lodged in between,
disrupting parent<->child link.
* strace.c: Add global flag variable daemonized_tracer for -D option.
(startup_attach): If -D, fork and block parent in pause().
In this case we are already a child, we in fact created a grandchild.
After attaching to grandparent, grandchild SIGKILLs parent.
(startup_child): If -D, parent blocks in wait(), then
execs the program to strace. Normally (w/o -D), it is child
who execs the program.
(main): Detect -D option, call startup_attach() if it is given.
2008-12-30 Kirill A. Shutemov
Fix some warnings on ARM build.
* defs.h: include on arm too.
* syscall.c: EABI arm does not need decode_subcall(),
ifdef it out.
2008-12-29 Nick Black
* linux/syscallent.h: Mark sendfile(2) as network syscall.
* linux/*/syscallent.h: Same, for all architectures.
2008-12-17 Denys Vlasenko
Make strace detect when traced process suddenly disappeared
(prime example is randomly arriving SIGKILL).
* defs.h (do_ptrace, ptrace_restart): Declare new functions
* process.c: Use ptrace_restart instead of bare ptrace.
This catches and records ESRCH errors.
Print "" if syscall decode or result can't be
determined because of an earlier error in ptrace()
* syscall.c (trace_syscall): Stop indiscriminately bailing out
on errors, print "syscall(????" or even "????(????" but continue.
* util.c (do_ptrace, ptrace_restart): Define new functions.
(upeek): use do_ptrace in order to catch and record ESRCH.
Do not print error message in this case.
Fixes RH#472053.
2008-12-17 Denys Vlasenko
* signal.c (sys_sigaction, sys_rt_sigaction): Fix typo
in (sa_handler == SIG_IGN) comparison, it was using SIG_DFL
instead.
2008-12-16 Denys Vlasenko
* defs.h: Modify declaration of upeek to take struct tcb *
parameter instead of pid_t.
* process.c: Change all upeek calls accordingly.
* signal.c: Likewise.
* strace.c: Likewise.
* syscall.c: Likewise.
* util.c: Likewise.
2008-11-11 Dmitry V. Levin
* sock.c [LINUX] (sock_ioctl): Parse more SIOCS* ioctls.
2008-12-09 Roland McGrath
* strace.1 (DIAGNOSTICS): New section, describe exit behavior.
2008-11-09 Dmitry V. Levin
* process.c (prctl_options): Update constants from linux 2.6.27.
* system.c (capabilities): Add more capability values.
* util.c (string_quote): Fix support for NUL-terminated string.
Add comments.
(printpathn): Fix the case when "..." was appended to the output
but no truncation was actually made. Add comments.
(printstr): Fix memory allocation. Fix two cases when "..." was
appended to the output but no truncation was actually made.
Add comments.
Fixes RH#470529.
2008-10-23 Dmitry V. Levin
Implement parsers for new linux syscalls.
* desc.c (do_dup2, [LINUX] sys_dup3): New functions.
(sys_dup2): Use do_dup2.
[LINUX] (sys_epoll_create1): New function.
[LINUX] (do_eventfd, sys_eventfd2): New functions.
[LINUX] (sys_eventfd): Use do_eventfd.
* net.c (do_pipe, [LINUX] sys_pipe2): New functions.
(sys_pipe): Use do_pipe.
* signal.c [LINUX] (do_signalfd, sys_signalfd4): New functions.
[LINUX] (sys_signalfd): Use do_signalfd.
* linux/syscall.h: Declare new sys_* functions.
* linux/syscallent.h: Hook up signalfd4, eventfd2, epoll_create1,
dup3, pipe2, inotify_init1.
* linux/x86_64/syscallent.h: Hook up paccept, signalfd4, eventfd2,
epoll_create1, dup3, pipe2, inotify_init1.
2008-10-23 Mike Frysinger
Port strace to the Blackfin architecture.
* configure.ac: Add bfin to supported architectures.
* process.c: Skip u_fpvalid/u_fpstate for Blackfin architecture.
(change_syscall): Support Blackfin architecture.
* syscall.c: Declare r0 for Blackfin architecture.
(get_scno): Decode Blackfin syscall number.
(syscall_fixup): Extract Blackfin return value.
(get_error): Decode Blackfin return value.
(force_result): Poke Blackfin return value.
(syscall_enter): Extract Blackfin syscall arguments.
* defs.h: Define TCB_WAITEXECVE for Blackfin architecture.
* linux/syscall.h (sys_sram_alloc): Declare for Blackfin
architecture.
* system.c (sys_sram_alloc): Decode Blackfin sram_alloc() syscall.
* util.c (getpc): Handle PC on Blackfin architecture.
(printcall): Likewise.
* linux/bfin/ioctlent.h, linux/bfin/syscallent.h: New Blackfin
headers.
* Makefile.am (EXTRA_DIST): Add linux/bfin/ioctlent.h and
linux/bfin/syscallent.h.
2008-09-18 Mike Frysinger
* configure.ac: Accept uclinux hosts as linux.
2008-10-22 Dmitry V. Levin
Handle socket type flags introduced in linux 2.6.27.
* net.c (socktypes): Add SOCK_DCCP.
(sock_type_flags): New xlat structure.
(tprint_sock_type): New function.
(sys_socket, sys_socketpair): Use it to parse socket type and
socket type flags.
2008-09-29 Dmitry V. Levin
* strace.c (startup_child): Save child pid for future use.
(main): Exit/kill ourself with straced child's exitcode/signal.
(trace): If signalled process pid matches the saved child pid,
save the signal number. If terminated process pid matches the
saved child pid, save its exit status.
Patch from Denys Vlasenko
Fixes RH#105371.
2008-09-12 Tomas Pospisek
Jan Kratochvil
* strace.1 (DESCRIPTION): New description of unfinished system calls
and system calls restarting.
2008-09-03 Dmitry V. Levin
* desc.c (sys_fcntl): Do not initialize auxstr for failed syscall.
* process.c (sys_fork, sys_rfork) [USE_PROCFS]: Likewise.
* signal.c (sys_signal): Likewise.
* stream.c (internal_stream_ioctl): Likewise.
* time.c (sys_adjtimex): Likewise.
* syscall.c (trace_syscall): If RVAL_STR is set, then
print auxstr for failed syscall as well.
* syscall.c (is_restart_error): New function.
* defs.h (is_restart_error): Declare it.
* linux/dummy.h (sys_nanosleep): Uncouple from sys_adjtime().
* time.c (sys_nanosleep): New function, based on is_restart_error().
* process.c (sys_prctl): Decode PR_SET_PDEATHSIG, PR_GET_PDEATHSIG,
PR_SET_DUMPABLE, PR_GET_DUMPABLE, PR_SET_KEEPCAPS, PR_GET_KEEPCAPS.
Fix PR_GET_UNALIGN decoder.
(prctl_options): Add more constants.
* linux/syscallent.h: Use sys_prctl() decoder for "prctl" syscall.
* linux/alpha/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
2008-09-02 Dmitry V. Levin
* linux/x86_64/syscallent.h: Fix syscall numbers for "tee" and
"sync_file_range".
From Fernando Luis Vazquez Cao
2008-08-28 Roland McGrath
* strace.1 (BUGS): New section, mention SIGTRAP interference.
* strace.spec (%ifarch %{strace64_arches}): Use cp -p instead of ln
for %{rhel} < 6.
* configure.ac, NEWS: Version 4.5.18.
* strace.spec: 4.5.18-1.
2008-08-24 Roland McGrath
* linux/syscall.h (SYS_socket_subcall et al, SYS_ipc_subcall et al):
Don't define these if [__ARM_EABI__].
Reported by Johannes Stezenbach .
* syscall.c (trace_syscall): Conditionalize on [SYS_socket_subcall]
and [SYS_ipc_subcall] individually.
* linux/powerpc/syscallent.h: Handle subpage_prot.
* mem.c [LINUX && POWERPC] (sys_subpage_prot): New function.
* linux/syscall.h [POWERPC]: Declare it.
From Simon Murray .
* mem.c (mmap_prot): Handle PROT_SAO.
From Simon Murray .
* mem.c (madvise_flags): Typo fixes. Rename to madvise_cmds.
(sys_madvise): Use printxval, not printflags.
Reported by Rajeev V. Pillai .
2008-08-19 Roland McGrath
* signal.c (sys_sigaction, sys_rt_sigaction): Don't omit the rest of
the struct after sa_handler is a known constant. Some sa_flags bits
have meaning even for SIG_IGN/SIG_DFL.
2008-08-06 Jan Kratochvil
* util.c (CLONE_VM): Define if not defined already.
(setbpt): Clear CLONE_VM in the case we already clear CLONE_VFORK for
SYS_clone and SYS_clone2.
Reported by Michal Nowak.
Fixes RH#455078.
2008-08-06 Jan Kratochvil
Fix compiler warnings.
* signal.c (sys_signal): Cast to SIG_* to the matching type LONG.
* strace.c (trace): Variables PSR and PC are now signed.
* syscall.c (syscall_enter): Variable RBS_END is now signed long.
Remove/add the RBS_END casts appropriately.
* util.c [IA64] (arg_setup): Variable BSP is now signed long.
Remove/add the BSP casts appropriately.
: Initialize *STATE.
2008-07-31 Roland McGrath
* Makefile.am (EXTRA_DIST): Add new linux/arm/ files.
* file.c [LINUX] (struct kernel_dirent): Define it locally,
do not use .
Fixes RH#457291.
* configure.ac: Add AC_HEADER_STDBOOL.
* defs.h [HAVE_STDBOOL_H]: #include .
Fixes Debian#492774.
2008-07-24 Dmitry V. Levin
* strace.c (main): Fix -F option backwards compatibility.
2008-07-22 Roland McGrath
* Makefile.am (EXTRA_DIST): Add new debian/ files.
2008-07-21 Roland McGrath
* configure.ac: Version 4.5.17.
* strace.spec: 4.5.17-1.
* defs.h [LINUXSPARC]: Don't #include .
2008-07-19 Frederik Schüler
* debian/control: Add strace64 package.
* debian/rules: Use debhelper flag --same-arch instead of --arch in
order to build strace64 only on the specified architectures.
* debian/strace64.install: New file, list for dh_install.
* debian/strace64.manpages: New file, list for dh_install.
* debian/changelog: Add prereleases entries.
Fixes Debian#491167, Debian#491188.
2008-07-18 Andreas Schwab
* linux/ia64/syscallent.h: Decode mincore syscall.
* linux/powerpc/syscallent.h: Fix argument count for request_key.
* term.c (term_ioctl): Decode indirect parameter as int, not long.
2008-07-17 Roland McGrath
* NEWS, strace.spec: Updates in preparation for release.
* process.c (printwaitn): When current personality's wordsize is
smaller than native, sign-extend the PID argument from 32 bits.
* process.c (futexops): Update table.
(sys_futex): Handle FUTEX_WAIT_BITSET correctly.
From Ulrich Drepper .
Fixes RH#448628.
* linux/syscallent.h: Fix "futex" argument count.
* linux/alpha/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
From Ulrich Drepper .
Fixes RH#448629.
* signal.c (sigact_flags): Prefer SA_NODEFER to SA_NOMASK,
SA_RESETHAND to SA_ONESHOT.
Fixes RH#455821.
2008-07-09 Frederik Schüler
* debian/rules: Remove the broken udeb creation routines, and redo the
complete install procedure using debhelper.
* debian/strace.docs: New file, list for dh_installdocs.
* debian/strace.examples: New file, list for dh_installexamples.
* debian/strace.install: New file, list for dh_install.
* debian/strace-udeb.install: New file, list for dh_install.
* debian/strace.manpages : New file, list for dh_installmanpages.
* debian/copyright: Update.
* debian/control: Fix libc6 build dependency for alpha and ia64.
(strace-udeb: XC-Package-Type): Add header.
* debian/changelog: Cosmetic changes.
2008-07-03 Jan Kratochvil
Trace vfork under -f on all the platforms.
* strace.1 <-f>: Describe Linux catches new children immediately.
<-F>: Make the option obsolete. Move the SunOS VFORK comment to the
`-f' option description.
* defs.h (followvfork): Declaration removed.
* strace.c (followvfork): Variable removed.
(main) <-F>: Merge with the `-f' option.
(trace): Make !FOLLOWVFORK unconditional.
* process.c (internal_fork): Make !FOLLOWVFORK unconditional.
2008-07-01 Frederik Schüler
* debian/changelog: List all bugs closed since the last release.
* debian/control: Remove Wichert Akkerman from uploaders list.
* debian/control: Bump standards version to 3.8.0.
* debian/control: Add Homepage field.
* debian/rules: Fix dpkg-gencontrol call.
* debian/compat: New file, set to compatibility level 5.
* debian/rules: Call dh_clean on clean target.
* debian/rules: Add dh_md5sums call.
Fixes Debian#439428.
2008-06-30 Jan Kratochvil
Fix ia64 `-f' on clone2 formerly crashing the child.
* util.c [IA64] (restore_arg0, restore_arg1): Define as empty.
Fixes RH#453438.
2008-06-27 Jan Kratochvil
* util.c (CLONE_VFORK): Define if not defined already.
(setbpt): Clear CLONE_VFORK for SYS_clone and SYS_clone2.
Reported by Vitaly Mayatskikh.
Fixes RH#455078.
2008-06-29 Dmitry V. Levin
* linux/x86_64/syscallent.h: Remove duplicate syscall entries
for #283 and #284.
2008-06-27 Jan Kratochvil
* linux/syscallent.h: Remove a duplicite syscall stub #326.
2008-05-27 Roland McGrath
* syscall.c [LINUX] (is_negated_errno): New function.
(get_error) [LINUX]: Use it for all such cases.
Fixes RH#447587.
2008-05-19 Roland McGrath
* linux/x86_64/syscallent.h: Update entries for timerfd_* and fallocate.
* file.c (sys_fallocate): New function.
* linux/syscall.h: Declare it.
* linux/syscallent.h: Update entry.
From Kyle McMartin .
* time.c (sys_timerfd_create): New function.
(sys_timerfd_settime, sys_timerfd_gettime): New functions.
* linux/syscall.h: Declare them.
* linux/syscallent.h: Update entries for those syscalls.
From Kyle McMartin .
* debian/rules (binary-arch): Fix chmod/chown typo.
Fixes Debian#459255.
* debian/rules (binary-arch): Install strace-graph in examples/
directory under package doc.
Fixes Debian#469068.
* signal.c (sys_kill): When current personality's wordsize is smaller
than native, sign-extend the PID argument from 32 bits.
Fixes RH#430585.
* configure.ac: Add check for struct sigcontext_struct in .
* signal.c [! HAVE_ASM_SIGCONTEXT_H] [I386] (struct sigcontext_struct):
Conditionalize definition on !HAVE_STRUCT_SIGCONTEXT_STRUCT.
Fixes Debian#456879.
* util.c [LINUX] (setbpt): Use correct SYS_clone number for current
personality.
Fixes RH#447475.
2008-05-08 David S. Miller
* syscall.c (socket_map, sparc_socket_decode): Delete.
(trace_syscall): Use common socketcall and ipc subcall
support on sparc.
* linux/sparc/syscall.h (sys_semtimedop): Declare.
(SYS_socket_subcall, SYS_sub_socket, SYS_sub_bind,
SYS_sub_connect, SYS_sub_listen, SYS_sub_accept,
SYS_sub_getsockname, SYS_sub_getpeername,
SYS_sub_socketpair, SYS_sub_send, SYS_sub_recv,
SYS_sub_sendto, SYS_sub_recvfrom, SYS_sub_shutdown,
SYS_sub_setsockopt, SYS_sub_getsockopt, SYS_sub_sendmsg,
SYS_sub_recvmsg, SYS_socket_nsubcalls, SYS_ipc_subcall,
SYS_sub_semop, SYS_sub_semget, SYS_sub_semctl,
SYS_sub_semtimedop, SYS_sub_msgsnd, SYS_sub_msgrcv,
SYS_sub_msgget, SYS_sub_msgctl, SYS_sub_shmat,
SYS_sub_shmdt, SYS_sub_shmget, SYS_sub_shmctl,
SYS_ipc_nsubcalls): Define
* linux/sparc/syscallent.h: Add socketcall and ipc entries.
2008-01-25 Bruna Moreira
* defs.h [ARM]: Define SUPPORTED_PERSONALITIES to 2.
* syscall.c (get_scno) [ARM]: Add support for architecture specific
syscalls.
* linux/arm/syscallent.h: Update network syscalls list.
* linux/arm/syscallent1.h: New file. Add new architecture specific
syscalls.
* linux/arm/errnoent1.h: New file.
* linux/arm/ioctlent1.h: New file.
* linux/arm/signalent1.h: New file.
Fixes Debian#441000.
2008-01-07 Paul Mundt
* linux/sh64/syscallent.h: Update numerous calls, fix others.
2007-08-26 Daniel Jacobowitz
* defs.h [MIPS]: Include .
(MAX_QUALS): Update for MIPS.
(LINUX_MIPSO32, LINUX_MIPSN32, LINUX_MIPSN64, LINUX_MIPS64): Define.
(struct tcb): Add ext_arg for MIPS N32.
(TCB_WAITEXECVE): Define for MIPS.
(ALIGN64): Use LINUX_MIPSO32.
* file.c (sys_lseek): Use ext_arg for MIPS N32.
(sys_readahead, sys_fadvise64_64): Likewise.
* io.c (sys_pread64, sys_pwrite64): Likewise.
* mem.c (print_mmap): Take OFFSET argument.
(sys_old_mmap): Update call to print_mmap.
(sys_mmap): Use ext_arg for MIPS N32.
* process.c (struct_user_offsets): Add MIPS registers.
* signal.c (sys_sigreturn): Handle MIPS N32 and MIPS N64. Correct
MIPS O32 call to sprintsigmask.
* syscall.c (internal_syscall): Handle MIPS N32. Check for
TCB_WAITEXECVE on MIPS.
(force_result): Add a comment about MIPS N32.
(syscall_enter): Handle MIPS N32 and MIPS N64.
* linux/syscall.h (sys_pread64, sys_pwrite64): Declare.
* linux/mips/syscallent.h: Include "dummy.h". Handle alternate
MIPS ABIs.
2008-04-19 Dmitry V. Levin
* file.c [_LFS64_LARGEFILE] (sys_getdents64): Do the same
d_reclen check as in sys_getdents: warn if d_reclen is 0 rather
than looping forever.
[FREEBSD] (sys_getdirentries): Likewise.
Signed-off-by: Mike Frysinger
* file.c [LINUXSPARC] (printstatsol): Fix sprinttime()
invocation. The sprinttime() function takes a time_t argument,
but timestruct_t argument was given.
Signed-off-by: Mike Frysinger
* file.c (sprinttime): Check localtime() return value, to avoid
potential NULL dereference due to invalid time structures.
Signed-off-by: Harald van Dijk
Signed-off-by: Mike Frysinger
* linux/errnoent.h: Update errno list based on latest
linux/errno.h and asm-generic/errno*.h files.
Signed-off-by: Mike Frysinger
* signalent.sh: Fix sort(1) old-style options.
* syscallent.sh: Likewise.
Signed-off-by: Mike Frysinger
* count.c (call_summary_pers): Check calloc() return value.
Signed-off-by: "Yang Zhiguo"
2008-03-26 Roland McGrath
* strace.spec (strace64_arches): Add sparc64.
2007-11-20 Roland McGrath
* CREDITS, ChangeLog: Converted contents to UTF8.
2007-11-19 Roland McGrath
* strace.spec: Add BuildRequires on libaio-devel, libacl-devel.
2007-11-19 Andreas Schwab
* process.c (sys_ptrace) [IA64]: For PTRACE_PEEKDATA,
PTRACE_PEEKTEXT and PTRACE_PEEKUSER the data is returned directly.
* linux/syscallent.h: Fix argument count for getdents64.
* linux/arm/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Use sys_getdents64.
* linux/sh/syscallent.h: Likewise.
2007-11-06 Jan Kratochvil
* strace.c [LINUX] (droptcb): Recurse on TCP->parent if it is a
TCB_EXITING zombie group leader.
* test/childthread.c: New file.
* test/.cvsignore, test/Makefile: Add it.
Code advisory: Roland McGrath
Fixes RH#354261.
2007-11-03 Roland McGrath
* process.c (prctl_options): Add numerous constants.
From Sami Farin .
Fixes RH#364401.
2007-11-03 Jan Kratochvil
* strace.c (main): Move the STARTUP_CHILD call before setting up the
signal handlers. New comment about the valid internal states.
2007-11-02 Thiemo Seufer
* signal.c (m_siginfo_t): Add for MIPS.
(sys_sigreturn): struct sigcontext on MIPS has no sigset_t member,
acquire the signal mask with the same trick as on Sparc.
Fixes Debian#448802.
2007-11-01 Roland McGrath
* util.c (string_quote): Return nonzero if the string was unterminated.
(printstr): Use that value instead of just our own test.
(printpathn): Likewise.
Fixes RH#358241.
* linux/mips/syscallent.h: Fix argument count for fadvise64_64.
From Paul Mundt .
* linux/mips/syscallent.h: Fix argument count for lookup_dcookie.
From Paul Mundt .
* linux/sh64/syscallent.h: Fix SYS_socket_subcall check.
From Paul Mundt .
* linux/sh/syscallent.h: Update numerous calls.
From Paul Mundt .
2007-09-22 Dmitry V. Levin
* desc.c (sys_pselect6): Decode signal mask when entering syscall.
Relax signal mask size check.
* time.c (print_timespec, sprint_timespec): New functions.
* defs.h (print_timespec, sprint_timespec): Declare them.
* desc.c (sys_io_getevents): Use print_timespec.
* stream.c (sys_ppoll): Likewise.
(decode_poll): Use sprint_timespec.
2007-09-22 Alan Curry
Dmitry V. Levin
* stream.c (decode_poll): Rearrange so that arguments are decoded
and printed on syscall entry, except for revents and the output
timespec which are now printed in the auxstr.
(sys_poll): Print the input timeout argument on syscall entry.
[LINUX] (sys_ppoll): Likewise.
Fixes Debian#369651.
2007-09-22 Dmitry V. Levin
* desc.c (sprintflags): Remove static qualifier, add "prefix"
argument, move function to ...
* util.c (sprintflags): ... here.
* defs.h (sprintflags): Declare it.
2007-11-01 Roland McGrath
* syscall.c (get_scno) [ARM]: Check TCB_WAITEXECVE.
Reported by Bernhard Fischer .
* net.c (sockpacketoptions): Make PACKET_ADD_MEMBERSHIP and
PACKET_DROP_MEMBERSHIP conditional.
From Bernhard Fischer .
* configure.ac: Match sh64* for SH64, sh* for SH.
Reported by Bernhard Fischer .
2007-10-01 Dmitry V. Levin
* net.c (printsock): Output AF_UNIX socket address using
printpathn() to avoid unprintable characters in output.
Suggested by Neil Campbell.
2007-10-01 Dmitry V. Levin
* util.c (string_quote): Move quoting code from ...
(printstr) ... here. Use string_quote.
(printpathn): Update for new string_quote interface.
(printpath): Use printpathn.
2007-09-25 Dmitry V. Levin
* strace.c (main): Use calloc for tcbtab allocation.
Check calloc return value.
Reported by Bai Weidong.
2007-09-11 Roland McGrath
* linux/sparc/syscall.h: Add missing decls.
* linux/sparc/syscallent.h: Correct entries for setgroups32,
getgroups32, sys_getdents64.
From Jakub Bogusz .
* linux/alpha/syscallent.h: Correct entries for madvise, setresgid,
getresgid, pivot_root, mincore, pciconfig_iobase, getdents64.
From Jakub Bogusz .
* linux/syscallent.h: Fix getegid32 entry.
From Jakub Bogusz .
* defs.h [LINUXSPARC]: Use asm/psrcompat.h for [SPARC64], not asm/psr.h.
From Jakub Bogusz .
* mem.c (sys_getpagesize): Define for [SPARC || SPARC64] too.
From Jakub Bogusz .
2007-08-20 Dmitry V. Levin
* syscall.c (qual_syscall, qualify): Fix nsyscalls and MAX_QUALS misuse.
Reported by Xiaoning Ding.
2007-08-06 Jan Kratochvil
Roland McGrath
* file.c [!HAVE_STAT64 && LINUX && X86_64] (struct stat64): Define it.
[!HAVE_STAT64 && LINUX && X86_64] (HAVE_STAT64, STAT64_SIZE): Define.
[HAVE_STAT64] (printstat64) [STAT64_SIZE]: Add compile-time assertion.
Fixes RH#222275.
* file.c (printstat64): Test [HAVE_LONG_LONG] for st_size printing
and cast to widest type available.
2007-08-03 Ulrich Drepper
* file.c (open_mode_flags): Add O_CLOEXEC.
* net.c (msg_flags): Add MSG_CMSG_CLOEXEC.
Fixes RH#365781.
2007-08-03 Roland McGrath
* configure.ac, NEWS: Version 4.5.16.
* debian/changelog, strace.spec: 4.5.16-1.
* debian/control (Build-Depends): Replace libc6-dev-s390x and
libc6-dev-sparc64 with gcc-multilib.
* debian/rules: Replace sparc-linux, s390-linux conditionals with
general "arch64_map" hair, handle x86_64 and powerpc64 too.
From Matthias Klose .
Fixes Debian#435303.
2007-08-02 Jan Kratochvil
* strace.c (detach): Moved the resume notification code to ...
(resume_from_tcp): ... a new function here.
(handle_group_exit): No longer detach also the thread group leader.
(trace): Fixed panic on exit of the TCB_GROUP_EXITING leader itself.
Fixes RH#247907.
* test/leaderkill.c (start): Renamed to ...
(start0): ... here.
(start1): New function.
(main): Created a new spare thread.
2007-08-01 Roland McGrath
* util.c (umoven): Don't perror for EIO.
(umovestr): Likewise.
* process.c (printargv): Handle boundary cases correctly.
Handle biarch fetching correctly.
* util.c (printstr): Don't print ... if the string matches the length
limit exactly.
* linux/sparc64/syscallent.h: Just #include the sparc file.
* linux/sparc64/syscallent1.h: Likewise.
* linux/sparc64/syscallent2.h: Likewise.
* linux/arm/syscallent.h: Add entry for getcpu.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/arm/syscallent.h: Add entry for eventfd.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/arm/syscallent.h: Add entry for timerfd.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/arm/syscallent.h: Add entry for signalfd.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Add entry for epoll_pwait.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
2007-07-23 Ulrich Drepper
* process.c (sys_getcpu): New function.
* linux/syscall.h: Declare sys_getcpu.
* linux/syscallent.h: Add entry for getcpu.
* desc.c (sys_eventfd): New function.
* linux/syscall.h: Declare sys_eventfd.
* linux/syscallent.h: Add entry for eventfd.
* linux/x86_64/syscallent.h: Likewise.
* time.c (printitv_bitness): Add missing braces to enclose
conditional code.
(TDF_TIMER_ABSTIME): Define if not already.
(timerfdflags): New variable.
(sys_timerfd): New function.
* linux/syscall.h: Declare sys_timerfd.
* linux/syscallent.h: Add timerfd entry.
* linux/x86_64/syscallent.h: Likewise.
* linux/syscall.h: Declare sys_signalfd.
* linux/syscallent.h: Add entry for signalfd.
* linux/x86_64/syscallent.h: Likewise.
* signal.c (sys_signalfd): New function.
* desc.c (sys_epoll_wait): Move body of function to ...
(epoll_wait_common): ...here. New function.
(sys_epoll_pwait): New function.
* linux/syscall.h: Declare sys_epoll_pwait.
* linux/syscallent.h: Add entry for epoll_pwait.
* linux/x86_64/syscallent.h: Likewise.
2007-07-23 Roland McGrath
* time.c (printtv_bitness): SPECIAL only counts when tv_sec == 0.
* linux/arm/syscallent.h: Add move_pages.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/syscallent.h: move_pages takes 6 args, not 5.
* linux/x86_64/syscallent.h: Likewise.
2007-07-23 Ulrich Drepper
* defs.h: Add new parameter to printtv_bitness prototype.
(printttv): Pass zero for the new parameter.
(printtv_special): New macro.
* desc.c (decode_select): Pass zero for the new parameter of
printtv_bitness.
* file.c (utimensatflags): New macro.
(sys_osf_utimes): Pass zero for the new parameter of
printtv_bitness.
(sys_utimes): Likewise.
(sys_futimesat): Likewise.
(decode_utimes): Add new parameter. Pass it to the
printtv_bitness calls. Fix printing of time values.
(sys_utimensat): New function.
* time.c (UTIME_NOW, UTIME_OMIT): Define if not already
happened.
(printtv_bitness): Add new parameter. Print special UTIME_*
values as strings if set.
(sys_osf_gettimeofday): Pass zero for the new parameter of
printtv_bitness.
(sys_osf_settimeofday): Likewise.
* linux/syscall.h: Declare sys_utimensat.
* linux/syscallent.h: Add utimensat entry.
* linux/x86_64/syscallent.h: Likewise.
* mem.c (move_pages_flags): New variable.
(sys_move_pages): New function.
* linux/syscall.h: Declare sys_move_pages.
* linux/syscallent.h: Add entry for sys_move_pages.
* linux/x86_64/syscallent.h: Likewise.
* mem.c (MPOL_MF_MOVE, MPOL_MF_MOVE_ALL): Define.
(mbindflags): Add MPOL_MF_MOVE and MPOL_MF_MOVE_ALL entries.
2007-07-23 Roland McGrath
* util.c (tv_add): Fix rounding comparison.
Reported by Bai Weidong .
2007-07-11 Roland McGrath
* count.c (call_summary_pers): Use tv_float conversion for output of
cumulative time, in case it is negative from bogus -O value.
From Lai JiangShan .
* strace.c (handle_group_exit): Detach TCP before LEADER.
Don't use PTRACE_KILL on LEADER.
* util.c (printstr): Fix size calculation for outstr allocation.
* configure.ac (struct sigcontext.sc_hi2): Use #ifdef around
to match signal.c include conditions.
2007-07-05 Roland McGrath
* debian/rules: Use debian/$(package) instead of debian/tmp as temp dir.
* configure.ac: Use before .
* debian/changelog: Harmonize with debian version.
* debian/control (Uploaders): Fix surname spelling.
(Build-Depends): Make debhelper requirement (>= 5.0.0).
(Standards-Version): Update to 3.7.2.
* .cvsignore: Add some automake-created files.
* file.c (sys_utime): Use personality_wordsize to handle biarch.
Fixes RH#247185.
* signal.c (sys_sigreturn) [MIPS]: Pass 3rd arg to sprintsigmask.
From Zhang Le .
* strace.c (strace_fopen): [_LFS64_LARGEFILE]: Use fopen64.
Fixes Debian#385310.
* strace.c (main): Fix error message for unfound -u user.
From Srinivasa Ds .
Fixes RH#247170.
* debian/control (Architecture): Add armel.
* linux/syscallent.h: Fix sys_delete_module arg count.
* linux/alpha/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/sparc64/syscallent2.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/dummy.h (sys_delete_module): Use sys_open.
From Johannes Stezenbach .
* configure.ac: Check for struct sigcontext.sc_hi2.
* signal.c (sys_sigreturn) [MIPS]: Use sc_hi2 vs sc_sigset if found.
* process.c [LINUX] (futexops): Add many new values.
[LINUX] (futexwakeops, futexwakecmps): New tables.
[LINUX] (sys_futex): Use them.
From Ulrich Drepper .
Fixes RH#241467.
2007-07-05 Jan Kratochvil
* strace.c (detach): New prototype. Extended the function comment.
[LINUX] (detach): Call droptcb() instead of the wrongly parametrized
detach() call.
(handle_group_exit): Call droptcb() instead of the wrongly parametrized
detach() call. Always call detach() only once from the group leader.
Comment the leader killing known bug tested by `test/leaderkill.c'.
Code advisory: Roland McGrath
Fixes RH#240961.
* test/leaderkill.c: New file.
* test/.cvsignore, test/Makefile: Add it.
2007-03-21 Andreas Schwab
* file.c (sys_newfstatat): Don't use printstat64 on ppc64.
2007-03-29 Vladimir Nadvornik
Dmitry V. Levin
Trace linux SG_IO ioctl arguments and results.
* scsi.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (scsi_ioctl): New function.
* ioctl.c (ioctl_decode): Use scsi_ioctl().
2007-06-28 Dmitry V. Levin
* util.c (tv_mul): Multiply tv_usec properly.
Patch from Cai Fei .
2007-06-11 Jan Kratochvil
Never interrupt when the attached traced process would be left stopped.
* strace.c (main): `-p' attaching moved to ...
(startup_attach): ... a new function, renamed a variable C to TCBI.
Block interrupting signals since the first tracee has been attached.
New comment about INTERRUPTED in the nonthreaded case.
[LINUX] (startup_attach): Check INTERRUPTED after each attached thread.
(main): Command spawning moved to ...
(startup_child): ... a new function, replaced RETURN with EXIT.
[LINUX] (detach): New variable CATCH_SIGSTOP, do not signal
new SIGSTOP for processes still in TCB_STARTUP.
(main): Move signals and BLOCKED_SET init before the tracees attaching,
[SUNOS4] (trace): Removed fixvfork () call as a dead code, SIGSTOP must
have been already caught before clearing TCB_STARTUP.
(trace): Removed the `!WIFSTOPPED(status)' dead code.
Clear TCB_STARTUP only in the case the received signal was SIGSTOP.
New comment when `TCB_BPTSET && TCB_STARTUP' combination can be set.
Code advisory: Roland McGrath
Fixes RH#240986.
2007-05-24 Jan Kratochvil
* strace.c [LINUX] (my_tgkill): New macro.
[LINUX] (detach): Use my_tgkill () instead of kill(2).
Fixes RH#240962.
2007-03-30 Dmitry V. Levin
* mem.c (mmap_flags): Add MAP_32BIT.
Reported by Kirill A. Shutemov.
2007-01-12 Dmitry V. Levin
* sock.c (sock_ioctl): Check umove() return code.
[LINUX]: Handle SIOCGIFTXQLEN and SIOCGIFMAP.
2007-03-16 Roland McGrath
* linux/s390/syscallent.h: Use sys_restart_syscall for 7.
* linux/s390x/syscallent.h: Likewise.
2007-02-18 Roland McGrath
* strace.spec (Summary): Remove trailing period.
(%files): Add %doc files.
(%changelog): Double %s in text.
(BuildRoot): Change to Fedora canonical.
(%install): Don't use %makeinstall macro.
(%build): Use %{?_smp_mflags}.
2007-01-16 Roland McGrath
* configure.ac, NEWS: Version 4.5.15.
* debian/changelog, strace.spec: 4.5.15-1.
2007-01-16 Dmitry V. Levin
Update mount parser to match kernel behaviour.
* system.c [LINUX] (MS_VERBOSE): Rename to MS_SILENT.
[LINUX] (MS_UNBINDABLE, MS_PRIVATE, MS_SLAVE, MS_SHARED):
New macros.
[LINUX] (mount_flags): Add them.
[LINUX] (MS_MGC_MSK): New macro.
[LINUX] (sys_mount): Update parser to match kernel behaviour:
discard MS_MGC_VAL magic, do not decode type and/or data
strings when specified flags do not imply valid strings.
2007-01-12 Dmitry V. Levin
* time.c [LINUX] (tprint_timex32, tprint_timex): Decode adjtimex
modes as flags.
2007-01-11 Dmitry V. Levin
Update umount parser.
* system.c [LINUX] (MNT_FORCE, MNT_DETACH, MNT_EXPIRE): New macros.
[LINUX] (umount_flags): New xlat structure with MNT_* entries.
[LINUX] (sys_umount2): Use umount_flags.
Fix open(2) flags parser.
* defs.h (tprint_open_modes): New function.
* desc.c (sprint_open_modes): New function.
(sys_fcntl): Use tprint_open_modes() and sprint_open_modes().
* file.c (openmodes): Split xlat into open_access_modes and
open_mode_flags.
(tprint_open_modes): New function.
(decode_open): Use it.
* ipc.c (sys_mq_open, printmqattr): Likewise.
Fixes RH#222385.
2007-01-11 Roland McGrath
* configure.ac, NEWS: Version 4.5.15.
* debian/changelog, strace.spec: 4.5.15-1.
* debian/control (Uploaders): Add Frederik Schueler .
* strace.spec (Release): Use %{?dist}.
* system.c [LINUX] (CTL_CPU): Define in case header is missing it.
2006-12-27 Dmitry V. Levin
Add const qualifier to xlookup() return value.
* defs.h (xlookup): Add const qualifier to return value.
* desc.c (sprintflags): Likewise.
* process.c (printpriv): Update xlookup() use.
* signal.c (sprintsigmask): Add const qualifier to first argument and
return value.
* util.c (xlookup): Add const qualifier to return value.
(printxval): Update xlookup() use.
2006-12-21 Dmitry V. Levin
Move counts code to separate file.
* count.c: New file.
* Makefile.am (strace_SOURCES): Add count.c.
* syscall.c (call_counts, countv, counts, shortest, time_cmp,
syscall_cmp, count_cmp, sortfun, overhead, set_sortby,
set_overhead, call_summary_pers, call_summary): Move to count.c
* count.c (count_syscall): New function.
* defs.h (count_syscall): Declare it.
* syscall.c (trace_syscall): Use it.
2006-12-20 Dmitry V. Levin
* syscall.c (internal_syscall): Change conditions for internal_exit,
internal_fork, internal_clone, internal_exec and internal_wait
calls from switching on known scno values to switching on known
sysent[tcp->scno].sys_func values.
Fixes RH#179740.
Show system call summary for each personality.
* syscall.c (countv): New call_counts pointers array.
(counts): Convert to macro wrapper around countv.
(call_summary_pers): New function.
(call_summary): Use it for each personality.
Fixes RH#192193.
2006-12-12 Dmitry V. Levin
Fix -ff -o behaviour. Fix piping trace output.
* defs.h (newoutf): Remove.
(alloctcb): Rename to alloc_tcb. Add alloctcb() macro wrapper
around alloc_tcb().
* process.c [!USE_PROCFS] (internal_clone, internal_fork):
Remove newoutf() call.
* strace.c (set_cloexec_flag, strace_fopen, strace_popen,
swap_uid): New functions.
(popen_pid): New variable.
(newoutf): Make static, use strace_fopen().
(main): Use strace_fopen() and strace_popen(), remove uids
swapping. Do not open outfname when followfork > 1.
Reinitialize tcp->outf properly.
(alloctcb): Rename to alloc_tcb. Use newoutf().
(trace): Check popen_pid. Remove newoutf() call.
[USE_PROCFS] (proc_open, proc_poll_open): Use set_cloexec_flag().
Fixes RH#204950, RH#218435, Debian#353935.
2006-12-10 Dmitry V. Levin
Add biarch support for "struct sigevent".
* time.c [LINUX && SUPPORTED_PERSONALITIES > 1] (printsigevent32):
New function.
[LINUX] (printsigevent): [SUPPORTED_PERSONALITIES > 1]
Handle 32-bit personality.
Add biarch support for "struct timex".
* time.c [LINUX && SUPPORTED_PERSONALITIES > 1] (tprint_timex32):
New function.
[LINUX] (tprint_timex): New function.
[LINUX] (sys_adjtimex): Use it.
Enhance adjtimex parser.
* time.c [LINUX] (adjtimex_modes, adjtimex_status,
adjtimex_state): New xlat structures.
[LINUX] (sys_adjtimex): Print the whole struct timex.
Decode modes, status and return code.
Add biarch support for "struct itimerval".
* time.c (printitv): Rename to printitv_bitness().
Add printitv() macro wrapper around printitv_bitness().
(printitv_bitness): Handle 32-bit personality.
[ALPHA] (sys_osf_getitimer, sys_osf_setitimer):
Use printitv_bitness().
(tprint_timeval, tprint_timeval32): New functions.
(printtv_bitness, printitv_bitness, sys_adjtimex): Use them.
(printitv32): Remove.
Add biarch support for "struct timeval".
* defs.h (bitness_t): New enum type.
(printtv_bitness, sprinttv): New function prototypes.
(printtv): Convert to macro wrapper around printtv_bitness().
(printtv32): Remove.
* desc.c (decode_select): Use printtv_bitness() and sprinttv().
(sys_oldselect, sys_osf_select, sys_select, sys_pselect6):
Update decode_select() use.
* file.c [ALPHA] (sys_osf_utimes): Use printtv_bitness().
* time.c (printtv_bitness, sprinttv): New functions.
(printtv, printtv32): Remove.
[ALPHA] (sys_osf_settimeofday, sys_osf_settimeofday):
Use printtv_bitness().
Fixes RH#171626, RH#173050.
Add biarch support for "struct iovec".
* defs.h (personality_wordsize): Add.
* io.c [HAVE_SYS_UIO_H] (tprint_iov): [LINUX &&
SUPPORTED_PERSONALITIES > 1] Handle 32-bit personality.
* util.c [HAVE_SYS_UIO_H] (dumpiov): [LINUX &&
SUPPORTED_PERSONALITIES > 1] Likewise.
Patch from Jakub Jelinek.
Fixes RH#218433.
* time.c (sys_timer_create): Check umove() return code.
Make several global variables static.
#ifdef definitions of rarely unused functions.
* defs.h (rflag, tflag, outfname): Remove.
* strace.c (iflag, interactive, pflag_seen, rflag, tflag,
outfname, username): Make static.
* desc.c (sys_getdtablesize): Define only for
ALPHA || FREEBSD || SUNOS4.
* file.c (sys_fchroot): Define only for SUNOS4 || SVR4.
(sys_mkfifo): Define only for FREEBSD.
* mem.c (sys_sbrk): Define only for FREEBSD || SUNOS4.
(sys_getpagesize): Define only for
ALPHA || FREEBSD || IA64 || SUNOS4 || SVR4.
* net.c (sys_so_socket): Define only for SVR4.
* process.c (sys_gethostid): Define only for
FREEBSD || SUNOS4 || SVR4.
(sys_gethostname): Define only for
ALPHA || FREEBSD || SUNOS4 || SVR4.
(sys_setpgrp): Define only for ALPHA || SUNOS4 || SVR4.
(sys_execv): Define only for SPARC || SPARC64 || SUNOS4.
* signal.c (sys_sigblock): Define only for FREEBSD || SUNOS4.
(sys_sighold, sys_sigwait): Define only for SVR4.
(sys_killpg): Define only for FREEBSD || SUNOS4.
* stream.c (sys_getmsg): Define only for
SPARC || SPARC64 || SUNOS4 || SVR4.
* syscall.c (sys_indir): Define only for SUNOS4.
2006-11-27 Dmitry V. Levin
* system.c [LINUX]: Define CTL_PROC, since Linux 2.6.18+ headers
removed CTL_PROC enum. Patch from Jakub Jelinek.
[LINUX] (sysctl_root): Add CTL_BUS, CTL_ABI and CTL_CPU.
2006-11-20 Jakub Jelinek
* linux/ia64/syscallent.h: Add #if check to make sure that
SYS_socket_subcall adjustment isn't forgotten again.
2006-10-16 Dmitry V. Levin
Implement comprehensive quotactl(2) parser for Linux.
* Makefile.am (strace_SOURCES): Add quota.c.
* quota.c: New file.
* resource.c: Remove old quotactl(2) parser.
Fixes RH#118696.
2006-10-14 Dmitry V. Levin
* configure.ac (AC_CHECK_HEADERS): Add inttypes.h.
* file.c [_LFS64_LARGEFILE && (LINUX || SVR4)]:
Include .
(sys_getdents64): Use PRIu64/PRId64 to avoid gcc warnings on
64-bit platforms.
* strace.c (main): Check getcwd() return code.
2006-10-13 Ulrich Drepper
Bernhard Kaindl
Dmitry V. Levin
Michael Holzheu
Add hooks for new syscalls. Add decoders for *at, inotify*,
pselect6, ppoll and unshare syscalls.
* defs.h: Declare print_sigset.
* desc.c (sys_pselect6): New function.
* file.c (decode_open, decode_access, decode_mkdir,
decode_readlink, decode_chmod, decode_utimes, decode_mknod):
New functions.
(sys_open, sys_access, sys_mkdir, sys_readlink, sys_chmod,
sys_utimes, sys_mknod): Use them.
[LINUX] (fstatatflags, unlinkatflags, inotify_modes): New
variables.
[LINUX] (print_dirfd, sys_openat, sys_faccessat,
sys_newfstatat, sys_mkdirat, sys_linkat, sys_unlinkat,
sys_symlinkat, sys_readlinkat, sys_renameat, sys_fchownat,
sys_fchmodat, sys_futimesat, sys_mknodat, sys_inotify_add_watch,
sys_inotify_rm_watch): New functions.
* process.c [LINUX] (sys_unshare): New function.
* signal.c (print_sigset): New function.
(sys_sigprocmask): Use it.
* stream.c (decode_poll): New function.
(sys_poll): Use it.
[LINUX] (sys_ppoll): New function.
* linux/syscall.h: Delcare new syscall handlers.
* linux/syscallent.h: Hook up new syscalls.
* linux/alpha/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
Fixes RH#178633.
2006-10-06 Dmitry V. Levin
* strace.c [!USE_PROCFS] (trace): Presence of PT_GETSIGINFO
macro does not mean that PT_CR_IPSR and PT_CR_IIP macros are
also defined, so check them along with PT_GETSIGINFO.
Fixes RH#209856.
2006-09-01 Dmitry V. Levin
* file.c (print_xattr_val): Fix memory corruption bug reported
by James Antill.
Fixes RH#200621.
2006-04-21 Dmitry V. Levin
* defs.h [LINUX && X86_64 && !__NR_exit_group]: Define
__NR_exit_group.
2006-03-29 Dmitry V. Levin
Fix race conditions in tcb allocation.
* process.c (fork_tcb): Return error code as documented. Do not
print "tcb table full" error message.
[USE_PROCFS] (internal_fork): Do not print "tcb table full"
error message.
[SYS_clone || SYS_clone2] (internal_clone, internal_fork): Call
fork_tcb() before alloctcb(). Do not print "tcb table full"
error message.
* strace.c (main): Do not print "tcb table full" error message.
(expand_tcbtab): Print error message in case of memory allocation
failure.
(alloctcb): Print error message when tcb table is full.
(trace): Expand tcb table if necessary prior to allocating
entry there. Do not print "tcb table full" error message.
Fixes RH#180293.
2006-08-22 Roland McGrath
* ipc.c (sys_msgget, sys_semget, sys_shmget): Show key values in hex.
Fixes RH#198179.
2006-08-21 Roland McGrath
* linux/syscall.h (SYS_socket_subcall): Bump to 400.
* linux/syscallent.h: Update table.
* linux/arm/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
Fixes RH#201462.
2006-04-25 Roland McGrath
* strace.c (main): Fail when -c is given with -ff.
* strace.1: Note their incompatibility.
Fixes RH#187847.
* strace.c (main): Fail when nonoption args follow -p switches.
Fixes Debian#361302.
* Makefile.am (EXTRA_DIST): Add xlate.el.
* linux/mips/Makefile.in: File removed, unused cruft.
* linux/sparc/Makefile.in: Likewise.
* strace.spec (Source0): Use http://dl.sourceforge.net URL.
* ipc.c (sys_semtimedop): Fixed inverted indirect_ipccall test.
* linux/hppa/syscallent.h: Fixed semtimedop entry.
From Mike Stroyan .
Fixes Debian#340239.
2006-03-30 Daniel Jacobowitz
* linux/arm/syscallent.h: Correct the name of exit. Remove
M68K conditionals and sys_security. Correct syscalls 243-282.
Fixes Debian#360154.
* process.c (change_syscall): Add ARM support.
* syscall.c (get_scno): Handle ARM EABI.
Fixes Debian#360152.
2006-01-16 Roland McGrath
* configure.ac, NEWS: Version 4.5.14.
* debian/changelog, strace.spec: 4.5.14-1.
2006-01-13 Roland McGrath
* debian/control (Build-Depends): Add debhelper.
2006-01-12 Roland McGrath
* signal.c [LINUX] (sys_restart_syscall): New function.
* linux/syscall.h: Declare sys_restart_syscall.
* linux/sparc/syscall.h: Likewise.
* linux/syscallent.h: Call 0 is restart_syscall.
* linux/arm/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/alpha/syscallent.h: Use sys_restart_syscall.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
Fixes RH#165469, Debian#350641.
2005-08-08 Dmitry V. Levin
* system.c [LINUX] (MS_MGC_VAL): New macro.
[LINUX] (mount_flags): Add it.
[LINUX] (sys_mount): If neither MS_BIND nor MS_MOVE bits are
set in the flags argument, try to fetch data string.
Fixes RH#165377.
2006-01-12 Roland McGrath
* system.c (sys_sysctl): Don't read off end of NAME when max_strlen
exceeds INFO.nlen.
From Timo Lindfors .
Fixes Debian#339117.
* debian/rules (binary-arch): Don't pass -s to install. Use dh_strip.
Fixes Debian#325132.
* debian/control (Standards-Version): Update to 3.6.2.
* defs.h [LINUXSPARC] (PERSONALITY0_WORDSIZE, PERSONALITY1_WORDSIZE):
New macros.
[SPARC64] (PERSONALITY2_WORDSIZE): New macro.
[X86_64] (PERSONALITY0_WORDSIZE, PERSONALITY1_WORDSIZE): New macros.
* syscall.c (PERSONALITY0_WORDSIZE): New macro if undefined.
(personality_wordsize): New variable.
(decode_subcall): Use it for size of argument words.
Fixes RH#174354.
2005-11-17 Dmitry V. Levin
Implement qual_flags support for each personality.
* strace.c (main): Move qualify calls after set_personality call.
* syscall.c (qual_flags0): New variable..
[SUPPORTED_PERSONALITIES >= 2] (qual_flags1): New variable.
[SUPPORTED_PERSONALITIES >= 3] (qual_flags2): New variable.
(qual_flags): Change variable definition from array to pointer.
(set_personality): Initialize qual_flags variable.
(qualify_one): Add "pers" argument to specify personality.
[SUPPORTED_PERSONALITIES >= 2]: Set qual_flags1 if requested.
[SUPPORTED_PERSONALITIES >= 3]: Set qual_flags2 if requested.
(qual_syscall): Pass personality to qualify_one.
[SUPPORTED_PERSONALITIES >= 2]: Look for syscall also in sysent1
table.
[SUPPORTED_PERSONALITIES >= 3]: Look for syscall also in sysent2
table.
(qual_signal): Pass personality to qualify_one.
(qual_desc): Likewise.
(qualify): Use qualify_one instead of manual qual_flags
manipulations.
[SUPPORTED_PERSONALITIES >= 2]: Look for syscall also in sysent1
table.
[SUPPORTED_PERSONALITIES >= 3]: Look for syscall also in sysent2
table.
* defs.h: Update qual_flags declaration.
Fixes RH#173986.
2005-11-14 Dmitry V. Levin
* syscall.c (qual_syscall): Handle numeric syscall specification.
Fixes RH#174798.
* syscall.c (qual_signal, qual_options): Remove redundant argument
check.
2005-12-01 Roland McGrath
* ipc.c (indirect_ipccall) [MIPS || HPPA]: Return false.
Fixes Debian#340239.
* Makefile.am (EXTRA_DIST): Add linux/arm/syscallent.h
and linux/m68k/syscallent.h.
Fixes Debian#336197.
* debian/control (Architecture): Add armeb.
Fixes Debian#335681.
2005-11-02 Michal Marek
* strace-graph (handle_trace): follow clone() and vfork() calls.
2005-10-25 Heiko Carstens
* linux/s390/syscallent.h: Added ioprio_set, ioprio_get,
inotify_init, inotify_add_watch, inotify_rm_watch.
Corrected number of arguments for request_key.
* linux/s390x/syscallent.h: Likewise.
2005-12-01 Roland McGrath
* ipc.c (indirect_ipccall) [IA64]: Return false unless the syscall
number is in the low range of IA32 syscalls.
2005-10-07 Andreas Schwab
* linux/ia64/syscallent.h: Syscall 1105 is gettid, not ioperm.
2005-12-01 Roland McGrath
* resource.c (resources): Add RLIMIT_NICE, RLIMIT_RTPRIO.
Reported by Scott Tsai .
* ipc.c (indirect_ipccall): New function.
(sys_msgctl, sys_msgsnd, sys_msgrcv, sys_semop): Use that predicate
instead of #ifdef LINUX test.
[LINUX] (sys_semtimedop): Likewise.
(sys_shmctl, sys_shmat, sys_shmdt): Likewise.
Fixes RH#164755.
2005-07-31 Ulrich Drepper
* linux/x86_64/syscallent.h: Fix syscall parameter count for msgrcv and
msgctl.
* ipc.c (sys_msgrcv): Add entering handling and print first parameter
there.
Fixes RH#164757.
2005-08-08 Dmitry V. Levin
* strace.1: Update "SEE ALSO" links to reference to valid
manpages.
Patch from Michail Litvak .
Fixes RH#165375.
2005-10-21 Roland McGrath
* util.c (printpathn): Cap N at sizeof path - 1.
2005-08-03 Roland McGrath
* configure.ac, NEWS: Version 4.5.13.
* debian/changelog, strace.spec: 4.5.13-1.
* configure.ac: Check for struct dqblk.dqb_curblocks field.
* resource.c [LINUX] (OLD_CMD): New macro.
(quotacmds): Use it to hard-wire old O_* values, don't use macros.
(sys_quotactl): If dqb_curblocks is not there, it's called
dqb_curspace instead. Print dqb_* fields as unsigned long long.
2005-07-19 Michael Schmitz
Long overdue m68k cleanup.
* linux/syscallent.h: remove m68k declarations.
* linux/m68k/syscallent.h: new file, fixed up declarations
to match kernel version 2.6.11. Newer syscalls are sufficiently
different from i386 to merit a separate file.
2005-08-03 Roland McGrath
* linux/x86_64/syscallent.h: Update init_module argument count.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent2.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
2005-07-22 James Lentini
* bjm.c (sys_init_module): Display all three arguments.
* linux/syscallent.h: Update argument count.
2005-08-03 Roland McGrath
* process.c (internal_wait): Don't suspend when known child is known
to be exiting already.
* strace.c (detach): If detaching the last live thread in a group with
a zombie leader, then detach the leader too.
(handle_group_exit): Use detach, not droptcb, for predeceased thread.
Mark process about to take a signal with TCB_GROUP_EXITING flag.
Fixes RH#161919.
2005-07-19 Roland McGrath
* defs.h [LINUX] [M68K] (__NR_exit_group): Define it if missing.
Fixes Debian#315500.
2005-07-14 Heiko Carstens
* linux/s390/syscallent.h (sys_tgkill, vserver, fadvise64_64)
(statfs64, fstatfs64, remap_file_pages, mbind, get_mempolicy)
(set_mempolicy, mq_open, mq_unlink, mq_timedsend, mq_timedreceive)
(mq_notify, mq_getsetattr, sys_kexec_load, add_key, request_key)
(keyctl, waitid): Added.
* linux/s390x/syscallent.h: Likewise and added missing _llseek.
* linux/s390/errnoent.h (ECANCELED, ENOKEY, EKEYEXPIRED)
(EKEYREVOKED, EKEYREJECTED, EOWNERDEAD, ENOTRECOVERABLE): Added.
* linux/s390x/errnoent.h: Likewise.
2005-07-05 Roland McGrath
* mem.c [LINUX] (sys_old_mmap) [X86_64]: Extract 32-bit values if
child is 32-bit.
Fixes RH#162467.
2005-06-08 Dmitry V. Levin
Introduce "-e trace=desc".
* defs.h (TRACE_DESC): New flag.
* syscall.c: Define TD macro before include of syscallent files
and undefine it afterwards.
(lookup_class): Recognize "desc" keyword.
* strace.1: Document "-e trace=desc".
* freebsd/i386/syscallent.h: Mark those syscalls which take a
file descriptor as an argument or return a file descriptor with
TD flag.
* linux/alpha/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent2.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* sunos4/syscallent.h: Likewise.
* svr4/syscallent.h: Likewise.
Fixes RH#159400.
Remove TF flag from those syscalls which have no filename argument.
* freebsd/i386/syscallent.h: Remove TF flag from fstat, pread,
pwrite, fstat, sendfile.
* linux/alpha/syscallent.h: Remove TF flag from read, write,
pread, pwrite, sendfile.
* linux/hppa/syscallent.h: Remove TF flag from read, write,
pread, pwrite, fstat64, sendfile, ftruncate64.
* linux/ia64/syscallent.h: Remove TF flag from read, write,
sendfile, fstat, fadvise64.
* linux/mips/syscallent.h: Remove TF flag from read, write,
fstatfs, fstat, pread, pwrite, sendfile, ftruncate64, fstat64,
sendfile64, fadvise64, fstatfs64.
* linux/powerpc/syscallent.h: Remove TF flag from read, write,
fstat, pread, pwrite, sendfile, ftruncate64, fstat64, sendfile64,
fadvise64, fstatfs64, fadvise64_64.
* linux/s390/syscallent.h: Remove TF flag from pread, pwrite,
sendfile, ftruncate64, fstat64, sendfile64.
* linux/s390x/syscallent.h: Remove TF flag from pread, pwrite,
sendfile, sendfile64.
* linux/sh/syscallent.h: Remove TF flag from pread, pwrite,
sendfile, fstat64.
* linux/sh64/syscallent.h: Remove TF flag from pread, pwrite,
sendfile, ftruncate64, fstat64.
* linux/sparc/syscallent.h: Remove TF flag from sendfile, fstat64,
pread, pwrite, sendfile64.
* linux/sparc64/syscallent2.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/syscallent.h: Remove TF flag from pread, pwrite, sendfile,
ftruncate64, fstat64, sendfile64, fadvise64, fadvise64, fstatfs64,
fadvise64_64.
* linux/x86_64/syscallent.h: Remove TF flag from pread, pwrite,
sendfile, fadvise64_64.
* svr4/syscallent.h: Remove TF flag from pread, pwrite, ftruncate,
fstatvfs64, ftruncate64.
Fixes RH#159340.
2005-07-04 Roland McGrath
* net.c (sockipv6options): Add IPV6_ADD_MEMBERSHIP,
IPV6_DROP_MEMBERSHIP, IPV6_ROUTER_ALERT.
From Ulrich Drepper .
Fixes RH#162450.
* net.c (sockipoptions): Fix typos.
From Ulrich Drepper .
Fixes RH#161578.
* util.c (printnum_int): New function, printnum with s/long/int/.
* defs.h: Declare it.
* net.c (printsockopt): Use it for int-sized option.
Fixes RH#162449.
Reported by Ulrich Drepper .
2005-06-09 Roland McGrath
* configure.ac, NEWS: Version 4.5.12.
* debian/changelog, strace.spec: 4.5.12-1.
2005-06-08 Dmitry V. Levin
Minor namespace cleanup.
* defs.h (string_quote): Remove declaration.
* file.c (openmodessol) [LINUXSPARC]: Make static.
(fileflags): Likewise.
(aclcmds, aclipc) [HAVE_SYS_ACL_H]: Likewise.
(direnttypes) [FREEBSD || LINUX]: Likewise.
(xattrflags): Likewise.
* process.c (unalignctl_string): Make static.
(setarg): Disable.
* syscall.c (subcalls_table): Make static.
(socket_map) [!(LINUX && (ALPHA || MIPS))]: Likewise.
(sparc_socket_decode): Make static, define for [SPARC || SPARC64] only.
(decode_subcall): Make static.
(syscall_fixup): Likewise.
(get_error): Likewise.
(syscall_enter): Likewise.
* util.c (tv_tv): Disable.
(getpc): Likewise.
(string_quote): Make static.
Fixes RH#159688.
2005-05-12 Philippe De Muyter
* util.c (getpc, printcall): Check #if defined(M68K), not M68k.
Enables `-i' on m68k machines.
2005-06-06 Roland McGrath
* process.c (struct_user_offsets) [X86_64]: Reorder elements so
matching works right.
Fixes RH#159787.
* linux/syscall.h (SYS_socket, SYS_bind, SYS_connect, SYS_listen)
(SYS_accept, SYS_getsockname, SYS_getpeername, SYS_socketpair)
(SYS_send, SYS_recv, SYS_sendto, SYS_recvfrom, SYS_shutdown)
(SYS_setsockopt, SYS_getsockopt, SYS_sendmsg, SYS_recvmsg)
(SYS_getsockname, SYS_semop, SYS_semgsub_et, SYS_semget, SYS_semctl)
(SYS_semtimedop, SYS_msgsnd, SYS_msgrcv, SYS_msgget)
(SYS_msgctl, SYS_shmat, SYS_shmdt, SYS_shmget)
(SYS_shmctl): Macros renamed to SYS_sub_*.
* syscall.c (dumpio): Match SYS_sub_* if defined instead of SYS_*.
* linux/syscall.h (SYS_waitid): Define if not defined.
* linux/syscallent.h: Fix pread/pwrite names to pread64/pwrite64.
* defs.h (struct sysent): New member `native_scno'.
(known_scno): Declare new function.
* linux/syscallent.h: Add new final field to interesting syscalls.
* syscall.c (known_scno): New function.
(dumpio, internal_syscall, syscall_fixup, trace_syscall): Use it.
* process.c (internal_fork, internal_exit): Likewise.
[IA64] (ARG_STACKSIZE, ARG_PTID, ARG_CTID, ARG_TLS): Likewise.
* strace.c (proc_open): Likewise.
* util.c [LINUX] (setbpt): Likewise.
* linux/syscall.h: Remove [!defined(X86_64)] from conditional
for defining SYS_socket_subcall et al.
* linux/syscallent.h: Likewise for #error check.
* syscall.c (trace_syscall): Likewise for SYS_{socketcall,ipc} cases.
Fixes RH#158934.
2005-06-02 Roland McGrath
* file.c (printstatfs64): Cast values to unsigned long long and use
%llu formats.
Fixes RH#158243.
2005-05-31 Dmitry V. Levin
Deal with memory management issues.
* defs.h (tprint_iov): Update prototype.
* desc.c (sys_epoll_wait) [HAVE_SYS_EPOLL_H]: Do not allocate
epoll_event array of arbitrary size on the stack, to avoid
stack overflow.
* file.c (print_xattr_val): Check for integer overflow during
malloc size calculation, to avoid heap corruption.
* io.c (tprint_iov) [HAVE_SYS_UIO_H]: Check for integer overflow
during malloc size calculation, to avoid heap corruption.
Change iovec array handling to avoid heap memory allocation.
* mem.c (get_nodes) [LINUX]: Check for integer overflow during
size calculation and do not allocate array of arbitrary size on
the stack, to avoid stack overflow.
* net.c (printcmsghdr) [HAVE_SENDMSG]: Do not allocate array of
arbitrary size on the stack, to avoid stack overflow. Do not
trust cmsg.cmsg_len to avoid read beyond the end of allocated
object.
(printmsghdr) [HAVE_SENDMSG]: Update tprint_iov() usage.
* process.c (sys_setgroups): Check for integer overflow during
malloc size calculation, to avoid heap corruption. Change gid_t
array handling to avoid heap memory allocation.
(sys_getgroups): Likewise.
(sys_setgroups32) [LINUX]: Likewise.
(sys_getgroups32) [LINUX]: Likewise.
* stream.c (sys_poll) [HAVE_SYS_POLL_H]: Check for integer
overflow during malloc size calculation, to avoid heap corruption.
Change pollfd array handling to avoid heap memory allocation.
* system.c (sys_sysctl) [LINUX]: Check for integer overflow
during malloc size calculation, to avoid heap corruption.
* util.c (dumpiov) [HAVE_SYS_UIO_H]: Check for integer overflow
during malloc size calculation, to avoid heap corruption.
Fixes RH#159196.
* util.c (printxval): Change third argument from "char *" to
"const char *".
(printflags): Add third argument, "const char *", with similar
meaning to the third argument of printxval().
* defs.h (printxval): Change third argument from "char *" to
"const char *".
(printflags): Add third argument.
* bjm.c (sys_query_module) [LINUX]: Pass third argument to
printflags().
* desc.c (sys_fcntl): Likewise.
(sys_flock) [LOCK_SH]: Likewise.
(print_epoll_event) [HAVE_SYS_EPOLL_H]: Likewise.
* file.c (sys_open): Likewise.
(solaris_open) [LINUXSPARC]: Likewise.
(sys_access): Likewise.
(sys_chflags, sys_fchflags) [FREEBSD]: Likewise.
(realprintstat) [HAVE_LONG_LONG_OFF_T &&
HAVE_STRUCT_STAT_ST_FLAGS]: Likewise.
(printstat64) [HAVE_STAT64 &&
HAVE_STRUCT_STAT_ST_FLAGS]: Likewise.
(sys_setxattr, sys_fsetxattr): Likewise.
* ipc.c (sys_msgget, sys_msgsnd, sys_msgrcv, sys_semget,
sys_shmget, sys_shmat) [LINUX || SUNOS4 || FREEBSD]: Likewise.
(sys_mq_open) [LINUX]: Likewise.
(printmqattr) [HAVE_MQUEUE_H]: Likewise.
* mem.c (print_mmap) [!HAVE_LONG_LONG_OFF_T]: Likewise.
(sys_mmap64) [_LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T]: Likewise.
(sys_mprotect): Likewise.
(sys_mremap, sys_madvise, sys_mlockall) [LINUX]: Likewise.
(sys_msync) [MS_ASYNC]: Likewise.
(sys_mctl) [MC_SYNC]: Likewise.
(sys_remap_file_pages, sys_mbind, sys_get_mempolicy) [LINUX]:
Likewise.
* net.c (printmsghdr) [HAVE_STRUCT_MSGHDR_MSG_CONTROL]: Likewise.
(sys_send, sys_sendto): Likewise.
(sys_sendmsg) [HAVE_SENDMSG]: Likewise.
(sys_recv, sys_recvfrom): Likewise.
(sys_recvmsg) [HAVE_SENDMSG]: Likewise.
(printicmpfilter) [ICMP_FILTER]: Likewise.
* proc.c (proc_ioctl) [SVR4 && !HAVE_MP_PROCFS || FREEBSD]: Likewise.
* process.c (sys_clone) [LINUX]: Likewise.
(printwaitn): Likewise.
(sys_waitid) [SVR4 || LINUX]: Likewise.
* signal.c (sys_sigvec) [SUNOS4 || FREEBSD]: Likewise.
(sys_sigaction): Likewise.
(printcontext) [SVR4]: Likewise.
(print_stack_t) [LINUX) || FREEBSD]: Likewise.
(sys_rt_sigaction) [LINUX]: Likewise.
* sock.c (sock_ioctl) [LINUX]: Likewise.
* stream.c (sys_putmsg, sys_getmsg): Likewise.
(sys_putpmsg) [SYS_putpmsg]: Likewise.
(sys_getpmsg) [SYS_getpmsg]: Likewise.
(sys_poll): Likewise.
(print_transport_message) [TI_BIND]: Likewise.
(stream_ioctl): Likewise.
* system.c (sys_mount, sys_reboot): Likewise.
(sys_cacheflush) [LINUX && M68K]: Likewise.
(sys_capget, sys_capset) [SYS_capget]: Likewise.
* term.c (term_ioctl) [TIOCMGET]: Likewise.
* time.c (sys_clock_nanosleep, sys_timer_settime) [LINUX]:
Likewise.
Fixes RH#159310.
* bjm.c (sys_query_module) [LINUX]: Unitize "out of memory"
errors reporting style.
* strace.c (rebuild_pollv) [USE_PROCFS]: Likewise.
* system.c (sys_capget, sys_capset) [SYS_capget]: Likewise.
* util.c (printstr): Likewise.
(dumpiov) [HAVE_SYS_UIO_H]: Likewise.
(fixvfork) [SUNOS4]: Likewise.
* desc.c (decode_select): Continue to decode syscall arguments
in case of OOM condition.
* file.c (sys_getdents): Likewise.
(sys_getdents64) [_LFS64_LARGEFILE]: Likewise.
(sys_getdirentries) [FREEBSD]: Likewise.
* mem.c (sys_mincore): Changed type of variables which deal with
malloc size from int to unsigned long.
Fixes RH#159308.
2005-05-22 Dmitry V. Levin
* bjm.c [LINUX]: Do not include . It is not
safe to include kernel headers, and this one is not used anyway.
Fixes RH#158488.
2005-05-26 Roland McGrath
* system.c (sys_sysctl): Check for errors accessing user pointers.
Use malloc instead of alloca in case size is insane.
2005-05-09 Roland McGrath
* configure.ac: Check for libaio.h.
* desc.c (sys_io_setup, sys_io_submit, sys_io_cancel,
sys_io_getevents, sys_io_destroy): New functions.
* linux/syscall.h: Declare them.
* linux/syscallent.h: Use those for io_* syscalls.
* linux/alpha/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
From Zach Brown .
Fixes RH#155065.
* debian/control (Architecture): Add ppc64.
Fixes Debian bug #301089.
2005-05-05 Anton Blanchard
* process.c (ptrace_cmds): Add PTRACE_GETVRREGS and PTRACE_SETVRREGS
if defined.
2005-05-09 Roland McGrath
* strace.c (main): Refuse negative -s argument value.
Fixes Debian bug #303256.
2005-04-25 Anton Blanchard
* file.c (openmodes): Add O_NOATIME flag if defined.
2005-04-05 Anton Blanchard
* linux/powerpc/ioctlent.h: Regenerated.
* signal.c (signame): Don't try and dereference negative index.
* linux/powerpc/syscallent.h: Add debug_setcontext, vserver,
mbind, *_mempolicy, mq_*, sys_kexec_load, add_key, request_key,
keyctl, waitid, sys_semtimedop. Fix various other syscalls.
* ipc.c (shm_resource_flags): New variable, table has SHM_HUGETLB
but not IPC_NOWAIT, which have the same value.
(sys_shmget): Use that instead of resource_flags.
2005-03-22 Roland McGrath
* desc.c (decode_select): Increase local buffer size.
Fixes RH#151570.
* configure.ac, NEWS: Version 4.5.11.
* debian/changelog, strace.spec: 4.5.11-1.
* linux/arm/syscallent.h: Fix 113 entry (syscall, not vm86old).
2005-03-14 Roland McGrath
* configure.ac, NEWS: Version 4.5.10.
* debian/changelog, strace.spec: 4.5.10-1.
2005-02-26 GOTO Masanori
* linux/alpha/syscallent.h: Fix the reversed order of lstat64 and
fstat64. Clean up osf_nrecvmsg and osf_ngetsockname.
2005-02-28 Andreas Schwab
* syscall.c (getrval2): Move #ifdef IA64 inside #ifdef LINUX.
2005-03-14 Roland McGrath
* linux/mips/syscallent.h: Update various calls.
From Thiemo Seufer