From fdfb04162639193dd4fbdc9335644f11b297801f Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 12 Dec 2008 15:44:12 +0100 Subject: [PATCH] update to trunk --- .../strace-4.5.18-xxx-010-update_to_trunk.patch | 1990 ++++++++++++++++++++ 1 file changed, 1990 insertions(+) create mode 100644 package/strace/strace-4.5.18-xxx-010-update_to_trunk.patch diff --git a/package/strace/strace-4.5.18-xxx-010-update_to_trunk.patch b/package/strace/strace-4.5.18-xxx-010-update_to_trunk.patch new file mode 100644 index 0000000..959daea --- /dev/null +++ b/package/strace/strace-4.5.18-xxx-010-update_to_trunk.patch @@ -0,0 +1,1990 @@ +\\\\ +\\ cvs -d:pserver:anonymous@strace.cvs.sourceforge.net:/cvsroot/strace diff -u -rv4_5_18 strace > ../buildroot.git.pentium4/package/strace/strace-4.5.18-xxx-010-update_to_trunk.patch +\\ +Index: strace/ChangeLog +=================================================================== +RCS file: /cvsroot/strace/strace/ChangeLog,v +retrieving revision 1.570 +retrieving revision 1.590 +diff -u -r1.570 -r1.590 +--- strace/ChangeLog 28 Aug 2008 22:00:46 -0000 1.570 ++++ strace/ChangeLog 10 Dec 2008 13:51:40 -0000 1.590 +@@ -1,5 +1,140 @@ ++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. + +Index: strace/Makefile.am +=================================================================== +RCS file: /cvsroot/strace/strace/Makefile.am,v +retrieving revision 1.19 +retrieving revision 1.20 +diff -u -r1.19 -r1.20 +--- strace/Makefile.am 1 Aug 2008 01:15:24 -0000 1.19 ++++ strace/Makefile.am 10 Nov 2008 22:21:41 -0000 1.20 +@@ -34,6 +34,7 @@ + linux/arm/syscallent.h linux/arm/syscallent1.h \ + linux/arm/signalent1.h linux/arm/ioctlent1.h \ + linux/arm/errnoent1.h \ ++ linux/bfin/ioctlent.h linux/bfin/syscallent.h \ + linux/hppa/errnoent.h linux/hppa/ioctlent.h \ + linux/hppa/signalent.h linux/hppa/syscallent.h \ + linux/ia64/syscallent.h linux/ia64/errnoent.h \ +Index: strace/configure.ac +=================================================================== +RCS file: /cvsroot/strace/strace/configure.ac,v +retrieving revision 1.57 +retrieving revision 1.59 +diff -u -r1.57 -r1.59 +--- strace/configure.ac 28 Aug 2008 22:00:46 -0000 1.57 ++++ strace/configure.ac 10 Nov 2008 22:21:41 -0000 1.59 +@@ -9,7 +9,7 @@ + + AC_MSG_CHECKING([for supported operating system]) + case "$host_os" in +-linux*) ++*linux*) + opsys=linux + AC_DEFINE([LINUX], 1, [Define for the Linux operating system.]) + ;; +@@ -43,6 +43,10 @@ + + AC_MSG_CHECKING([for supported architecture]) + case "$host_cpu" in ++bfin) ++ arch=bfin ++ AC_DEFINE([BFIN], 1, [Define for the Blackfin architecture.]) ++ ;; + i[[3456]]86|pentium) + arch=i386 + AC_DEFINE([I386], 1, [Define for the i386 architecture.]) +Index: strace/defs.h +=================================================================== +RCS file: /cvsroot/strace/strace/defs.h,v +retrieving revision 1.83 +retrieving revision 1.85 +diff -u -r1.83 -r1.85 +--- strace/defs.h 1 Aug 2008 01:06:31 -0000 1.83 ++++ strace/defs.h 10 Nov 2008 22:21:41 -0000 1.85 +@@ -26,7 +26,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: defs.h,v 1.83 2008/08/01 01:06:31 roland Exp $ ++ * $Id: defs.h,v 1.85 2008/11/10 22:21:41 ldv Exp $ + */ + + #ifdef HAVE_CONFIG_H +@@ -356,7 +356,7 @@ + #define TCB_FOLLOWFORK 00400 /* Process should have forks followed */ + #define TCB_REPRINT 01000 /* We should reprint this syscall on exit */ + #ifdef LINUX +-# if defined(ALPHA) || defined(SPARC) || defined(SPARC64) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) || defined(ARM) || defined(MIPS) ++# if defined(ALPHA) || defined(SPARC) || defined(SPARC64) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) || defined(ARM) || defined(MIPS) || defined(BFIN) + # define TCB_WAITEXECVE 02000 /* ignore SIGTRAP after exceve */ + # endif + # define TCB_CLONE_DETACHED 04000 /* CLONE_DETACHED set in creating syscall */ +@@ -507,6 +507,7 @@ + extern void call_summary P((FILE *)); + extern void tprint_iov P((struct tcb *, unsigned long, unsigned long)); + extern void tprint_open_modes P((struct tcb *, mode_t)); ++extern int is_restart_error P((struct tcb *)); + + #ifdef LINUX + extern int internal_clone P((struct tcb *)); +Index: strace/desc.c +=================================================================== +RCS file: /cvsroot/strace/strace/desc.c,v +retrieving revision 1.33 +retrieving revision 1.35 +diff -u -r1.33 -r1.35 +--- strace/desc.c 1 Nov 2007 21:52:20 -0000 1.33 ++++ strace/desc.c 10 Nov 2008 22:53:02 -0000 1.35 +@@ -27,7 +27,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: desc.c,v 1.33 2007/11/01 21:52:20 roland Exp $ ++ * $Id: desc.c,v 1.35 2008/11/10 22:53:02 ldv Exp $ + */ + + #include "defs.h" +@@ -242,6 +242,8 @@ + } + #endif + ++extern const struct xlat open_mode_flags[]; ++ + /* + * low bits of the open(2) flags define access mode, + * other bits are real flags. +@@ -250,7 +252,6 @@ + sprint_open_modes(mode_t flags) + { + extern const struct xlat open_access_modes[]; +- extern const struct xlat open_mode_flags[]; + static char outstr[1024]; + const char *str = xlookup(open_access_modes, flags & 3); + const char *sep = ""; +@@ -332,12 +333,14 @@ + case F_SETOWN: case F_GETOWN: + break; + case F_GETFD: +- if (tcp->u_rval == 0) ++ if (syserror(tcp) || tcp->u_rval == 0) + return 0; + tcp->auxstr = + sprintflags("flags ", fdflags, tcp->u_rval); + return RVAL_HEX|RVAL_STR; + case F_GETFL: ++ if (syserror(tcp)) ++ return 0; + tcp->auxstr = sprint_open_modes(tcp->u_rval); + return RVAL_HEX|RVAL_STR; + case F_GETLK: +@@ -394,16 +397,33 @@ + return 0; + } + +-int +-sys_dup2(tcp) +-struct tcb *tcp; ++static int ++do_dup2(struct tcb *tcp, int flags_arg) + { + if (entering(tcp)) { + tprintf("%ld, %ld", tcp->u_arg[0], tcp->u_arg[1]); ++ if (flags_arg >= 0) { ++ tprintf(", "); ++ printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???"); ++ } + } + return 0; + } + ++int ++sys_dup2(struct tcb *tcp) ++{ ++ return do_dup2(tcp, -1); ++} ++ ++#ifdef LINUX ++int ++sys_dup3(struct tcb *tcp) ++{ ++ return do_dup2(tcp, 2); ++} ++#endif ++ + #if defined(ALPHA) || defined(FREEBSD) || defined(SUNOS4) + int + sys_getdtablesize(tcp) +@@ -603,14 +623,21 @@ + }; + + int +-sys_epoll_create(tcp) +-struct tcb *tcp; ++sys_epoll_create(struct tcb *tcp) + { + if (entering(tcp)) + tprintf("%ld", tcp->u_arg[0]); + return 0; + } + ++int ++sys_epoll_create1(struct tcb *tcp) ++{ ++ if (entering(tcp)) ++ printflags(open_mode_flags, tcp->u_arg[0], "O_???"); ++ return 0; ++} ++ + #ifdef HAVE_SYS_EPOLL_H + static void + print_epoll_event(ev) +@@ -887,12 +914,28 @@ + return rc; + } + +-int +-sys_eventfd(tcp) +-struct tcb *tcp; ++static int ++do_eventfd(struct tcb *tcp, int flags_arg) + { +- if (entering(tcp)) ++ if (entering(tcp)) { + tprintf("%lu", tcp->u_arg[0]); ++ if (flags_arg >= 0) { ++ tprintf(", "); ++ printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???"); ++ } ++ } + return 0; + } ++ ++int ++sys_eventfd(struct tcb *tcp) ++{ ++ return do_eventfd(tcp, -1); ++} ++ ++int ++sys_eventfd2(struct tcb *tcp) ++{ ++ return do_eventfd(tcp, 1); ++} + #endif +Index: strace/net.c +=================================================================== +RCS file: /cvsroot/strace/strace/net.c,v +retrieving revision 1.56 +retrieving revision 1.58 +diff -u -r1.56 -r1.58 +--- strace/net.c 1 Nov 2007 21:37:33 -0000 1.56 ++++ strace/net.c 10 Nov 2008 22:53:02 -0000 1.58 +@@ -27,7 +27,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: net.c,v 1.56 2007/11/01 21:37:33 roland Exp $ ++ * $Id: net.c,v 1.58 2008/11/10 22:53:02 ldv Exp $ + */ + + #include "defs.h" +@@ -320,17 +320,32 @@ + #ifdef SOCK_RAW + { SOCK_RAW, "SOCK_RAW" }, + #endif ++#ifdef SOCK_RDM ++ { SOCK_RDM, "SOCK_RDM" }, ++#endif + #ifdef SOCK_SEQPACKET + { SOCK_SEQPACKET,"SOCK_SEQPACKET"}, + #endif +-#ifdef SOCK_RDM +- { SOCK_RDM, "SOCK_RDM" }, ++#ifdef SOCK_DCCP ++ { SOCK_DCCP, "SOCK_DCCP" }, + #endif + #ifdef SOCK_PACKET + { SOCK_PACKET, "SOCK_PACKET" }, + #endif + { 0, NULL }, + }; ++const struct xlat sock_type_flags[] = { ++#ifdef SOCK_CLOEXEC ++ { SOCK_CLOEXEC, "SOCK_CLOEXEC" }, ++#endif ++#ifdef SOCK_NONBLOCK ++ { SOCK_NONBLOCK,"SOCK_NONBLOCK" }, ++#endif ++ { 0, NULL }, ++}; ++#ifndef SOCK_TYPE_MASK ++# define SOCK_TYPE_MASK 0xf ++#endif + static const struct xlat socketlayers[] = { + #if defined(SOL_IP) + { SOL_IP, "SOL_IP" }, +@@ -1182,14 +1197,33 @@ + + #endif /* HAVE_SENDMSG */ + ++/* ++ * low bits of the socket type define real socket type, ++ * other bits are socket type flags. ++ */ ++static void ++tprint_sock_type(struct tcb *tcp, int flags) ++{ ++ const char *str = xlookup(socktypes, flags & SOCK_TYPE_MASK); ++ ++ if (str) ++ { ++ tprintf("%s", str); ++ flags &= ~SOCK_TYPE_MASK; ++ if (!flags) ++ return; ++ tprintf("|"); ++ } ++ printflags(sock_type_flags, flags, "SOCK_???"); ++} ++ + int +-sys_socket(tcp) +-struct tcb *tcp; ++sys_socket(struct tcb *tcp) + { + if (entering(tcp)) { + printxval(domains, tcp->u_arg[0], "PF_???"); + tprintf(", "); +- printxval(socktypes, tcp->u_arg[1], "SOCK_???"); ++ tprint_sock_type(tcp, tcp->u_arg[1]); + tprintf(", "); + switch (tcp->u_arg[0]) { + case PF_INET: +@@ -1463,34 +1497,52 @@ + return sys_accept(tcp); + } + +-int +-sys_pipe(tcp) +-struct tcb *tcp; +-{ +- +-#if defined(LINUX) && !defined(SPARC) && !defined(SPARC64) && !defined(SH) && !defined(IA64) +- int fds[2]; ++extern const struct xlat open_mode_flags[]; + ++static int ++do_pipe(struct tcb *tcp, int flags_arg) ++{ + if (exiting(tcp)) { + if (syserror(tcp)) { + tprintf("%#lx", tcp->u_arg[0]); +- return 0; +- } +- if (umoven(tcp, tcp->u_arg[0], sizeof fds, (char *) fds) < 0) +- tprintf("[...]"); +- else +- tprintf("[%u, %u]", fds[0], fds[1]); +- } ++ } else { ++#if defined(LINUX) && !defined(SPARC) && !defined(SPARC64) && !defined(SH) && !defined(IA64) ++ int fds[2]; ++ ++ if (umoven(tcp, tcp->u_arg[0], sizeof fds, (char *) fds) < 0) ++ tprintf("[...]"); ++ else ++ tprintf("[%u, %u]", fds[0], fds[1]); + #elif defined(SPARC) || defined(SPARC64) || defined(SH) || defined(SVR4) || defined(FREEBSD) || defined(IA64) +- if (exiting(tcp)) +- tprintf("[%lu, %lu]", tcp->u_rval, getrval2(tcp)); ++ tprintf("[%lu, %lu]", tcp->u_rval, getrval2(tcp)); ++#else ++ tprintf("%#lx", tcp->u_arg[0]); + #endif ++ } ++ if (flags_arg >= 0) { ++ tprintf(", "); ++ printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???"); ++ } ++ } + return 0; + } + + int +-sys_socketpair(tcp) +-struct tcb *tcp; ++sys_pipe(struct tcb *tcp) ++{ ++ return do_pipe(tcp, -1); ++} ++ ++#ifdef LINUX ++int ++sys_pipe2(struct tcb *tcp) ++{ ++ return do_pipe(tcp, 1); ++} ++#endif ++ ++int ++sys_socketpair(struct tcb *tcp) + { + #ifdef LINUX + int fds[2]; +@@ -1499,7 +1551,7 @@ + if (entering(tcp)) { + printxval(domains, tcp->u_arg[0], "PF_???"); + tprintf(", "); +- printxval(socktypes, tcp->u_arg[1], "SOCK_???"); ++ tprint_sock_type(tcp, tcp->u_arg[1]); + tprintf(", "); + switch (tcp->u_arg[0]) { + case PF_INET: +Index: strace/process.c +=================================================================== +RCS file: /cvsroot/strace/strace/process.c,v +retrieving revision 1.113 +retrieving revision 1.118 +diff -u -r1.113 -r1.118 +--- strace/process.c 18 Jul 2008 02:16:47 -0000 1.113 ++++ strace/process.c 11 Nov 2008 00:25:22 -0000 1.118 +@@ -34,7 +34,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: process.c,v 1.113 2008/07/18 02:16:47 roland Exp $ ++ * $Id: process.c,v 1.118 2008/11/11 00:25:22 ldv Exp $ + */ + + #include "defs.h" +@@ -186,9 +186,6 @@ + #ifdef PR_GETNSHARE + { PR_GETNSHARE, "PR_GETNSHARE" }, + #endif +-#if defined(PR_SET_PDEATHSIG) +- { PR_SET_PDEATHSIG, "PR_SET_PDEATHSIG" }, +-#endif + #ifdef PR_COREPID + { PR_COREPID, "PR_COREPID" }, + #endif +@@ -204,6 +201,12 @@ + #ifdef PR_GET_PDEATHSIG + { PR_GET_PDEATHSIG, "PR_GET_PDEATHSIG" }, + #endif ++#ifdef PR_GET_DUMPABLE ++ { PR_GET_DUMPABLE, "PR_GET_DUMPABLE" }, ++#endif ++#ifdef PR_SET_DUMPABLE ++ { PR_SET_DUMPABLE, "PR_SET_DUMPABLE" }, ++#endif + #ifdef PR_GET_UNALIGN + { PR_GET_UNALIGN, "PR_GET_UNALIGN" }, + #endif +@@ -211,10 +214,10 @@ + { PR_SET_UNALIGN, "PR_SET_UNALIGN" }, + #endif + #ifdef PR_GET_KEEPCAPS +- { PR_GET_KEEPCAPS, "PR_GET_KEEP_CAPS" }, ++ { PR_GET_KEEPCAPS, "PR_GET_KEEPCAPS" }, + #endif + #ifdef PR_SET_KEEPCAPS +- { PR_SET_KEEPCAPS, "PR_SET_KEEP_CAPS" }, ++ { PR_SET_KEEPCAPS, "PR_SET_KEEPCAPS" }, + #endif + #ifdef PR_GET_FPEMU + { PR_GET_FPEMU, "PR_GET_FPEMU" }, +@@ -252,6 +255,18 @@ + #ifdef PR_SET_SECCOMP + { PR_SET_SECCOMP, "PR_SET_SECCOMP" }, + #endif ++#ifdef PR_GET_TSC ++ { PR_GET_TSC, "PR_GET_TSC" }, ++#endif ++#ifdef PR_SET_TSC ++ { PR_SET_TSC, "PR_SET_TSC" }, ++#endif ++#ifdef PR_GET_SECUREBITS ++ { PR_GET_SECUREBITS, "PR_GET_SECUREBITS" }, ++#endif ++#ifdef PR_SET_SECUREBITS ++ { PR_SET_SECUREBITS, "PR_SET_SECUREBITS" }, ++#endif + { 0, NULL }, + }; + +@@ -291,10 +306,24 @@ + case PR_GETNSHARE: + break; + #endif +-#ifdef PR_SET_DEATHSIG ++#ifdef PR_SET_PDEATHSIG ++ case PR_SET_PDEATHSIG: ++ tprintf(", %lu", tcp->u_arg[1]); ++ break; ++#endif ++#ifdef PR_GET_PDEATHSIG + case PR_GET_PDEATHSIG: + break; + #endif ++#ifdef PR_SET_DUMPABLE ++ case PR_SET_DUMPABLE: ++ tprintf(", %lu", tcp->u_arg[1]); ++ break; ++#endif ++#ifdef PR_GET_DUMPABLE ++ case PR_GET_DUMPABLE: ++ break; ++#endif + #ifdef PR_SET_UNALIGN + case PR_SET_UNALIGN: + tprintf(", %s", unalignctl_string(tcp->u_arg[1])); +@@ -305,6 +334,15 @@ + tprintf(", %#lx", tcp->u_arg[1]); + break; + #endif ++#ifdef PR_SET_KEEPCAPS ++ case PR_SET_KEEPCAPS: ++ tprintf(", %lu", tcp->u_arg[1]); ++ break; ++#endif ++#ifdef PR_GET_KEEPCAPS ++ case PR_GET_KEEPCAPS: ++ break; ++#endif + default: + for (i = 1; i < tcp->u_nargs; i++) + tprintf(", %#lx", tcp->u_arg[i]); +@@ -314,23 +352,26 @@ + switch (tcp->u_arg[0]) { + #ifdef PR_GET_PDEATHSIG + case PR_GET_PDEATHSIG: +- for (i=1; iu_nargs; i++) +- tprintf(", %#lx", tcp->u_arg[i]); ++ if (umove(tcp, tcp->u_arg[1], &i) < 0) ++ tprintf(", %#lx", tcp->u_arg[1]); ++ else ++ tprintf(", {%u}", i); + break; + #endif +-#ifdef PR_SET_UNALIGN +- case PR_SET_UNALIGN: +- break; ++#ifdef PR_GET_DUMPABLE ++ case PR_GET_DUMPABLE: ++ return RVAL_UDECIMAL; + #endif + #ifdef PR_GET_UNALIGN + case PR_GET_UNALIGN: +- { +- int ctl; +- +- umove(tcp, tcp->u_arg[1], &ctl); +- tcp->auxstr = unalignctl_string(ctl); ++ if (syserror(tcp) || umove(tcp, tcp->u_arg[1], &i) < 0) ++ break; ++ tcp->auxstr = unalignctl_string(i); + return RVAL_STR; +- } ++#endif ++#ifdef PR_GET_KEEPCAPS ++ case PR_GET_KEEPCAPS: ++ return RVAL_UDECIMAL; + #endif + default: + break; +@@ -466,7 +507,7 @@ + sys_fork(tcp) + struct tcb *tcp; + { +- if (exiting(tcp)) { ++ if (exiting(tcp) && !syserror(tcp)) { + if (getrval2(tcp)) { + tcp->auxstr = "child process"; + return RVAL_UDECIMAL | RVAL_STR; +@@ -484,7 +525,7 @@ + if (entering(tcp)) { + tprintf ("%ld", tcp->u_arg[0]); + } +- else { ++ else if (!syserror(tcp)) { + if (getrval2(tcp)) { + tcp->auxstr = "child process"; + return RVAL_UDECIMAL | RVAL_STR; +@@ -710,6 +751,10 @@ + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_A3), new)<0) + return -1; + return 0; ++#elif defined(BFIN) ++ if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_P0), new)<0) ++ return -1; ++ return 0; + #elif defined(IA64) + if (ia32) { + switch (new) { +@@ -3004,7 +3049,7 @@ + { 70, "fpeir" }, + #endif + +-#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) ++#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) && !defined(BFIN) + { uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" }, + #endif + #if defined(I386) || defined(X86_64) +@@ -3033,7 +3078,7 @@ + #if !defined(SPARC64) + { uoff(u_ar0), "offsetof(struct user, u_ar0)" }, + #endif +-#if !defined(ARM) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) ++#if !defined(ARM) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) && !defined(BFIN) + { uoff(u_fpstate), "offsetof(struct user, u_fpstate)" }, + #endif + { uoff(magic), "offsetof(struct user, magic)" }, +Index: strace/signal.c +=================================================================== +RCS file: /cvsroot/strace/strace/signal.c,v +retrieving revision 1.68 +retrieving revision 1.70 +diff -u -r1.68 -r1.70 +--- strace/signal.c 20 Aug 2008 01:59:40 -0000 1.68 ++++ strace/signal.c 10 Nov 2008 22:53:03 -0000 1.70 +@@ -30,7 +30,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: signal.c,v 1.68 2008/08/20 01:59:40 roland Exp $ ++ * $Id: signal.c,v 1.70 2008/11/10 22:53:03 ldv Exp $ + */ + + #include "defs.h" +@@ -1199,7 +1199,7 @@ + } + return 0; + } +- else { ++ else if (!syserror(tcp)) { + switch (tcp->u_rval) { + case (long) SIG_ERR: + tcp->auxstr = "SIG_ERR"; break; +@@ -1212,6 +1212,7 @@ + } + return RVAL_HEX | RVAL_STR; + } ++ return 0; + } + + #ifdef SVR4 +@@ -2010,15 +2011,32 @@ + return 0; + } + +-int +-sys_signalfd(tcp) +-struct tcb *tcp; ++extern const struct xlat open_mode_flags[]; ++ ++static int ++do_signalfd(struct tcb *tcp, int flags_arg) + { + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + print_sigset(tcp, tcp->u_arg[1], 1); + tprintf("%lu", tcp->u_arg[2]); ++ if (flags_arg >= 0) { ++ tprintf(", "); ++ printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???"); ++ } + } + return 0; + } ++ ++int ++sys_signalfd(struct tcb *tcp) ++{ ++ return do_signalfd(tcp, -1); ++} ++ ++int ++sys_signalfd4(struct tcb *tcp) ++{ ++ return do_signalfd(tcp, 3); ++} + #endif /* LINUX */ +Index: strace/sock.c +=================================================================== +RCS file: /cvsroot/strace/strace/sock.c,v +retrieving revision 1.14 +retrieving revision 1.15 +diff -u -r1.14 -r1.15 +--- strace/sock.c 21 Mar 2007 14:18:19 -0000 1.14 ++++ strace/sock.c 10 Dec 2008 13:51:40 -0000 1.15 +@@ -24,7 +24,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: sock.c,v 1.14 2007/03/21 14:18:19 ldv Exp $ ++ * $Id: sock.c,v 1.15 2008/12/10 13:51:40 ldv Exp $ + */ + + #include "defs.h" +@@ -134,26 +134,38 @@ + return 1; + #ifdef LINUX + case SIOCGIFNAME: ++ case SIOCSIFNAME: + case SIOCGIFINDEX: + case SIOCGIFADDR: ++ case SIOCSIFADDR: + case SIOCGIFDSTADDR: ++ case SIOCSIFDSTADDR: + case SIOCGIFBRDADDR: ++ case SIOCSIFBRDADDR: + case SIOCGIFNETMASK: ++ case SIOCSIFNETMASK: + case SIOCGIFFLAGS: ++ case SIOCSIFFLAGS: + case SIOCGIFMETRIC: ++ case SIOCSIFMETRIC: + case SIOCGIFMTU: ++ case SIOCSIFMTU: + case SIOCGIFSLAVE: ++ case SIOCSIFSLAVE: + case SIOCGIFHWADDR: ++ case SIOCSIFHWADDR: + case SIOCGIFTXQLEN: ++ case SIOCSIFTXQLEN: + case SIOCGIFMAP: ++ case SIOCSIFMAP: + if (umove(tcp, tcp->u_arg[2], &ifr) < 0) + tprintf(", %#lx", tcp->u_arg[2]); + else if (syserror(tcp)) { +- if (code == SIOCGIFNAME) ++ if (code == SIOCGIFNAME || code == SIOCSIFNAME) + tprintf(", {ifr_index=%d, ifr_name=???}", ifr.ifr_ifindex); + else + tprintf(", {ifr_name=\"%s\", ???}", ifr.ifr_name); +- } else if (code == SIOCGIFNAME) ++ } else if (code == SIOCGIFNAME || code == SIOCSIFNAME) + tprintf(", {ifr_index=%d, ifr_name=\"%s\"}", + ifr.ifr_ifindex, ifr.ifr_name); + else { +@@ -163,15 +175,19 @@ + tprintf("ifr_index=%d", ifr.ifr_ifindex); + break; + case SIOCGIFADDR: ++ case SIOCSIFADDR: + str = "ifr_addr"; + case SIOCGIFDSTADDR: +- if (str == NULL) ++ case SIOCSIFDSTADDR: ++ if (!str) + str = "ifr_dstaddr"; + case SIOCGIFBRDADDR: +- if (str == NULL) ++ case SIOCSIFBRDADDR: ++ if (!str) + str = "ifr_broadaddr"; + case SIOCGIFNETMASK: +- if (str == NULL) ++ case SIOCSIFNETMASK: ++ if (!str) + str = "ifr_netmask"; + tprintf("%s={", str); + printxval(addrfams, +@@ -185,6 +201,7 @@ + tprintf("}"); + break; + case SIOCGIFHWADDR: ++ case SIOCSIFHWADDR: + /* XXX Are there other hardware addresses + than 6-byte MACs? */ + bytes = (unsigned char *) &ifr.ifr_hwaddr.sa_data; +@@ -193,22 +210,28 @@ + bytes[3], bytes[4], bytes[5]); + break; + case SIOCGIFFLAGS: ++ case SIOCSIFFLAGS: + tprintf("ifr_flags="); + printflags(iffflags, ifr.ifr_flags, "IFF_???"); + break; + case SIOCGIFMETRIC: ++ case SIOCSIFMETRIC: + tprintf("ifr_metric=%d", ifr.ifr_metric); + break; + case SIOCGIFMTU: ++ case SIOCSIFMTU: + tprintf("ifr_mtu=%d", ifr.ifr_mtu); + break; + case SIOCGIFSLAVE: ++ case SIOCSIFSLAVE: + tprintf("ifr_slave=\"%s\"", ifr.ifr_slave); + break; + case SIOCGIFTXQLEN: ++ case SIOCSIFTXQLEN: + tprintf("ifr_qlen=%d", ifr.ifr_qlen); + break; + case SIOCGIFMAP: ++ case SIOCSIFMAP: + tprintf("ifr_map={mem_start=%#lx, " + "mem_end=%#lx, base_addr=%#x, " + "irq=%u, dma=%u, port=%u}", +Index: strace/strace.1 +=================================================================== +RCS file: /cvsroot/strace/strace/strace.1,v +retrieving revision 1.16 +retrieving revision 1.20 +diff -u -r1.16 -r1.20 +--- strace/strace.1 18 Jul 2008 00:25:10 -0000 1.16 ++++ strace/strace.1 10 Dec 2008 06:09:29 -0000 1.20 +@@ -25,7 +25,7 @@ + .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + .\" +-.\" $Id: strace.1,v 1.16 2008/07/18 00:25:10 roland Exp $ ++.\" $Id: strace.1,v 1.20 2008/12/10 06:09:29 roland Exp $ + .\" + .de CW + .sp +@@ -147,6 +147,26 @@ + --- SIGINT (Interrupt) --- + +++ killed by SIGINT +++ + .CE ++If a system call is being executed and meanwhile another one is being called ++from a different thread/process then ++.B strace ++will try to preserve the order of those events and mark the ongoing call as ++being \fIunfinished\fP. When the call returns it will be marked as ++\fIresumed\fP. ++.CW ++[pid 28772] select(4, [3], NULL, NULL, NULL ++[pid 28779] clock_gettime(CLOCK_REALTIME, {1130322148, 939977000}) = 0 ++[pid 28772] <... select resumed> ) = 1 (in [3]) ++.CE ++Interruption of a (restartable) system call by a signal delivery is processed ++differently as kernel terminates the system call and also arranges its ++immediate reexecution after the signal handler completes. ++.CW ++read(0, 0x7ffff72cf5cf, 1) = ? ERESTARTSYS (To be restarted) ++--- SIGALRM (Alarm clock) @ 0 (0) --- ++rt_sigreturn(0xe) = 0 ++read(0, ""..., 1) = 0 ++.CE + Arguments are printed in symbolic form with a passion. + This example shows the shell performing ``>>xyzzy'' output redirection: + .CW +@@ -533,6 +553,25 @@ + .IR var + from the inherited list of environment variables before passing it on to + the command. ++.SH DIAGNOSTICS ++When ++.I command ++exits, ++.B strace ++exits with the same exit status. ++If ++.I command ++is terminated by a signal, ++.B strace ++terminates itself with the same signal, so that ++.B strace ++can be used as a wrapper process transparent to the invoking parent process. ++.LP ++When using ++.BR -p , ++the exit status of ++.B strace ++is zero unless there was an unexpected error in doing the tracing. + .SH "SETUID INSTALLATION" + If + .B strace +@@ -653,6 +692,12 @@ + .B strace + to Irix + and tired of writing about himself in the third person. ++.SH BUGS ++The SIGTRAP signal is used internally by the kernel implementation of ++system call tracing. When a traced process receives a SIGTRAP signal not ++associated with tracing, strace will not report that signal correctly. ++This signal is not normally used by programs, but could be via a hard-coded ++break instruction or via kill(2). + .SH PROBLEMS + Problems with + .B strace +Index: strace/strace.c +=================================================================== +RCS file: /cvsroot/strace/strace/strace.c,v +retrieving revision 1.88 +retrieving revision 1.89 +diff -u -r1.88 -r1.89 +--- strace/strace.c 6 Aug 2008 21:38:52 -0000 1.88 ++++ strace/strace.c 10 Nov 2008 17:14:58 -0000 1.89 +@@ -27,7 +27,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: strace.c,v 1.88 2008/08/06 21:38:52 kratochvil Exp $ ++ * $Id: strace.c,v 1.89 2008/11/10 17:14:58 ldv Exp $ + */ + + #include "defs.h" +@@ -85,6 +85,9 @@ + /* Sometimes we want to print only succeeding syscalls. */ + int not_failing_only = 0; + ++static int exit_code = 0; ++static int strace_child = 0; ++ + static char *username = NULL; + uid_t run_uid; + gid_t run_gid; +@@ -523,7 +526,8 @@ + progname, filename); + exit(1); + } +- switch (pid = fork()) { ++ strace_child = pid = fork(); ++ switch (pid) { + case -1: + perror("strace: fork"); + cleanup(); +@@ -879,7 +883,17 @@ + if (trace() < 0) + exit(1); + cleanup(); +- exit(0); ++ fflush(NULL); ++ if (exit_code > 0xff) { ++ /* Child was killed by a signal, mimic that. */ ++ exit_code &= 0xff; ++ signal(exit_code, SIG_DFL); ++ raise(exit_code); ++ /* Paranoia - what if this signal is not fatal? ++ Exit with 128 + signo then. */ ++ exit_code += 128; ++ } ++ exit(exit_code); + } + + int +@@ -1783,7 +1797,7 @@ + switch (fork()) { + case -1: + perror("fork"); +- _exit(0); ++ _exit(1); + case 0: + break; + default: +@@ -1807,7 +1821,7 @@ + + if (getrlimit(RLIMIT_NOFILE, &rl) < 0) { + perror("getrlimit(RLIMIT_NOFILE, ...)"); +- _exit(0); ++ _exit(1); + } + n = rl.rlim_cur; + for (i = 0; i < n; i++) { +@@ -2322,6 +2336,8 @@ + continue; + } + if (WIFSIGNALED(status)) { ++ if (pid == strace_child) ++ exit_code = 0x100 | WTERMSIG(status); + if (!cflag + && (qual_flags[WTERMSIG(status)] & QUAL_SIGNAL)) { + printleader(tcp); +@@ -2341,6 +2357,8 @@ + continue; + } + if (WIFEXITED(status)) { ++ if (pid == strace_child) ++ exit_code = WEXITSTATUS(status); + if (debug) + fprintf(stderr, "pid %u exited\n", pid); + if ((tcp->flags & TCB_ATTACHED) +Index: strace/strace.spec +=================================================================== +RCS file: /cvsroot/strace/strace/strace.spec,v +retrieving revision 1.44 +retrieving revision 1.45 +diff -u -r1.44 -r1.45 +--- strace/strace.spec 28 Aug 2008 22:00:46 -0000 1.44 ++++ strace/strace.spec 28 Aug 2008 23:26:21 -0000 1.45 +@@ -55,8 +55,15 @@ + # remove unpackaged files from the buildroot + rm -f %{buildroot}%{_bindir}/strace-graph + ++%define copy64 ln ++%if 0%{?rhel} ++%if 0%{?rhel} < 6 ++%endif ++%define copy64 cp -p ++%endif ++ + %ifarch %{strace64_arches} +-ln %{buildroot}%{_bindir}/strace %{buildroot}%{_bindir}/strace64 ++%{copy64} %{buildroot}%{_bindir}/strace %{buildroot}%{_bindir}/strace64 + %endif + + %clean +Index: strace/stream.c +=================================================================== +RCS file: /cvsroot/strace/strace/stream.c,v +retrieving revision 1.28 +retrieving revision 1.29 +diff -u -r1.28 -r1.29 +--- strace/stream.c 1 Nov 2007 21:50:54 -0000 1.28 ++++ strace/stream.c 3 Sep 2008 01:22:18 -0000 1.29 +@@ -25,7 +25,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: stream.c,v 1.28 2007/11/01 21:50:54 roland Exp $ ++ * $Id: stream.c,v 1.29 2008/09/03 01:22:18 ldv Exp $ + */ + + #include "defs.h" +@@ -1177,7 +1177,7 @@ + } + if (exiting(tcp)) { + tprintf("}"); +- if (timod && tcp->u_rval) { ++ if (timod && tcp->u_rval && !syserror(tcp)) { + tcp->auxstr = xlookup (tli_errors, tcp->u_rval); + return RVAL_STR + 1; + } +Index: strace/syscall.c +=================================================================== +RCS file: /cvsroot/strace/strace/syscall.c,v +retrieving revision 1.96 +retrieving revision 1.99 +diff -u -r1.96 -r1.99 +--- strace/syscall.c 25 Aug 2008 03:16:26 -0000 1.96 ++++ strace/syscall.c 10 Nov 2008 22:21:41 -0000 1.99 +@@ -30,7 +30,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: syscall.c,v 1.96 2008/08/25 03:16:26 roland Exp $ ++ * $Id: syscall.c,v 1.99 2008/11/10 22:21:41 ldv Exp $ + */ + + #include "defs.h" +@@ -746,6 +746,8 @@ + static long result,flags; + #elif defined (M68K) + static int d0; ++#elif defined(BFIN) ++ static long r0; + #elif defined (ARM) + static struct pt_regs regs; + #elif defined (ALPHA) +@@ -899,6 +901,12 @@ + return 0; + } + } ++#elif defined(BFIN) ++ if (upeek(pid, PT_ORIG_P0, &scno)) ++ return -1; ++ /* Check if we return from execve. */ ++ if (tcp->flags & TCB_WAITEXECVE && tcp->flags & TCB_INSYSCALL) ++ tcp->flags &= ~(TCB_INSYSCALL | TCB_WAITEXECVE); + #elif defined (I386) + if (upeek(pid, 4*ORIG_EAX, &scno) < 0) + return -1; +@@ -1455,6 +1463,9 @@ + /* + * Nothing required + */ ++#elif defined(BFIN) ++ if (upeek(pid, PT_R0, &r0) < 0) ++ return -1; + #elif defined (HPPA) + if (upeek(pid, PT_GR28, &r28) < 0) + return -1; +@@ -1588,6 +1599,15 @@ + u_error = 0; + } + #else /* !ARM */ ++#ifdef BFIN ++ if (is_negated_errno(r0)) { ++ tcp->u_rval = -1; ++ u_error = -r0; ++ } else { ++ tcp->u_rval = r0; ++ u_error = 0; ++ } ++#else /* !BFIN */ + #ifdef ALPHA + if (a3) { + tcp->u_rval = -1; +@@ -1655,6 +1675,7 @@ + #endif /* SPARC */ + #endif /* SPARC64 */ + #endif /* ALPHA */ ++#endif /* BFIN */ + #endif /* ARM */ + #endif /* M68K */ + #endif /* POWERPC */ +@@ -1781,6 +1802,11 @@ + return -1; + } + #else /* !IA64 */ ++#ifdef BFIN ++ r0 = error ? -error : rval; ++ if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)PT_R0, r0) < 0) ++ return -1; ++#else /* !BFIN */ + #ifdef MIPS + if (error) { + r2 = error; +@@ -1885,6 +1911,7 @@ + #endif /* M68K */ + #endif /* POWERPC */ + #endif /* MIPS */ ++#endif /* BFIN */ + #endif /* IA64 */ + #endif /* X86_64 */ + #endif /* I386 */ +@@ -2116,6 +2143,20 @@ + for (i = 0; i < tcp->u_nargs; i++) + tcp->u_arg[i] = regs.uregs[i]; + } ++#elif defined(BFIN) ++ { ++ int i; ++ int argreg[] = {PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5}; ++ ++ if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1) ++ tcp->u_nargs = sysent[tcp->scno].nargs; ++ else ++ tcp->u_nargs = sizeof(argreg) / sizeof(argreg[0]); ++ ++ for (i = 0; i < tcp->u_nargs; ++i) ++ if (upeek(pid, argreg[i], &tcp->u_arg[i]) < 0) ++ return -1; ++ } + #elif defined(SH) + { + int i; +@@ -2369,6 +2410,8 @@ + strerror(u_error)); + break; + } ++ if ((sys_res & RVAL_STR) && tcp->auxstr) ++ tprintf(" (%s)", tcp->auxstr); + } + else { + if (sys_res & RVAL_NONE) +@@ -2641,3 +2684,22 @@ + return 0; + } + #endif /* SUNOS4 */ ++ ++int ++is_restart_error(struct tcb *tcp) ++{ ++#ifdef LINUX ++ if (!syserror(tcp)) ++ return 0; ++ switch (tcp->u_error) { ++ case ERESTARTSYS: ++ case ERESTARTNOINTR: ++ case ERESTARTNOHAND: ++ case ERESTART_RESTARTBLOCK: ++ return 1; ++ default: ++ break; ++ } ++#endif /* LINUX */ ++ return 0; ++} +Index: strace/system.c +=================================================================== +RCS file: /cvsroot/strace/strace/system.c,v +retrieving revision 1.43 +retrieving revision 1.45 +diff -u -r1.43 -r1.45 +--- strace/system.c 16 Jan 2007 15:10:08 -0000 1.43 ++++ strace/system.c 11 Nov 2008 00:21:09 -0000 1.45 +@@ -27,7 +27,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: system.c,v 1.43 2007/01/16 15:10:08 ldv Exp $ ++ * $Id: system.c,v 1.45 2008/11/11 00:21:09 ldv Exp $ + */ + + #include "defs.h" +@@ -293,6 +293,33 @@ + } + #endif /* M68K */ + ++#ifdef BFIN ++ ++#include ++ ++static const struct xlat sram_alloc_flags[] = { ++ { L1_INST_SRAM, "L1_INST_SRAM" }, ++ { L1_DATA_A_SRAM, "L1_DATA_A_SRAM" }, ++ { L1_DATA_B_SRAM, "L1_DATA_B_SRAM" }, ++ { L1_DATA_SRAM, "L1_DATA_SRAM" }, ++ { 0, NULL }, ++}; ++ ++int ++sys_sram_alloc(tcp) ++struct tcb *tcp; ++{ ++ if (entering(tcp)) { ++ /* size */ ++ tprintf("%zu, ", tcp->u_arg[0]); ++ /* flags */ ++ printxval(sram_alloc_flags, tcp->u_arg[1], "L1_???_SRAM"); ++ } ++ return 1; ++} ++ ++#endif ++ + #endif /* LINUX */ + + #ifdef SUNOS4 +@@ -1480,6 +1507,21 @@ + { 1<u_arg[0]); ++ tprintf(", "); ++ } else { ++ if (!tcp->u_arg[1] || is_restart_error(tcp)) ++ print_timespec(tcp, tcp->u_arg[1]); ++ else ++ tprintf("%#lx", tcp->u_arg[1]); ++ } ++ return 0; ++} ++ + static const struct xlat which[] = { + { ITIMER_REAL, "ITIMER_REAL" }, + { ITIMER_VIRTUAL,"ITIMER_VIRTUAL"}, +@@ -659,6 +674,8 @@ + tprintf("%#lx", tcp->u_arg[0]); + else if (tprint_timex(tcp, tcp->u_arg[0]) < 0) + tprintf("{...}"); ++ if (syserror(tcp)) ++ return 0; + tcp->auxstr = xlookup(adjtimex_state, tcp->u_rval); + if (tcp->auxstr) + return RVAL_STR; +Index: strace/util.c +=================================================================== +RCS file: /cvsroot/strace/strace/util.c,v +retrieving revision 1.79 +retrieving revision 1.81 +diff -u -r1.79 -r1.81 +--- strace/util.c 6 Aug 2008 21:43:35 -0000 1.79 ++++ strace/util.c 10 Nov 2008 23:19:13 -0000 1.81 +@@ -30,7 +30,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: util.c,v 1.79 2008/08/06 21:43:35 kratochvil Exp $ ++ * $Id: util.c,v 1.81 2008/11/10 23:19:13 ldv Exp $ + */ + + #include "defs.h" +@@ -407,6 +407,12 @@ + + static char path[MAXPATHLEN + 1]; + ++/* ++ * Quote string `instr' of length `size' ++ * Write up to (3 + `size' * 4) bytes to `outstr' buffer. ++ * If `len' < 0, treat `instr' as a NUL-terminated string ++ * and quote at most (`size' - 1) bytes. ++ */ + static int + string_quote(const char *instr, char *outstr, int len, int size) + { +@@ -417,12 +423,18 @@ + if (xflag > 1) + usehex = 1; + else if (xflag) { ++ /* Check for presence of symbol which require ++ to hex-quote the whole string. */ + for (i = 0; i < size; ++i) { + c = ustr[i]; +- if (len < 0 && i == size - 2 && c != '\0') +- ++i; +- if (len < 0 && c == '\0') +- break; ++ /* Check for NUL-terminated string. */ ++ if (len < 0) { ++ if (c == '\0') ++ break; ++ /* Quote at most size - 1 bytes. */ ++ if (i == size - 1) ++ continue; ++ } + if (!isprint(c) && !isspace(c)) { + usehex = 1; + break; +@@ -433,20 +445,31 @@ + *s++ = '\"'; + + if (usehex) { ++ /* Hex-quote the whole string. */ + for (i = 0; i < size; ++i) { + c = ustr[i]; +- if (len < 0 && c == '\0') +- break; ++ /* Check for NUL-terminated string. */ ++ if (len < 0) { ++ if (c == '\0') ++ break; ++ /* Quote at most size - 1 bytes. */ ++ if (i == size - 1) ++ continue; ++ } + sprintf(s, "\\x%02x", c); + s += 4; + } + } else { + for (i = 0; i < size; ++i) { + c = ustr[i]; +- if (len < 0 && i == size - 2 && c != '\0') +- ++i; +- if (len < 0 && c == '\0') +- break; ++ /* Check for NUL-terminated string. */ ++ if (len < 0) { ++ if (c == '\0') ++ break; ++ /* Quote at most size - 1 bytes. */ ++ if (i == size - 1) ++ continue; ++ } + switch (c) { + case '\"': case '\\': + *s++ = '\\'; +@@ -495,18 +518,25 @@ + return i == size; + } + ++/* ++ * Print path string specified by address `addr' and length `n'. ++ * If path length exceeds `n', append `...' to the output. ++ */ + void + printpathn(struct tcb *tcp, long addr, int n) + { +- if (n > sizeof path - 1) +- n = sizeof path - 1; +- +- if (addr == 0) { ++ if (!addr) { + tprintf("NULL"); + return; + } + ++ /* Cap path length to the path buffer size, ++ and NUL-terminate the buffer. */ ++ if (n > sizeof path - 1) ++ n = sizeof path - 1; + path[n] = '\0'; ++ ++ /* Fetch one byte more to find out whether path length > n. */ + if (umovestr(tcp, addr, n + 1, path) < 0) + tprintf("%#lx", addr); + else { +@@ -515,7 +545,8 @@ + + if (trunc) + path[n] = '\0'; +- if (string_quote(path, outstr, -1, n + 1) || trunc) ++ (void) string_quote(path, outstr, -1, n + 1); ++ if (trunc) + strcat(outstr, "..."); + tprintf("%s", outstr); + } +@@ -527,6 +558,11 @@ + printpathn(tcp, addr, sizeof path - 1); + } + ++/* ++ * Print string specified by address `addr' and length `len'. ++ * If `len' < 0, treat the string as a NUL-terminated string. ++ * If string length exceeds `max_strlen', append `...' to the output. ++ */ + void + printstr(struct tcb *tcp, long addr, int len) + { +@@ -538,32 +574,39 @@ + tprintf("NULL"); + return; + } +- if (!str) { +- if ((str = malloc(max_strlen + 1)) == NULL +- || (outstr = malloc(4*max_strlen +- + sizeof "\"\"...")) == NULL) { +- fprintf(stderr, "out of memory\n"); +- tprintf("%#lx", addr); +- return; +- } ++ /* Allocate static buffers if they are not allocated yet. */ ++ if (!str) ++ str = malloc(max_strlen + 1); ++ if (!outstr) ++ outstr = malloc(4 * max_strlen + sizeof "\"...\""); ++ if (!str || !outstr) { ++ fprintf(stderr, "out of memory\n"); ++ tprintf("%#lx", addr); ++ return; + } + + if (len < 0) { ++ /* ++ * Treat as a NUL-terminated string: fetch one byte more ++ * because string_quote() quotes one byte less. ++ */ + size = max_strlen + 1; ++ str[max_strlen] = '\0'; + if (umovestr(tcp, addr, size, str) < 0) { + tprintf("%#lx", addr); + return; + } + } + else { +- size = MIN(len, max_strlen + 1); ++ size = MIN(len, max_strlen); + if (umoven(tcp, addr, size, str) < 0) { + tprintf("%#lx", addr); + return; + } + } + +- if (string_quote(str, outstr, len, size)) ++ if (string_quote(str, outstr, len, size) && ++ (len < 0 || len > max_strlen)) + strcat(outstr, "..."); + + tprintf("%s", outstr); +@@ -1068,6 +1111,9 @@ + #elif defined(ARM) + if (upeek(tcp->pid, 4*15, &pc) < 0) + return -1; ++#elif defined(BFIN) ++ if (upeek(tcp->pid, REG_PC, &pc) < 0) ++ return -1; + #elif defined(POWERPC) + if (upeek(tcp->pid, sizeof(unsigned long)*PT_NIP, &pc) < 0) + return -1; +@@ -1245,6 +1291,14 @@ + return; + } + tprintf("[%08lx] ", pc); ++#elif defined(BFIN) ++ long pc; ++ ++ if (upeek(tcp->pid, PT_PC, &pc) < 0) { ++ PRINTBADPC; ++ return; ++ } ++ tprintf("[%08lx] ", pc); + #endif /* !architecture */ + #endif /* LINUX */ + +Index: strace/linux/dummy.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/dummy.h,v +retrieving revision 1.18 +retrieving revision 1.19 +diff -u -r1.18 -r1.19 +--- strace/linux/dummy.h 5 Jul 2007 19:28:35 -0000 1.18 ++++ strace/linux/dummy.h 3 Sep 2008 01:02:47 -0000 1.19 +@@ -25,7 +25,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: dummy.h,v 1.18 2007/07/05 19:28:35 roland Exp $ ++ * $Id: dummy.h,v 1.19 2008/09/03 01:02:47 ldv Exp $ + */ + + /* still unfinished */ +@@ -58,7 +58,6 @@ + #define sys_fchdir sys_close + #define sys_setfsuid sys_setuid + #define sys_setfsgid sys_setgid +-#define sys_nanosleep sys_adjtime + #define sys_acct sys_chdir + #define sys_fdatasync sys_close + #define sys_mlock sys_munmap +Index: strace/linux/syscall.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/syscall.h,v +retrieving revision 1.59 +retrieving revision 1.61 +diff -u -r1.59 -r1.61 +--- strace/linux/syscall.h 25 Aug 2008 03:15:43 -0000 1.59 ++++ strace/linux/syscall.h 10 Nov 2008 22:53:03 -0000 1.61 +@@ -25,7 +25,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: syscall.h,v 1.59 2008/08/25 03:15:43 roland Exp $ ++ * $Id: syscall.h,v 1.61 2008/11/10 22:53:03 ldv Exp $ + */ + + #include "dummy.h" +@@ -105,6 +105,7 @@ + int sys_utimensat(), sys_epoll_pwait(), sys_signalfd(), sys_timerfd(), sys_eventfd(); + int sys_getcpu(); + int sys_fallocate(), sys_timerfd_create(), sys_timerfd_settime(), sys_timerfd_gettime(); ++int sys_signalfd4(), sys_eventfd2(), sys_epoll_create1(), sys_dup3(), sys_pipe2(); + + /* sys_socketcall subcalls */ + +@@ -326,3 +327,7 @@ + #ifdef POWERPC + int sys_subpage_prot(); + #endif ++ ++#ifdef BFIN ++int sys_sram_alloc(); ++#endif +Index: strace/linux/syscallent.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/syscallent.h,v +retrieving revision 1.54 +retrieving revision 1.56 +diff -u -r1.54 -r1.56 +--- strace/linux/syscallent.h 18 Jul 2008 01:23:49 -0000 1.54 ++++ strace/linux/syscallent.h 10 Nov 2008 22:53:03 -0000 1.56 +@@ -25,7 +25,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: syscallent.h,v 1.54 2008/07/18 01:23:49 roland Exp $ ++ * $Id: syscallent.h,v 1.56 2008/11/10 22:53:03 ldv Exp $ + */ + + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ +@@ -200,7 +200,7 @@ + { 3, 0, printargs, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ +- { 5, 0, printargs, "prctl" }, /* 172 */ ++ { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 1, TS, printargs, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ +@@ -357,12 +357,12 @@ + { 6, TF, sys_fallocate, "fallocate" }, /* 324 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 325 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 326 */ +- { 5, 0, printargs, "SYS_327" }, /* 327 */ +- { 5, 0, printargs, "SYS_328" }, /* 328 */ +- { 5, 0, printargs, "SYS_329" }, /* 329 */ +- { 5, 0, printargs, "SYS_330" }, /* 330 */ +- { 5, 0, printargs, "SYS_331" }, /* 331 */ +- { 5, 0, printargs, "SYS_332" }, /* 332 */ ++ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 327 */ ++ { 2, TD, sys_eventfd2, "eventfd2" }, /* 328 */ ++ { 1, 0, sys_epoll_create1, "epoll_create1" }, /* 329 */ ++ { 3, TD, sys_dup3, "dup3" }, /* 330 */ ++ { 2, TD, sys_pipe2, "pipe2" }, /* 331 */ ++ { 1, TD, printargs, "inotify_init1" }, /* 332 */ + { 5, 0, printargs, "SYS_333" }, /* 333 */ + { 5, 0, printargs, "SYS_334" }, /* 334 */ + { 5, 0, printargs, "SYS_335" }, /* 335 */ +Index: strace/linux/alpha/syscallent.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/alpha/syscallent.h,v +retrieving revision 1.22 +retrieving revision 1.23 +diff -u -r1.22 -r1.23 +--- strace/linux/alpha/syscallent.h 18 Jul 2008 01:23:49 -0000 1.22 ++++ strace/linux/alpha/syscallent.h 3 Sep 2008 00:52:47 -0000 1.23 +@@ -25,7 +25,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: syscallent.h,v 1.22 2008/07/18 01:23:49 roland Exp $ ++ * $Id: syscallent.h,v 1.23 2008/09/03 00:52:47 ldv Exp $ + */ + + { 6, 0, printargs, "osf_syscall" }, /* 0, not implemented */ +@@ -376,7 +376,7 @@ + { 5, 0, printargs, "pciconfig_read" }, /* 345 */ + { 5, 0, printargs, "pciconfig_write" }, /* 346 */ + { 5, 0, sys_query_module, "query_module" }, /* 347 */ +- { 5, 0, printargs, "prctl" }, /* 348 */ ++ { 5, 0, sys_prctl, "prctl" }, /* 348 */ + { 5, TD, sys_pread, "pread" }, /* 349 */ + { 5, TD, sys_pwrite, "pwrite" }, /* 350 */ + { 1, TS, printargs, "rt_sigreturn" }, /* 351 */ +Index: strace/linux/arm/syscallent.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/arm/syscallent.h,v +retrieving revision 1.15 +retrieving revision 1.16 +diff -u -r1.15 -r1.16 +--- strace/linux/arm/syscallent.h 18 Jul 2008 01:23:49 -0000 1.15 ++++ strace/linux/arm/syscallent.h 3 Sep 2008 00:52:47 -0000 1.16 +@@ -25,7 +25,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: syscallent.h,v 1.15 2008/07/18 01:23:49 roland Exp $ ++ * $Id: syscallent.h,v 1.16 2008/09/03 00:52:47 ldv Exp $ + */ + + { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 0 */ +@@ -200,7 +200,7 @@ + { 3, 0, printargs, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ +- { 5, 0, printargs, "prctl" }, /* 172 */ ++ { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 1, TS, printargs, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ +Index: strace/linux/m68k/syscallent.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/m68k/syscallent.h,v +retrieving revision 1.7 +retrieving revision 1.8 +diff -u -r1.7 -r1.8 +--- strace/linux/m68k/syscallent.h 18 Jul 2008 01:23:49 -0000 1.7 ++++ strace/linux/m68k/syscallent.h 3 Sep 2008 00:52:47 -0000 1.8 +@@ -25,7 +25,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: syscallent.h,v 1.7 2008/07/18 01:23:49 roland Exp $ ++ * $Id: syscallent.h,v 1.8 2008/09/03 00:52:47 ldv Exp $ + */ + + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ +@@ -200,7 +200,7 @@ + { 3, 0, printargs, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ +- { 5, 0, printargs, "prctl" }, /* 172 */ ++ { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 1, TS, printargs, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ +Index: strace/linux/powerpc/syscallent.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/powerpc/syscallent.h,v +retrieving revision 1.35 +retrieving revision 1.36 +diff -u -r1.35 -r1.36 +--- strace/linux/powerpc/syscallent.h 25 Aug 2008 03:09:16 -0000 1.35 ++++ strace/linux/powerpc/syscallent.h 3 Sep 2008 00:52:47 -0000 1.36 +@@ -25,7 +25,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: syscallent.h,v 1.35 2008/08/25 03:09:16 roland Exp $ ++ * $Id: syscallent.h,v 1.36 2008/09/03 00:52:47 ldv Exp $ + */ + + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ +@@ -199,7 +199,7 @@ + { 3, 0, printargs, "nfsservctl" }, /* 168 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 169 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 170 */ +- { 5, 0, printargs, "prctl" }, /* 171 */ ++ { 5, 0, sys_prctl, "prctl" }, /* 171 */ + { 1, TS, printargs, "rt_sigreturn" }, /* 172 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 173 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 174 */ +Index: strace/linux/s390/syscallent.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/s390/syscallent.h,v +retrieving revision 1.24 +retrieving revision 1.25 +diff -u -r1.24 -r1.25 +--- strace/linux/s390/syscallent.h 18 Jul 2008 01:23:49 -0000 1.24 ++++ strace/linux/s390/syscallent.h 3 Sep 2008 00:52:47 -0000 1.25 +@@ -200,7 +200,7 @@ + { 3, 0, printargs, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ +- { 5, 0, printargs, "prctl" }, /* 172 */ ++ { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 1, TS, sys_sigreturn, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ +Index: strace/linux/s390x/syscallent.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/s390x/syscallent.h,v +retrieving revision 1.23 +retrieving revision 1.24 +diff -u -r1.23 -r1.24 +--- strace/linux/s390x/syscallent.h 18 Jul 2008 01:23:49 -0000 1.23 ++++ strace/linux/s390x/syscallent.h 3 Sep 2008 00:52:47 -0000 1.24 +@@ -199,7 +199,7 @@ + { 3, 0, printargs, "nfsservctl" }, /* 169 */ + { -1, 0, printargs, "SYS_170" }, /* 170 */ + { -1, 0, printargs, "SYS_171" }, /* 171 */ +- { 5, 0, printargs, "prctl" }, /* 172 */ ++ { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 1, TS, sys_sigreturn, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ +Index: strace/linux/sh/syscallent.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/sh/syscallent.h,v +retrieving revision 1.18 +retrieving revision 1.19 +diff -u -r1.18 -r1.19 +--- strace/linux/sh/syscallent.h 19 Nov 2007 22:10:22 -0000 1.18 ++++ strace/linux/sh/syscallent.h 3 Sep 2008 00:52:47 -0000 1.19 +@@ -27,7 +27,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: syscallent.h,v 1.18 2007/11/19 22:10:22 roland Exp $ ++ * $Id: syscallent.h,v 1.19 2008/09/03 00:52:47 ldv Exp $ + */ + + { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 0 */ +@@ -202,7 +202,7 @@ + { 3, 0, printargs, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ +- { 5, 0, printargs, "prctl" }, /* 172 */ ++ { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 1, TS, printargs, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ +Index: strace/linux/sh64/syscallent.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/sh64/syscallent.h,v +retrieving revision 1.15 +retrieving revision 1.16 +diff -u -r1.15 -r1.16 +--- strace/linux/sh64/syscallent.h 20 May 2008 01:25:52 -0000 1.15 ++++ strace/linux/sh64/syscallent.h 3 Sep 2008 00:52:47 -0000 1.16 +@@ -25,7 +25,7 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * +- * $Id: syscallent.h,v 1.15 2008/05/20 01:25:52 roland Exp $ ++ * $Id: syscallent.h,v 1.16 2008/09/03 00:52:47 ldv Exp $ + */ + + { 0, 0, sys_setup, "setup" }, /* 0 */ +@@ -200,7 +200,7 @@ + { 3, 0, printargs, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ +- { 5, 0, printargs, "prctl" }, /* 172 */ ++ { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 1, TS, printargs, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ +Index: strace/linux/x86_64/syscallent.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/x86_64/syscallent.h,v +retrieving revision 1.31 +retrieving revision 1.34 +diff -u -r1.31 -r1.34 +--- strace/linux/x86_64/syscallent.h 18 Jul 2008 01:23:49 -0000 1.31 ++++ strace/linux/x86_64/syscallent.h 10 Nov 2008 22:53:03 -0000 1.34 +@@ -155,7 +155,7 @@ + { 3, 0, sys_modify_ldt, "modify_ldt" }, /* 154 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 155 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 156 */ +- { 5, 0, printargs, "prctl" }, /* 157 */ ++ { 5, 0, sys_prctl, "prctl" }, /* 157 */ + { 2, TP, sys_arch_prctl, "arch_prctl" }, /* 158 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 159 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 160 */ +@@ -274,8 +274,8 @@ + { 2, 0, printargs, "set_robust_list" }, /* 273 */ + { 3, 0, printargs, "get_robust_list" }, /* 274 */ + { 6, TD, printargs, "splice" }, /* 275 */ +- { 4, TD, printargs, "sync_file_range" }, /* 276 */ +- { 4, TD, printargs, "tee" }, /* 277 */ ++ { 4, TD, printargs, "tee" }, /* 276 */ ++ { 4, TD, printargs, "sync_file_range" }, /* 277 */ + { 4, TD, printargs, "vmsplice" }, /* 278 */ + { 6, 0, sys_move_pages, "move_pages" }, /* 279 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 280 */ +@@ -286,3 +286,10 @@ + { 6, TF, sys_fallocate, "fallocate" }, /* 285 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 286 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 287 */ ++ { 6, TN, printargs, "paccept" }, /* 288 */ ++ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 289 */ ++ { 2, TD, sys_eventfd2, "eventfd2" }, /* 290 */ ++ { 1, 0, sys_epoll_create1, "epoll_create1" }, /* 291 */ ++ { 3, TD, sys_dup3, "dup3" }, /* 292 */ ++ { 2, TD, sys_pipe2, "pipe2" }, /* 293 */ ++ { 1, TD, printargs, "inotify_init1" }, /* 294 */ +Index: strace/test/skodic.c +=================================================================== +RCS file: /cvsroot/strace/strace/test/skodic.c,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -r1.3 -r1.4 +--- strace/test/skodic.c 10 Apr 2000 22:22:33 -0000 1.3 ++++ strace/test/skodic.c 9 Dec 2008 14:02:59 -0000 1.4 +@@ -22,7 +22,7 @@ + *c = 0; + if (fork()) { + while(1) { +- strcpy( c, "/etc/passwd" ); ++ strcpy( c, "/etc/passwd" ); + strcpy( c, "/etc/shadow" ); + } + } else -- 2.11.4.GIT