pass ARCH down to uClibc
[buildroot.git] / package / strace / strace-4.5.18-xxx-010-update_to_trunk.patch
blobe1430dc0d4221a18de76b9bc3d449e441a19d7fb
1 \\\\
2 \\ 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
3 \\
4 Index: strace/ChangeLog
5 ===================================================================
6 RCS file: /cvsroot/strace/strace/ChangeLog,v
7 retrieving revision 1.570
8 retrieving revision 1.590
9 diff -u -r1.570 -r1.590
10 --- strace/ChangeLog 28 Aug 2008 22:00:46 -0000 1.570
11 +++ strace/ChangeLog 10 Dec 2008 13:51:40 -0000 1.590
12 @@ -1,5 +1,140 @@
13 +2008-11-11 Dmitry V. Levin <ldv@altlinux.org>
15 + * sock.c [LINUX] (sock_ioctl): Parse more SIOCS* ioctls.
17 +2008-12-09 Roland McGrath <roland@redhat.com>
19 + * strace.1 (DIAGNOSTICS): New section, describe exit behavior.
21 +2008-11-09 Dmitry V. Levin <ldv@altlinux.org>
23 + * process.c (prctl_options): Update constants from linux 2.6.27.
24 + * system.c (capabilities): Add more capability values.
26 + * util.c (string_quote): Fix support for NUL-terminated string.
27 + Add comments.
28 + (printpathn): Fix the case when "..." was appended to the output
29 + but no truncation was actually made. Add comments.
30 + (printstr): Fix memory allocation. Fix two cases when "..." was
31 + appended to the output but no truncation was actually made.
32 + Add comments.
33 + Fixes RH#470529.
35 +2008-10-23 Dmitry V. Levin <ldv@altlinux.org>
37 + Implement parsers for new linux syscalls.
38 + * desc.c (do_dup2, [LINUX] sys_dup3): New functions.
39 + (sys_dup2): Use do_dup2.
40 + [LINUX] (sys_epoll_create1): New function.
41 + [LINUX] (do_eventfd, sys_eventfd2): New functions.
42 + [LINUX] (sys_eventfd): Use do_eventfd.
43 + * net.c (do_pipe, [LINUX] sys_pipe2): New functions.
44 + (sys_pipe): Use do_pipe.
45 + * signal.c [LINUX] (do_signalfd, sys_signalfd4): New functions.
46 + [LINUX] (sys_signalfd): Use do_signalfd.
47 + * linux/syscall.h: Declare new sys_* functions.
48 + * linux/syscallent.h: Hook up signalfd4, eventfd2, epoll_create1,
49 + dup3, pipe2, inotify_init1.
50 + * linux/x86_64/syscallent.h: Hook up paccept, signalfd4, eventfd2,
51 + epoll_create1, dup3, pipe2, inotify_init1.
53 +2008-10-23 Mike Frysinger <vapier@gentoo.org>
55 + Port strace to the Blackfin architecture.
56 + * configure.ac: Add bfin to supported architectures.
57 + * process.c: Skip u_fpvalid/u_fpstate for Blackfin architecture.
58 + (change_syscall): Support Blackfin architecture.
59 + * syscall.c: Declare r0 for Blackfin architecture.
60 + (get_scno): Decode Blackfin syscall number.
61 + (syscall_fixup): Extract Blackfin return value.
62 + (get_error): Decode Blackfin return value.
63 + (force_result): Poke Blackfin return value.
64 + (syscall_enter): Extract Blackfin syscall arguments.
65 + * defs.h: Define TCB_WAITEXECVE for Blackfin architecture.
66 + * linux/syscall.h (sys_sram_alloc): Declare for Blackfin
67 + architecture.
68 + * system.c (sys_sram_alloc): Decode Blackfin sram_alloc() syscall.
69 + * util.c (getpc): Handle PC on Blackfin architecture.
70 + (printcall): Likewise.
71 + * linux/bfin/ioctlent.h, linux/bfin/syscallent.h: New Blackfin
72 + headers.
73 + * Makefile.am (EXTRA_DIST): Add linux/bfin/ioctlent.h and
74 + linux/bfin/syscallent.h.
76 +2008-09-18 Mike Frysinger <vapier@gentoo.org>
78 + * configure.ac: Accept uclinux hosts as linux.
80 +2008-10-22 Dmitry V. Levin <ldv@altlinux.org>
82 + Handle socket type flags introduced in linux 2.6.27.
83 + * net.c (socktypes): Add SOCK_DCCP.
84 + (sock_type_flags): New xlat structure.
85 + (tprint_sock_type): New function.
86 + (sys_socket, sys_socketpair): Use it to parse socket type and
87 + socket type flags.
89 +2008-09-29 Dmitry V. Levin <ldv@altlinux.org>
91 + * strace.c (startup_child): Save child pid for future use.
92 + (main): Exit/kill ourself with straced child's exitcode/signal.
93 + (trace): If signalled process pid matches the saved child pid,
94 + save the signal number. If terminated process pid matches the
95 + saved child pid, save its exit status.
96 + Patch from Denys Vlasenko <dvlasenk@redhat.com>
97 + Fixes RH#105371.
99 +2008-09-12 Tomas Pospisek <tpo@sourcepole.ch>
100 + Jan Kratochvil <jan.kratochvil@redhat.com>
102 + * strace.1 (DESCRIPTION): New description of unfinished system calls
103 + and system calls restarting.
105 +2008-09-03 Dmitry V. Levin <ldv@altlinux.org>
107 + * desc.c (sys_fcntl): Do not initialize auxstr for failed syscall.
108 + * process.c (sys_fork, sys_rfork) [USE_PROCFS]: Likewise.
109 + * signal.c (sys_signal): Likewise.
110 + * stream.c (internal_stream_ioctl): Likewise.
111 + * time.c (sys_adjtimex): Likewise.
112 + * syscall.c (trace_syscall): If RVAL_STR is set, then
113 + print auxstr for failed syscall as well.
115 + * syscall.c (is_restart_error): New function.
116 + * defs.h (is_restart_error): Declare it.
118 + * linux/dummy.h (sys_nanosleep): Uncouple from sys_adjtime().
119 + * time.c (sys_nanosleep): New function, based on is_restart_error().
121 + * process.c (sys_prctl): Decode PR_SET_PDEATHSIG, PR_GET_PDEATHSIG,
122 + PR_SET_DUMPABLE, PR_GET_DUMPABLE, PR_SET_KEEPCAPS, PR_GET_KEEPCAPS.
123 + Fix PR_GET_UNALIGN decoder.
124 + (prctl_options): Add more constants.
126 + * linux/syscallent.h: Use sys_prctl() decoder for "prctl" syscall.
127 + * linux/alpha/syscallent.h: Likewise.
128 + * linux/arm/syscallent.h: Likewise.
129 + * linux/m68k/syscallent.h: Likewise.
130 + * linux/powerpc/syscallent.h: Likewise.
131 + * linux/s390/syscallent.h: Likewise.
132 + * linux/s390x/syscallent.h: Likewise.
133 + * linux/sh/syscallent.h: Likewise.
134 + * linux/sh64/syscallent.h: Likewise.
135 + * linux/x86_64/syscallent.h: Likewise.
137 +2008-09-02 Dmitry V. Levin <ldv@altlinux.org>
139 + * linux/x86_64/syscallent.h: Fix syscall numbers for "tee" and
140 + "sync_file_range".
141 + From Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
143 2008-08-28 Roland McGrath <roland@redhat.com>
145 + * strace.1 (BUGS): New section, mention SIGTRAP interference.
147 + * strace.spec (%ifarch %{strace64_arches}): Use cp -p instead of ln
148 + for %{rhel} < 6.
150 * configure.ac, NEWS: Version 4.5.18.
151 * strace.spec: 4.5.18-1.
153 Index: strace/Makefile.am
154 ===================================================================
155 RCS file: /cvsroot/strace/strace/Makefile.am,v
156 retrieving revision 1.19
157 retrieving revision 1.20
158 diff -u -r1.19 -r1.20
159 --- strace/Makefile.am 1 Aug 2008 01:15:24 -0000 1.19
160 +++ strace/Makefile.am 10 Nov 2008 22:21:41 -0000 1.20
161 @@ -34,6 +34,7 @@
162 linux/arm/syscallent.h linux/arm/syscallent1.h \
163 linux/arm/signalent1.h linux/arm/ioctlent1.h \
164 linux/arm/errnoent1.h \
165 + linux/bfin/ioctlent.h linux/bfin/syscallent.h \
166 linux/hppa/errnoent.h linux/hppa/ioctlent.h \
167 linux/hppa/signalent.h linux/hppa/syscallent.h \
168 linux/ia64/syscallent.h linux/ia64/errnoent.h \
169 Index: strace/configure.ac
170 ===================================================================
171 RCS file: /cvsroot/strace/strace/configure.ac,v
172 retrieving revision 1.57
173 retrieving revision 1.59
174 diff -u -r1.57 -r1.59
175 --- strace/configure.ac 28 Aug 2008 22:00:46 -0000 1.57
176 +++ strace/configure.ac 10 Nov 2008 22:21:41 -0000 1.59
177 @@ -9,7 +9,7 @@
179 AC_MSG_CHECKING([for supported operating system])
180 case "$host_os" in
181 -linux*)
182 +*linux*)
183 opsys=linux
184 AC_DEFINE([LINUX], 1, [Define for the Linux operating system.])
186 @@ -43,6 +43,10 @@
188 AC_MSG_CHECKING([for supported architecture])
189 case "$host_cpu" in
190 +bfin)
191 + arch=bfin
192 + AC_DEFINE([BFIN], 1, [Define for the Blackfin architecture.])
193 + ;;
194 i[[3456]]86|pentium)
195 arch=i386
196 AC_DEFINE([I386], 1, [Define for the i386 architecture.])
197 Index: strace/defs.h
198 ===================================================================
199 RCS file: /cvsroot/strace/strace/defs.h,v
200 retrieving revision 1.83
201 retrieving revision 1.85
202 diff -u -r1.83 -r1.85
203 --- strace/defs.h 1 Aug 2008 01:06:31 -0000 1.83
204 +++ strace/defs.h 10 Nov 2008 22:21:41 -0000 1.85
205 @@ -26,7 +26,7 @@
206 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
207 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
209 - * $Id: defs.h,v 1.83 2008/08/01 01:06:31 roland Exp $
210 + * $Id: defs.h,v 1.85 2008/11/10 22:21:41 ldv Exp $
213 #ifdef HAVE_CONFIG_H
214 @@ -356,7 +356,7 @@
215 #define TCB_FOLLOWFORK 00400 /* Process should have forks followed */
216 #define TCB_REPRINT 01000 /* We should reprint this syscall on exit */
217 #ifdef LINUX
218 -# 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)
219 +# 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)
220 # define TCB_WAITEXECVE 02000 /* ignore SIGTRAP after exceve */
221 # endif
222 # define TCB_CLONE_DETACHED 04000 /* CLONE_DETACHED set in creating syscall */
223 @@ -507,6 +507,7 @@
224 extern void call_summary P((FILE *));
225 extern void tprint_iov P((struct tcb *, unsigned long, unsigned long));
226 extern void tprint_open_modes P((struct tcb *, mode_t));
227 +extern int is_restart_error P((struct tcb *));
229 #ifdef LINUX
230 extern int internal_clone P((struct tcb *));
231 Index: strace/desc.c
232 ===================================================================
233 RCS file: /cvsroot/strace/strace/desc.c,v
234 retrieving revision 1.33
235 retrieving revision 1.35
236 diff -u -r1.33 -r1.35
237 --- strace/desc.c 1 Nov 2007 21:52:20 -0000 1.33
238 +++ strace/desc.c 10 Nov 2008 22:53:02 -0000 1.35
239 @@ -27,7 +27,7 @@
240 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
241 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
243 - * $Id: desc.c,v 1.33 2007/11/01 21:52:20 roland Exp $
244 + * $Id: desc.c,v 1.35 2008/11/10 22:53:02 ldv Exp $
247 #include "defs.h"
248 @@ -242,6 +242,8 @@
250 #endif
252 +extern const struct xlat open_mode_flags[];
255 * low bits of the open(2) flags define access mode,
256 * other bits are real flags.
257 @@ -250,7 +252,6 @@
258 sprint_open_modes(mode_t flags)
260 extern const struct xlat open_access_modes[];
261 - extern const struct xlat open_mode_flags[];
262 static char outstr[1024];
263 const char *str = xlookup(open_access_modes, flags & 3);
264 const char *sep = "";
265 @@ -332,12 +333,14 @@
266 case F_SETOWN: case F_GETOWN:
267 break;
268 case F_GETFD:
269 - if (tcp->u_rval == 0)
270 + if (syserror(tcp) || tcp->u_rval == 0)
271 return 0;
272 tcp->auxstr =
273 sprintflags("flags ", fdflags, tcp->u_rval);
274 return RVAL_HEX|RVAL_STR;
275 case F_GETFL:
276 + if (syserror(tcp))
277 + return 0;
278 tcp->auxstr = sprint_open_modes(tcp->u_rval);
279 return RVAL_HEX|RVAL_STR;
280 case F_GETLK:
281 @@ -394,16 +397,33 @@
282 return 0;
285 -int
286 -sys_dup2(tcp)
287 -struct tcb *tcp;
288 +static int
289 +do_dup2(struct tcb *tcp, int flags_arg)
291 if (entering(tcp)) {
292 tprintf("%ld, %ld", tcp->u_arg[0], tcp->u_arg[1]);
293 + if (flags_arg >= 0) {
294 + tprintf(", ");
295 + printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
298 return 0;
301 +int
302 +sys_dup2(struct tcb *tcp)
304 + return do_dup2(tcp, -1);
307 +#ifdef LINUX
308 +int
309 +sys_dup3(struct tcb *tcp)
311 + return do_dup2(tcp, 2);
313 +#endif
315 #if defined(ALPHA) || defined(FREEBSD) || defined(SUNOS4)
317 sys_getdtablesize(tcp)
318 @@ -603,14 +623,21 @@
322 -sys_epoll_create(tcp)
323 -struct tcb *tcp;
324 +sys_epoll_create(struct tcb *tcp)
326 if (entering(tcp))
327 tprintf("%ld", tcp->u_arg[0]);
328 return 0;
331 +int
332 +sys_epoll_create1(struct tcb *tcp)
334 + if (entering(tcp))
335 + printflags(open_mode_flags, tcp->u_arg[0], "O_???");
336 + return 0;
339 #ifdef HAVE_SYS_EPOLL_H
340 static void
341 print_epoll_event(ev)
342 @@ -887,12 +914,28 @@
343 return rc;
346 -int
347 -sys_eventfd(tcp)
348 -struct tcb *tcp;
349 +static int
350 +do_eventfd(struct tcb *tcp, int flags_arg)
352 - if (entering(tcp))
353 + if (entering(tcp)) {
354 tprintf("%lu", tcp->u_arg[0]);
355 + if (flags_arg >= 0) {
356 + tprintf(", ");
357 + printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
360 return 0;
363 +int
364 +sys_eventfd(struct tcb *tcp)
366 + return do_eventfd(tcp, -1);
369 +int
370 +sys_eventfd2(struct tcb *tcp)
372 + return do_eventfd(tcp, 1);
374 #endif
375 Index: strace/net.c
376 ===================================================================
377 RCS file: /cvsroot/strace/strace/net.c,v
378 retrieving revision 1.56
379 retrieving revision 1.58
380 diff -u -r1.56 -r1.58
381 --- strace/net.c 1 Nov 2007 21:37:33 -0000 1.56
382 +++ strace/net.c 10 Nov 2008 22:53:02 -0000 1.58
383 @@ -27,7 +27,7 @@
384 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
385 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
387 - * $Id: net.c,v 1.56 2007/11/01 21:37:33 roland Exp $
388 + * $Id: net.c,v 1.58 2008/11/10 22:53:02 ldv Exp $
391 #include "defs.h"
392 @@ -320,17 +320,32 @@
393 #ifdef SOCK_RAW
394 { SOCK_RAW, "SOCK_RAW" },
395 #endif
396 +#ifdef SOCK_RDM
397 + { SOCK_RDM, "SOCK_RDM" },
398 +#endif
399 #ifdef SOCK_SEQPACKET
400 { SOCK_SEQPACKET,"SOCK_SEQPACKET"},
401 #endif
402 -#ifdef SOCK_RDM
403 - { SOCK_RDM, "SOCK_RDM" },
404 +#ifdef SOCK_DCCP
405 + { SOCK_DCCP, "SOCK_DCCP" },
406 #endif
407 #ifdef SOCK_PACKET
408 { SOCK_PACKET, "SOCK_PACKET" },
409 #endif
410 { 0, NULL },
412 +const struct xlat sock_type_flags[] = {
413 +#ifdef SOCK_CLOEXEC
414 + { SOCK_CLOEXEC, "SOCK_CLOEXEC" },
415 +#endif
416 +#ifdef SOCK_NONBLOCK
417 + { SOCK_NONBLOCK,"SOCK_NONBLOCK" },
418 +#endif
419 + { 0, NULL },
421 +#ifndef SOCK_TYPE_MASK
422 +# define SOCK_TYPE_MASK 0xf
423 +#endif
424 static const struct xlat socketlayers[] = {
425 #if defined(SOL_IP)
426 { SOL_IP, "SOL_IP" },
427 @@ -1182,14 +1197,33 @@
429 #endif /* HAVE_SENDMSG */
432 + * low bits of the socket type define real socket type,
433 + * other bits are socket type flags.
434 + */
435 +static void
436 +tprint_sock_type(struct tcb *tcp, int flags)
438 + const char *str = xlookup(socktypes, flags & SOCK_TYPE_MASK);
440 + if (str)
442 + tprintf("%s", str);
443 + flags &= ~SOCK_TYPE_MASK;
444 + if (!flags)
445 + return;
446 + tprintf("|");
448 + printflags(sock_type_flags, flags, "SOCK_???");
452 -sys_socket(tcp)
453 -struct tcb *tcp;
454 +sys_socket(struct tcb *tcp)
456 if (entering(tcp)) {
457 printxval(domains, tcp->u_arg[0], "PF_???");
458 tprintf(", ");
459 - printxval(socktypes, tcp->u_arg[1], "SOCK_???");
460 + tprint_sock_type(tcp, tcp->u_arg[1]);
461 tprintf(", ");
462 switch (tcp->u_arg[0]) {
463 case PF_INET:
464 @@ -1463,34 +1497,52 @@
465 return sys_accept(tcp);
468 -int
469 -sys_pipe(tcp)
470 -struct tcb *tcp;
473 -#if defined(LINUX) && !defined(SPARC) && !defined(SPARC64) && !defined(SH) && !defined(IA64)
474 - int fds[2];
475 +extern const struct xlat open_mode_flags[];
477 +static int
478 +do_pipe(struct tcb *tcp, int flags_arg)
480 if (exiting(tcp)) {
481 if (syserror(tcp)) {
482 tprintf("%#lx", tcp->u_arg[0]);
483 - return 0;
485 - if (umoven(tcp, tcp->u_arg[0], sizeof fds, (char *) fds) < 0)
486 - tprintf("[...]");
487 - else
488 - tprintf("[%u, %u]", fds[0], fds[1]);
490 + } else {
491 +#if defined(LINUX) && !defined(SPARC) && !defined(SPARC64) && !defined(SH) && !defined(IA64)
492 + int fds[2];
494 + if (umoven(tcp, tcp->u_arg[0], sizeof fds, (char *) fds) < 0)
495 + tprintf("[...]");
496 + else
497 + tprintf("[%u, %u]", fds[0], fds[1]);
498 #elif defined(SPARC) || defined(SPARC64) || defined(SH) || defined(SVR4) || defined(FREEBSD) || defined(IA64)
499 - if (exiting(tcp))
500 - tprintf("[%lu, %lu]", tcp->u_rval, getrval2(tcp));
501 + tprintf("[%lu, %lu]", tcp->u_rval, getrval2(tcp));
502 +#else
503 + tprintf("%#lx", tcp->u_arg[0]);
504 #endif
506 + if (flags_arg >= 0) {
507 + tprintf(", ");
508 + printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
511 return 0;
515 -sys_socketpair(tcp)
516 -struct tcb *tcp;
517 +sys_pipe(struct tcb *tcp)
519 + return do_pipe(tcp, -1);
522 +#ifdef LINUX
523 +int
524 +sys_pipe2(struct tcb *tcp)
526 + return do_pipe(tcp, 1);
528 +#endif
530 +int
531 +sys_socketpair(struct tcb *tcp)
533 #ifdef LINUX
534 int fds[2];
535 @@ -1499,7 +1551,7 @@
536 if (entering(tcp)) {
537 printxval(domains, tcp->u_arg[0], "PF_???");
538 tprintf(", ");
539 - printxval(socktypes, tcp->u_arg[1], "SOCK_???");
540 + tprint_sock_type(tcp, tcp->u_arg[1]);
541 tprintf(", ");
542 switch (tcp->u_arg[0]) {
543 case PF_INET:
544 Index: strace/process.c
545 ===================================================================
546 RCS file: /cvsroot/strace/strace/process.c,v
547 retrieving revision 1.113
548 retrieving revision 1.118
549 diff -u -r1.113 -r1.118
550 --- strace/process.c 18 Jul 2008 02:16:47 -0000 1.113
551 +++ strace/process.c 11 Nov 2008 00:25:22 -0000 1.118
552 @@ -34,7 +34,7 @@
553 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
554 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
556 - * $Id: process.c,v 1.113 2008/07/18 02:16:47 roland Exp $
557 + * $Id: process.c,v 1.118 2008/11/11 00:25:22 ldv Exp $
560 #include "defs.h"
561 @@ -186,9 +186,6 @@
562 #ifdef PR_GETNSHARE
563 { PR_GETNSHARE, "PR_GETNSHARE" },
564 #endif
565 -#if defined(PR_SET_PDEATHSIG)
566 - { PR_SET_PDEATHSIG, "PR_SET_PDEATHSIG" },
567 -#endif
568 #ifdef PR_COREPID
569 { PR_COREPID, "PR_COREPID" },
570 #endif
571 @@ -204,6 +201,12 @@
572 #ifdef PR_GET_PDEATHSIG
573 { PR_GET_PDEATHSIG, "PR_GET_PDEATHSIG" },
574 #endif
575 +#ifdef PR_GET_DUMPABLE
576 + { PR_GET_DUMPABLE, "PR_GET_DUMPABLE" },
577 +#endif
578 +#ifdef PR_SET_DUMPABLE
579 + { PR_SET_DUMPABLE, "PR_SET_DUMPABLE" },
580 +#endif
581 #ifdef PR_GET_UNALIGN
582 { PR_GET_UNALIGN, "PR_GET_UNALIGN" },
583 #endif
584 @@ -211,10 +214,10 @@
585 { PR_SET_UNALIGN, "PR_SET_UNALIGN" },
586 #endif
587 #ifdef PR_GET_KEEPCAPS
588 - { PR_GET_KEEPCAPS, "PR_GET_KEEP_CAPS" },
589 + { PR_GET_KEEPCAPS, "PR_GET_KEEPCAPS" },
590 #endif
591 #ifdef PR_SET_KEEPCAPS
592 - { PR_SET_KEEPCAPS, "PR_SET_KEEP_CAPS" },
593 + { PR_SET_KEEPCAPS, "PR_SET_KEEPCAPS" },
594 #endif
595 #ifdef PR_GET_FPEMU
596 { PR_GET_FPEMU, "PR_GET_FPEMU" },
597 @@ -252,6 +255,18 @@
598 #ifdef PR_SET_SECCOMP
599 { PR_SET_SECCOMP, "PR_SET_SECCOMP" },
600 #endif
601 +#ifdef PR_GET_TSC
602 + { PR_GET_TSC, "PR_GET_TSC" },
603 +#endif
604 +#ifdef PR_SET_TSC
605 + { PR_SET_TSC, "PR_SET_TSC" },
606 +#endif
607 +#ifdef PR_GET_SECUREBITS
608 + { PR_GET_SECUREBITS, "PR_GET_SECUREBITS" },
609 +#endif
610 +#ifdef PR_SET_SECUREBITS
611 + { PR_SET_SECUREBITS, "PR_SET_SECUREBITS" },
612 +#endif
613 { 0, NULL },
616 @@ -291,10 +306,24 @@
617 case PR_GETNSHARE:
618 break;
619 #endif
620 -#ifdef PR_SET_DEATHSIG
621 +#ifdef PR_SET_PDEATHSIG
622 + case PR_SET_PDEATHSIG:
623 + tprintf(", %lu", tcp->u_arg[1]);
624 + break;
625 +#endif
626 +#ifdef PR_GET_PDEATHSIG
627 case PR_GET_PDEATHSIG:
628 break;
629 #endif
630 +#ifdef PR_SET_DUMPABLE
631 + case PR_SET_DUMPABLE:
632 + tprintf(", %lu", tcp->u_arg[1]);
633 + break;
634 +#endif
635 +#ifdef PR_GET_DUMPABLE
636 + case PR_GET_DUMPABLE:
637 + break;
638 +#endif
639 #ifdef PR_SET_UNALIGN
640 case PR_SET_UNALIGN:
641 tprintf(", %s", unalignctl_string(tcp->u_arg[1]));
642 @@ -305,6 +334,15 @@
643 tprintf(", %#lx", tcp->u_arg[1]);
644 break;
645 #endif
646 +#ifdef PR_SET_KEEPCAPS
647 + case PR_SET_KEEPCAPS:
648 + tprintf(", %lu", tcp->u_arg[1]);
649 + break;
650 +#endif
651 +#ifdef PR_GET_KEEPCAPS
652 + case PR_GET_KEEPCAPS:
653 + break;
654 +#endif
655 default:
656 for (i = 1; i < tcp->u_nargs; i++)
657 tprintf(", %#lx", tcp->u_arg[i]);
658 @@ -314,23 +352,26 @@
659 switch (tcp->u_arg[0]) {
660 #ifdef PR_GET_PDEATHSIG
661 case PR_GET_PDEATHSIG:
662 - for (i=1; i<tcp->u_nargs; i++)
663 - tprintf(", %#lx", tcp->u_arg[i]);
664 + if (umove(tcp, tcp->u_arg[1], &i) < 0)
665 + tprintf(", %#lx", tcp->u_arg[1]);
666 + else
667 + tprintf(", {%u}", i);
668 break;
669 #endif
670 -#ifdef PR_SET_UNALIGN
671 - case PR_SET_UNALIGN:
672 - break;
673 +#ifdef PR_GET_DUMPABLE
674 + case PR_GET_DUMPABLE:
675 + return RVAL_UDECIMAL;
676 #endif
677 #ifdef PR_GET_UNALIGN
678 case PR_GET_UNALIGN:
680 - int ctl;
682 - umove(tcp, tcp->u_arg[1], &ctl);
683 - tcp->auxstr = unalignctl_string(ctl);
684 + if (syserror(tcp) || umove(tcp, tcp->u_arg[1], &i) < 0)
685 + break;
686 + tcp->auxstr = unalignctl_string(i);
687 return RVAL_STR;
689 +#endif
690 +#ifdef PR_GET_KEEPCAPS
691 + case PR_GET_KEEPCAPS:
692 + return RVAL_UDECIMAL;
693 #endif
694 default:
695 break;
696 @@ -466,7 +507,7 @@
697 sys_fork(tcp)
698 struct tcb *tcp;
700 - if (exiting(tcp)) {
701 + if (exiting(tcp) && !syserror(tcp)) {
702 if (getrval2(tcp)) {
703 tcp->auxstr = "child process";
704 return RVAL_UDECIMAL | RVAL_STR;
705 @@ -484,7 +525,7 @@
706 if (entering(tcp)) {
707 tprintf ("%ld", tcp->u_arg[0]);
709 - else {
710 + else if (!syserror(tcp)) {
711 if (getrval2(tcp)) {
712 tcp->auxstr = "child process";
713 return RVAL_UDECIMAL | RVAL_STR;
714 @@ -710,6 +751,10 @@
715 if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_A3), new)<0)
716 return -1;
717 return 0;
718 +#elif defined(BFIN)
719 + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_P0), new)<0)
720 + return -1;
721 + return 0;
722 #elif defined(IA64)
723 if (ia32) {
724 switch (new) {
725 @@ -3004,7 +3049,7 @@
726 { 70, "fpeir" },
727 #endif
729 -#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64)
730 +#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) && !defined(BFIN)
731 { uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" },
732 #endif
733 #if defined(I386) || defined(X86_64)
734 @@ -3033,7 +3078,7 @@
735 #if !defined(SPARC64)
736 { uoff(u_ar0), "offsetof(struct user, u_ar0)" },
737 #endif
738 -#if !defined(ARM) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64)
739 +#if !defined(ARM) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) && !defined(BFIN)
740 { uoff(u_fpstate), "offsetof(struct user, u_fpstate)" },
741 #endif
742 { uoff(magic), "offsetof(struct user, magic)" },
743 Index: strace/signal.c
744 ===================================================================
745 RCS file: /cvsroot/strace/strace/signal.c,v
746 retrieving revision 1.68
747 retrieving revision 1.70
748 diff -u -r1.68 -r1.70
749 --- strace/signal.c 20 Aug 2008 01:59:40 -0000 1.68
750 +++ strace/signal.c 10 Nov 2008 22:53:03 -0000 1.70
751 @@ -30,7 +30,7 @@
752 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
753 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
755 - * $Id: signal.c,v 1.68 2008/08/20 01:59:40 roland Exp $
756 + * $Id: signal.c,v 1.70 2008/11/10 22:53:03 ldv Exp $
759 #include "defs.h"
760 @@ -1199,7 +1199,7 @@
762 return 0;
764 - else {
765 + else if (!syserror(tcp)) {
766 switch (tcp->u_rval) {
767 case (long) SIG_ERR:
768 tcp->auxstr = "SIG_ERR"; break;
769 @@ -1212,6 +1212,7 @@
771 return RVAL_HEX | RVAL_STR;
773 + return 0;
776 #ifdef SVR4
777 @@ -2010,15 +2011,32 @@
778 return 0;
781 -int
782 -sys_signalfd(tcp)
783 -struct tcb *tcp;
784 +extern const struct xlat open_mode_flags[];
786 +static int
787 +do_signalfd(struct tcb *tcp, int flags_arg)
789 if (entering(tcp)) {
790 tprintf("%ld, ", tcp->u_arg[0]);
791 print_sigset(tcp, tcp->u_arg[1], 1);
792 tprintf("%lu", tcp->u_arg[2]);
793 + if (flags_arg >= 0) {
794 + tprintf(", ");
795 + printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
798 return 0;
801 +int
802 +sys_signalfd(struct tcb *tcp)
804 + return do_signalfd(tcp, -1);
807 +int
808 +sys_signalfd4(struct tcb *tcp)
810 + return do_signalfd(tcp, 3);
812 #endif /* LINUX */
813 Index: strace/sock.c
814 ===================================================================
815 RCS file: /cvsroot/strace/strace/sock.c,v
816 retrieving revision 1.14
817 retrieving revision 1.15
818 diff -u -r1.14 -r1.15
819 --- strace/sock.c 21 Mar 2007 14:18:19 -0000 1.14
820 +++ strace/sock.c 10 Dec 2008 13:51:40 -0000 1.15
821 @@ -24,7 +24,7 @@
822 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
823 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
825 - * $Id: sock.c,v 1.14 2007/03/21 14:18:19 ldv Exp $
826 + * $Id: sock.c,v 1.15 2008/12/10 13:51:40 ldv Exp $
829 #include "defs.h"
830 @@ -134,26 +134,38 @@
831 return 1;
832 #ifdef LINUX
833 case SIOCGIFNAME:
834 + case SIOCSIFNAME:
835 case SIOCGIFINDEX:
836 case SIOCGIFADDR:
837 + case SIOCSIFADDR:
838 case SIOCGIFDSTADDR:
839 + case SIOCSIFDSTADDR:
840 case SIOCGIFBRDADDR:
841 + case SIOCSIFBRDADDR:
842 case SIOCGIFNETMASK:
843 + case SIOCSIFNETMASK:
844 case SIOCGIFFLAGS:
845 + case SIOCSIFFLAGS:
846 case SIOCGIFMETRIC:
847 + case SIOCSIFMETRIC:
848 case SIOCGIFMTU:
849 + case SIOCSIFMTU:
850 case SIOCGIFSLAVE:
851 + case SIOCSIFSLAVE:
852 case SIOCGIFHWADDR:
853 + case SIOCSIFHWADDR:
854 case SIOCGIFTXQLEN:
855 + case SIOCSIFTXQLEN:
856 case SIOCGIFMAP:
857 + case SIOCSIFMAP:
858 if (umove(tcp, tcp->u_arg[2], &ifr) < 0)
859 tprintf(", %#lx", tcp->u_arg[2]);
860 else if (syserror(tcp)) {
861 - if (code == SIOCGIFNAME)
862 + if (code == SIOCGIFNAME || code == SIOCSIFNAME)
863 tprintf(", {ifr_index=%d, ifr_name=???}", ifr.ifr_ifindex);
864 else
865 tprintf(", {ifr_name=\"%s\", ???}", ifr.ifr_name);
866 - } else if (code == SIOCGIFNAME)
867 + } else if (code == SIOCGIFNAME || code == SIOCSIFNAME)
868 tprintf(", {ifr_index=%d, ifr_name=\"%s\"}",
869 ifr.ifr_ifindex, ifr.ifr_name);
870 else {
871 @@ -163,15 +175,19 @@
872 tprintf("ifr_index=%d", ifr.ifr_ifindex);
873 break;
874 case SIOCGIFADDR:
875 + case SIOCSIFADDR:
876 str = "ifr_addr";
877 case SIOCGIFDSTADDR:
878 - if (str == NULL)
879 + case SIOCSIFDSTADDR:
880 + if (!str)
881 str = "ifr_dstaddr";
882 case SIOCGIFBRDADDR:
883 - if (str == NULL)
884 + case SIOCSIFBRDADDR:
885 + if (!str)
886 str = "ifr_broadaddr";
887 case SIOCGIFNETMASK:
888 - if (str == NULL)
889 + case SIOCSIFNETMASK:
890 + if (!str)
891 str = "ifr_netmask";
892 tprintf("%s={", str);
893 printxval(addrfams,
894 @@ -185,6 +201,7 @@
895 tprintf("}");
896 break;
897 case SIOCGIFHWADDR:
898 + case SIOCSIFHWADDR:
899 /* XXX Are there other hardware addresses
900 than 6-byte MACs? */
901 bytes = (unsigned char *) &ifr.ifr_hwaddr.sa_data;
902 @@ -193,22 +210,28 @@
903 bytes[3], bytes[4], bytes[5]);
904 break;
905 case SIOCGIFFLAGS:
906 + case SIOCSIFFLAGS:
907 tprintf("ifr_flags=");
908 printflags(iffflags, ifr.ifr_flags, "IFF_???");
909 break;
910 case SIOCGIFMETRIC:
911 + case SIOCSIFMETRIC:
912 tprintf("ifr_metric=%d", ifr.ifr_metric);
913 break;
914 case SIOCGIFMTU:
915 + case SIOCSIFMTU:
916 tprintf("ifr_mtu=%d", ifr.ifr_mtu);
917 break;
918 case SIOCGIFSLAVE:
919 + case SIOCSIFSLAVE:
920 tprintf("ifr_slave=\"%s\"", ifr.ifr_slave);
921 break;
922 case SIOCGIFTXQLEN:
923 + case SIOCSIFTXQLEN:
924 tprintf("ifr_qlen=%d", ifr.ifr_qlen);
925 break;
926 case SIOCGIFMAP:
927 + case SIOCSIFMAP:
928 tprintf("ifr_map={mem_start=%#lx, "
929 "mem_end=%#lx, base_addr=%#x, "
930 "irq=%u, dma=%u, port=%u}",
931 Index: strace/strace.1
932 ===================================================================
933 RCS file: /cvsroot/strace/strace/strace.1,v
934 retrieving revision 1.16
935 retrieving revision 1.20
936 diff -u -r1.16 -r1.20
937 --- strace/strace.1 18 Jul 2008 00:25:10 -0000 1.16
938 +++ strace/strace.1 10 Dec 2008 06:09:29 -0000 1.20
939 @@ -25,7 +25,7 @@
940 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
941 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
943 -.\" $Id: strace.1,v 1.16 2008/07/18 00:25:10 roland Exp $
944 +.\" $Id: strace.1,v 1.20 2008/12/10 06:09:29 roland Exp $
946 .de CW
948 @@ -147,6 +147,26 @@
949 --- SIGINT (Interrupt) ---
950 +++ killed by SIGINT +++
952 +If a system call is being executed and meanwhile another one is being called
953 +from a different thread/process then
954 +.B strace
955 +will try to preserve the order of those events and mark the ongoing call as
956 +being \fIunfinished\fP. When the call returns it will be marked as
957 +\fIresumed\fP.
958 +.CW
959 +[pid 28772] select(4, [3], NULL, NULL, NULL <unfinished ...>
960 +[pid 28779] clock_gettime(CLOCK_REALTIME, {1130322148, 939977000}) = 0
961 +[pid 28772] <... select resumed> ) = 1 (in [3])
962 +.CE
963 +Interruption of a (restartable) system call by a signal delivery is processed
964 +differently as kernel terminates the system call and also arranges its
965 +immediate reexecution after the signal handler completes.
966 +.CW
967 +read(0, 0x7ffff72cf5cf, 1) = ? ERESTARTSYS (To be restarted)
968 +--- SIGALRM (Alarm clock) @ 0 (0) ---
969 +rt_sigreturn(0xe) = 0
970 +read(0, ""..., 1) = 0
971 +.CE
972 Arguments are printed in symbolic form with a passion.
973 This example shows the shell performing ``>>xyzzy'' output redirection:
975 @@ -533,6 +553,25 @@
976 .IR var
977 from the inherited list of environment variables before passing it on to
978 the command.
979 +.SH DIAGNOSTICS
980 +When
981 +.I command
982 +exits,
983 +.B strace
984 +exits with the same exit status.
986 +.I command
987 +is terminated by a signal,
988 +.B strace
989 +terminates itself with the same signal, so that
990 +.B strace
991 +can be used as a wrapper process transparent to the invoking parent process.
992 +.LP
993 +When using
994 +.BR -p ,
995 +the exit status of
996 +.B strace
997 +is zero unless there was an unexpected error in doing the tracing.
998 .SH "SETUID INSTALLATION"
1000 .B strace
1001 @@ -653,6 +692,12 @@
1002 .B strace
1003 to Irix
1004 and tired of writing about himself in the third person.
1005 +.SH BUGS
1006 +The SIGTRAP signal is used internally by the kernel implementation of
1007 +system call tracing. When a traced process receives a SIGTRAP signal not
1008 +associated with tracing, strace will not report that signal correctly.
1009 +This signal is not normally used by programs, but could be via a hard-coded
1010 +break instruction or via kill(2).
1011 .SH PROBLEMS
1012 Problems with
1013 .B strace
1014 Index: strace/strace.c
1015 ===================================================================
1016 RCS file: /cvsroot/strace/strace/strace.c,v
1017 retrieving revision 1.88
1018 retrieving revision 1.89
1019 diff -u -r1.88 -r1.89
1020 --- strace/strace.c 6 Aug 2008 21:38:52 -0000 1.88
1021 +++ strace/strace.c 10 Nov 2008 17:14:58 -0000 1.89
1022 @@ -27,7 +27,7 @@
1023 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1024 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1026 - * $Id: strace.c,v 1.88 2008/08/06 21:38:52 kratochvil Exp $
1027 + * $Id: strace.c,v 1.89 2008/11/10 17:14:58 ldv Exp $
1030 #include "defs.h"
1031 @@ -85,6 +85,9 @@
1032 /* Sometimes we want to print only succeeding syscalls. */
1033 int not_failing_only = 0;
1035 +static int exit_code = 0;
1036 +static int strace_child = 0;
1038 static char *username = NULL;
1039 uid_t run_uid;
1040 gid_t run_gid;
1041 @@ -523,7 +526,8 @@
1042 progname, filename);
1043 exit(1);
1045 - switch (pid = fork()) {
1046 + strace_child = pid = fork();
1047 + switch (pid) {
1048 case -1:
1049 perror("strace: fork");
1050 cleanup();
1051 @@ -879,7 +883,17 @@
1052 if (trace() < 0)
1053 exit(1);
1054 cleanup();
1055 - exit(0);
1056 + fflush(NULL);
1057 + if (exit_code > 0xff) {
1058 + /* Child was killed by a signal, mimic that. */
1059 + exit_code &= 0xff;
1060 + signal(exit_code, SIG_DFL);
1061 + raise(exit_code);
1062 + /* Paranoia - what if this signal is not fatal?
1063 + Exit with 128 + signo then. */
1064 + exit_code += 128;
1066 + exit(exit_code);
1070 @@ -1783,7 +1797,7 @@
1071 switch (fork()) {
1072 case -1:
1073 perror("fork");
1074 - _exit(0);
1075 + _exit(1);
1076 case 0:
1077 break;
1078 default:
1079 @@ -1807,7 +1821,7 @@
1081 if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
1082 perror("getrlimit(RLIMIT_NOFILE, ...)");
1083 - _exit(0);
1084 + _exit(1);
1086 n = rl.rlim_cur;
1087 for (i = 0; i < n; i++) {
1088 @@ -2322,6 +2336,8 @@
1089 continue;
1091 if (WIFSIGNALED(status)) {
1092 + if (pid == strace_child)
1093 + exit_code = 0x100 | WTERMSIG(status);
1094 if (!cflag
1095 && (qual_flags[WTERMSIG(status)] & QUAL_SIGNAL)) {
1096 printleader(tcp);
1097 @@ -2341,6 +2357,8 @@
1098 continue;
1100 if (WIFEXITED(status)) {
1101 + if (pid == strace_child)
1102 + exit_code = WEXITSTATUS(status);
1103 if (debug)
1104 fprintf(stderr, "pid %u exited\n", pid);
1105 if ((tcp->flags & TCB_ATTACHED)
1106 Index: strace/strace.spec
1107 ===================================================================
1108 RCS file: /cvsroot/strace/strace/strace.spec,v
1109 retrieving revision 1.44
1110 retrieving revision 1.45
1111 diff -u -r1.44 -r1.45
1112 --- strace/strace.spec 28 Aug 2008 22:00:46 -0000 1.44
1113 +++ strace/strace.spec 28 Aug 2008 23:26:21 -0000 1.45
1114 @@ -55,8 +55,15 @@
1115 # remove unpackaged files from the buildroot
1116 rm -f %{buildroot}%{_bindir}/strace-graph
1118 +%define copy64 ln
1119 +%if 0%{?rhel}
1120 +%if 0%{?rhel} < 6
1121 +%endif
1122 +%define copy64 cp -p
1123 +%endif
1125 %ifarch %{strace64_arches}
1126 -ln %{buildroot}%{_bindir}/strace %{buildroot}%{_bindir}/strace64
1127 +%{copy64} %{buildroot}%{_bindir}/strace %{buildroot}%{_bindir}/strace64
1128 %endif
1130 %clean
1131 Index: strace/stream.c
1132 ===================================================================
1133 RCS file: /cvsroot/strace/strace/stream.c,v
1134 retrieving revision 1.28
1135 retrieving revision 1.29
1136 diff -u -r1.28 -r1.29
1137 --- strace/stream.c 1 Nov 2007 21:50:54 -0000 1.28
1138 +++ strace/stream.c 3 Sep 2008 01:22:18 -0000 1.29
1139 @@ -25,7 +25,7 @@
1140 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1141 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1143 - * $Id: stream.c,v 1.28 2007/11/01 21:50:54 roland Exp $
1144 + * $Id: stream.c,v 1.29 2008/09/03 01:22:18 ldv Exp $
1147 #include "defs.h"
1148 @@ -1177,7 +1177,7 @@
1150 if (exiting(tcp)) {
1151 tprintf("}");
1152 - if (timod && tcp->u_rval) {
1153 + if (timod && tcp->u_rval && !syserror(tcp)) {
1154 tcp->auxstr = xlookup (tli_errors, tcp->u_rval);
1155 return RVAL_STR + 1;
1157 Index: strace/syscall.c
1158 ===================================================================
1159 RCS file: /cvsroot/strace/strace/syscall.c,v
1160 retrieving revision 1.96
1161 retrieving revision 1.99
1162 diff -u -r1.96 -r1.99
1163 --- strace/syscall.c 25 Aug 2008 03:16:26 -0000 1.96
1164 +++ strace/syscall.c 10 Nov 2008 22:21:41 -0000 1.99
1165 @@ -30,7 +30,7 @@
1166 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1167 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1169 - * $Id: syscall.c,v 1.96 2008/08/25 03:16:26 roland Exp $
1170 + * $Id: syscall.c,v 1.99 2008/11/10 22:21:41 ldv Exp $
1173 #include "defs.h"
1174 @@ -746,6 +746,8 @@
1175 static long result,flags;
1176 #elif defined (M68K)
1177 static int d0;
1178 +#elif defined(BFIN)
1179 + static long r0;
1180 #elif defined (ARM)
1181 static struct pt_regs regs;
1182 #elif defined (ALPHA)
1183 @@ -899,6 +901,12 @@
1184 return 0;
1187 +#elif defined(BFIN)
1188 + if (upeek(pid, PT_ORIG_P0, &scno))
1189 + return -1;
1190 + /* Check if we return from execve. */
1191 + if (tcp->flags & TCB_WAITEXECVE && tcp->flags & TCB_INSYSCALL)
1192 + tcp->flags &= ~(TCB_INSYSCALL | TCB_WAITEXECVE);
1193 #elif defined (I386)
1194 if (upeek(pid, 4*ORIG_EAX, &scno) < 0)
1195 return -1;
1196 @@ -1455,6 +1463,9 @@
1198 * Nothing required
1200 +#elif defined(BFIN)
1201 + if (upeek(pid, PT_R0, &r0) < 0)
1202 + return -1;
1203 #elif defined (HPPA)
1204 if (upeek(pid, PT_GR28, &r28) < 0)
1205 return -1;
1206 @@ -1588,6 +1599,15 @@
1207 u_error = 0;
1209 #else /* !ARM */
1210 +#ifdef BFIN
1211 + if (is_negated_errno(r0)) {
1212 + tcp->u_rval = -1;
1213 + u_error = -r0;
1214 + } else {
1215 + tcp->u_rval = r0;
1216 + u_error = 0;
1218 +#else /* !BFIN */
1219 #ifdef ALPHA
1220 if (a3) {
1221 tcp->u_rval = -1;
1222 @@ -1655,6 +1675,7 @@
1223 #endif /* SPARC */
1224 #endif /* SPARC64 */
1225 #endif /* ALPHA */
1226 +#endif /* BFIN */
1227 #endif /* ARM */
1228 #endif /* M68K */
1229 #endif /* POWERPC */
1230 @@ -1781,6 +1802,11 @@
1231 return -1;
1233 #else /* !IA64 */
1234 +#ifdef BFIN
1235 + r0 = error ? -error : rval;
1236 + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)PT_R0, r0) < 0)
1237 + return -1;
1238 +#else /* !BFIN */
1239 #ifdef MIPS
1240 if (error) {
1241 r2 = error;
1242 @@ -1885,6 +1911,7 @@
1243 #endif /* M68K */
1244 #endif /* POWERPC */
1245 #endif /* MIPS */
1246 +#endif /* BFIN */
1247 #endif /* IA64 */
1248 #endif /* X86_64 */
1249 #endif /* I386 */
1250 @@ -2116,6 +2143,20 @@
1251 for (i = 0; i < tcp->u_nargs; i++)
1252 tcp->u_arg[i] = regs.uregs[i];
1254 +#elif defined(BFIN)
1256 + int i;
1257 + int argreg[] = {PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5};
1259 + if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
1260 + tcp->u_nargs = sysent[tcp->scno].nargs;
1261 + else
1262 + tcp->u_nargs = sizeof(argreg) / sizeof(argreg[0]);
1264 + for (i = 0; i < tcp->u_nargs; ++i)
1265 + if (upeek(pid, argreg[i], &tcp->u_arg[i]) < 0)
1266 + return -1;
1268 #elif defined(SH)
1270 int i;
1271 @@ -2369,6 +2410,8 @@
1272 strerror(u_error));
1273 break;
1275 + if ((sys_res & RVAL_STR) && tcp->auxstr)
1276 + tprintf(" (%s)", tcp->auxstr);
1278 else {
1279 if (sys_res & RVAL_NONE)
1280 @@ -2641,3 +2684,22 @@
1281 return 0;
1283 #endif /* SUNOS4 */
1285 +int
1286 +is_restart_error(struct tcb *tcp)
1288 +#ifdef LINUX
1289 + if (!syserror(tcp))
1290 + return 0;
1291 + switch (tcp->u_error) {
1292 + case ERESTARTSYS:
1293 + case ERESTARTNOINTR:
1294 + case ERESTARTNOHAND:
1295 + case ERESTART_RESTARTBLOCK:
1296 + return 1;
1297 + default:
1298 + break;
1300 +#endif /* LINUX */
1301 + return 0;
1303 Index: strace/system.c
1304 ===================================================================
1305 RCS file: /cvsroot/strace/strace/system.c,v
1306 retrieving revision 1.43
1307 retrieving revision 1.45
1308 diff -u -r1.43 -r1.45
1309 --- strace/system.c 16 Jan 2007 15:10:08 -0000 1.43
1310 +++ strace/system.c 11 Nov 2008 00:21:09 -0000 1.45
1311 @@ -27,7 +27,7 @@
1312 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1313 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1315 - * $Id: system.c,v 1.43 2007/01/16 15:10:08 ldv Exp $
1316 + * $Id: system.c,v 1.45 2008/11/11 00:21:09 ldv Exp $
1319 #include "defs.h"
1320 @@ -293,6 +293,33 @@
1322 #endif /* M68K */
1324 +#ifdef BFIN
1326 +#include <bfin_sram.h>
1328 +static const struct xlat sram_alloc_flags[] = {
1329 + { L1_INST_SRAM, "L1_INST_SRAM" },
1330 + { L1_DATA_A_SRAM, "L1_DATA_A_SRAM" },
1331 + { L1_DATA_B_SRAM, "L1_DATA_B_SRAM" },
1332 + { L1_DATA_SRAM, "L1_DATA_SRAM" },
1333 + { 0, NULL },
1336 +int
1337 +sys_sram_alloc(tcp)
1338 +struct tcb *tcp;
1340 + if (entering(tcp)) {
1341 + /* size */
1342 + tprintf("%zu, ", tcp->u_arg[0]);
1343 + /* flags */
1344 + printxval(sram_alloc_flags, tcp->u_arg[1], "L1_???_SRAM");
1346 + return 1;
1349 +#endif
1351 #endif /* LINUX */
1353 #ifdef SUNOS4
1354 @@ -1480,6 +1507,21 @@
1355 { 1<<CAP_SYS_RESOURCE, "CAP_SYS_RESOURCE"},
1356 { 1<<CAP_SYS_TIME, "CAP_SYS_TIME" },
1357 { 1<<CAP_SYS_TTY_CONFIG,"CAP_SYS_TTY_CONFIG"},
1358 +#ifdef CAP_MKNOD
1359 + { 1<<CAP_MKNOD, "CAP_MKNOD" },
1360 +#endif
1361 +#ifdef CAP_LEASE
1362 + { 1<<CAP_LEASE, "CAP_LEASE" },
1363 +#endif
1364 +#ifdef CAP_AUDIT_WRITE
1365 + { 1<<CAP_AUDIT_WRITE, "CAP_AUDIT_WRITE"},
1366 +#endif
1367 +#ifdef CAP_AUDIT_CONTROL
1368 + { 1<<CAP_AUDIT_CONTROL, "CAP_AUDIT_CONTROL"},
1369 +#endif
1370 +#ifdef CAP_SETFCAP
1371 + { 1<<CAP_SETFCAP, "CAP_SETFCAP" },
1372 +#endif
1373 { 0, NULL },
1376 Index: strace/time.c
1377 ===================================================================
1378 RCS file: /cvsroot/strace/strace/time.c,v
1379 retrieving revision 1.24
1380 retrieving revision 1.26
1381 diff -u -r1.24 -r1.26
1382 --- strace/time.c 20 May 2008 04:56:13 -0000 1.24
1383 +++ strace/time.c 3 Sep 2008 01:22:18 -0000 1.26
1384 @@ -26,7 +26,7 @@
1385 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1386 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1388 - * $Id: time.c,v 1.24 2008/05/20 04:56:13 roland Exp $
1389 + * $Id: time.c,v 1.26 2008/09/03 01:22:18 ldv Exp $
1392 #include "defs.h"
1393 @@ -329,6 +329,21 @@
1394 return 0;
1397 +int
1398 +sys_nanosleep(struct tcb *tcp)
1400 + if (entering(tcp)) {
1401 + print_timespec(tcp, tcp->u_arg[0]);
1402 + tprintf(", ");
1403 + } else {
1404 + if (!tcp->u_arg[1] || is_restart_error(tcp))
1405 + print_timespec(tcp, tcp->u_arg[1]);
1406 + else
1407 + tprintf("%#lx", tcp->u_arg[1]);
1409 + return 0;
1412 static const struct xlat which[] = {
1413 { ITIMER_REAL, "ITIMER_REAL" },
1414 { ITIMER_VIRTUAL,"ITIMER_VIRTUAL"},
1415 @@ -659,6 +674,8 @@
1416 tprintf("%#lx", tcp->u_arg[0]);
1417 else if (tprint_timex(tcp, tcp->u_arg[0]) < 0)
1418 tprintf("{...}");
1419 + if (syserror(tcp))
1420 + return 0;
1421 tcp->auxstr = xlookup(adjtimex_state, tcp->u_rval);
1422 if (tcp->auxstr)
1423 return RVAL_STR;
1424 Index: strace/util.c
1425 ===================================================================
1426 RCS file: /cvsroot/strace/strace/util.c,v
1427 retrieving revision 1.79
1428 retrieving revision 1.81
1429 diff -u -r1.79 -r1.81
1430 --- strace/util.c 6 Aug 2008 21:43:35 -0000 1.79
1431 +++ strace/util.c 10 Nov 2008 23:19:13 -0000 1.81
1432 @@ -30,7 +30,7 @@
1433 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1434 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1436 - * $Id: util.c,v 1.79 2008/08/06 21:43:35 kratochvil Exp $
1437 + * $Id: util.c,v 1.81 2008/11/10 23:19:13 ldv Exp $
1440 #include "defs.h"
1441 @@ -407,6 +407,12 @@
1443 static char path[MAXPATHLEN + 1];
1446 + * Quote string `instr' of length `size'
1447 + * Write up to (3 + `size' * 4) bytes to `outstr' buffer.
1448 + * If `len' < 0, treat `instr' as a NUL-terminated string
1449 + * and quote at most (`size' - 1) bytes.
1450 + */
1451 static int
1452 string_quote(const char *instr, char *outstr, int len, int size)
1454 @@ -417,12 +423,18 @@
1455 if (xflag > 1)
1456 usehex = 1;
1457 else if (xflag) {
1458 + /* Check for presence of symbol which require
1459 + to hex-quote the whole string. */
1460 for (i = 0; i < size; ++i) {
1461 c = ustr[i];
1462 - if (len < 0 && i == size - 2 && c != '\0')
1463 - ++i;
1464 - if (len < 0 && c == '\0')
1465 - break;
1466 + /* Check for NUL-terminated string. */
1467 + if (len < 0) {
1468 + if (c == '\0')
1469 + break;
1470 + /* Quote at most size - 1 bytes. */
1471 + if (i == size - 1)
1472 + continue;
1474 if (!isprint(c) && !isspace(c)) {
1475 usehex = 1;
1476 break;
1477 @@ -433,20 +445,31 @@
1478 *s++ = '\"';
1480 if (usehex) {
1481 + /* Hex-quote the whole string. */
1482 for (i = 0; i < size; ++i) {
1483 c = ustr[i];
1484 - if (len < 0 && c == '\0')
1485 - break;
1486 + /* Check for NUL-terminated string. */
1487 + if (len < 0) {
1488 + if (c == '\0')
1489 + break;
1490 + /* Quote at most size - 1 bytes. */
1491 + if (i == size - 1)
1492 + continue;
1494 sprintf(s, "\\x%02x", c);
1495 s += 4;
1497 } else {
1498 for (i = 0; i < size; ++i) {
1499 c = ustr[i];
1500 - if (len < 0 && i == size - 2 && c != '\0')
1501 - ++i;
1502 - if (len < 0 && c == '\0')
1503 - break;
1504 + /* Check for NUL-terminated string. */
1505 + if (len < 0) {
1506 + if (c == '\0')
1507 + break;
1508 + /* Quote at most size - 1 bytes. */
1509 + if (i == size - 1)
1510 + continue;
1512 switch (c) {
1513 case '\"': case '\\':
1514 *s++ = '\\';
1515 @@ -495,18 +518,25 @@
1516 return i == size;
1520 + * Print path string specified by address `addr' and length `n'.
1521 + * If path length exceeds `n', append `...' to the output.
1522 + */
1523 void
1524 printpathn(struct tcb *tcp, long addr, int n)
1526 - if (n > sizeof path - 1)
1527 - n = sizeof path - 1;
1529 - if (addr == 0) {
1530 + if (!addr) {
1531 tprintf("NULL");
1532 return;
1535 + /* Cap path length to the path buffer size,
1536 + and NUL-terminate the buffer. */
1537 + if (n > sizeof path - 1)
1538 + n = sizeof path - 1;
1539 path[n] = '\0';
1541 + /* Fetch one byte more to find out whether path length > n. */
1542 if (umovestr(tcp, addr, n + 1, path) < 0)
1543 tprintf("%#lx", addr);
1544 else {
1545 @@ -515,7 +545,8 @@
1547 if (trunc)
1548 path[n] = '\0';
1549 - if (string_quote(path, outstr, -1, n + 1) || trunc)
1550 + (void) string_quote(path, outstr, -1, n + 1);
1551 + if (trunc)
1552 strcat(outstr, "...");
1553 tprintf("%s", outstr);
1555 @@ -527,6 +558,11 @@
1556 printpathn(tcp, addr, sizeof path - 1);
1560 + * Print string specified by address `addr' and length `len'.
1561 + * If `len' < 0, treat the string as a NUL-terminated string.
1562 + * If string length exceeds `max_strlen', append `...' to the output.
1563 + */
1564 void
1565 printstr(struct tcb *tcp, long addr, int len)
1567 @@ -538,32 +574,39 @@
1568 tprintf("NULL");
1569 return;
1571 - if (!str) {
1572 - if ((str = malloc(max_strlen + 1)) == NULL
1573 - || (outstr = malloc(4*max_strlen
1574 - + sizeof "\"\"...")) == NULL) {
1575 - fprintf(stderr, "out of memory\n");
1576 - tprintf("%#lx", addr);
1577 - return;
1579 + /* Allocate static buffers if they are not allocated yet. */
1580 + if (!str)
1581 + str = malloc(max_strlen + 1);
1582 + if (!outstr)
1583 + outstr = malloc(4 * max_strlen + sizeof "\"...\"");
1584 + if (!str || !outstr) {
1585 + fprintf(stderr, "out of memory\n");
1586 + tprintf("%#lx", addr);
1587 + return;
1590 if (len < 0) {
1591 + /*
1592 + * Treat as a NUL-terminated string: fetch one byte more
1593 + * because string_quote() quotes one byte less.
1594 + */
1595 size = max_strlen + 1;
1596 + str[max_strlen] = '\0';
1597 if (umovestr(tcp, addr, size, str) < 0) {
1598 tprintf("%#lx", addr);
1599 return;
1602 else {
1603 - size = MIN(len, max_strlen + 1);
1604 + size = MIN(len, max_strlen);
1605 if (umoven(tcp, addr, size, str) < 0) {
1606 tprintf("%#lx", addr);
1607 return;
1611 - if (string_quote(str, outstr, len, size))
1612 + if (string_quote(str, outstr, len, size) &&
1613 + (len < 0 || len > max_strlen))
1614 strcat(outstr, "...");
1616 tprintf("%s", outstr);
1617 @@ -1068,6 +1111,9 @@
1618 #elif defined(ARM)
1619 if (upeek(tcp->pid, 4*15, &pc) < 0)
1620 return -1;
1621 +#elif defined(BFIN)
1622 + if (upeek(tcp->pid, REG_PC, &pc) < 0)
1623 + return -1;
1624 #elif defined(POWERPC)
1625 if (upeek(tcp->pid, sizeof(unsigned long)*PT_NIP, &pc) < 0)
1626 return -1;
1627 @@ -1245,6 +1291,14 @@
1628 return;
1630 tprintf("[%08lx] ", pc);
1631 +#elif defined(BFIN)
1632 + long pc;
1634 + if (upeek(tcp->pid, PT_PC, &pc) < 0) {
1635 + PRINTBADPC;
1636 + return;
1638 + tprintf("[%08lx] ", pc);
1639 #endif /* !architecture */
1640 #endif /* LINUX */
1642 Index: strace/linux/dummy.h
1643 ===================================================================
1644 RCS file: /cvsroot/strace/strace/linux/dummy.h,v
1645 retrieving revision 1.18
1646 retrieving revision 1.19
1647 diff -u -r1.18 -r1.19
1648 --- strace/linux/dummy.h 5 Jul 2007 19:28:35 -0000 1.18
1649 +++ strace/linux/dummy.h 3 Sep 2008 01:02:47 -0000 1.19
1650 @@ -25,7 +25,7 @@
1651 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1652 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1654 - * $Id: dummy.h,v 1.18 2007/07/05 19:28:35 roland Exp $
1655 + * $Id: dummy.h,v 1.19 2008/09/03 01:02:47 ldv Exp $
1658 /* still unfinished */
1659 @@ -58,7 +58,6 @@
1660 #define sys_fchdir sys_close
1661 #define sys_setfsuid sys_setuid
1662 #define sys_setfsgid sys_setgid
1663 -#define sys_nanosleep sys_adjtime
1664 #define sys_acct sys_chdir
1665 #define sys_fdatasync sys_close
1666 #define sys_mlock sys_munmap
1667 Index: strace/linux/syscall.h
1668 ===================================================================
1669 RCS file: /cvsroot/strace/strace/linux/syscall.h,v
1670 retrieving revision 1.59
1671 retrieving revision 1.61
1672 diff -u -r1.59 -r1.61
1673 --- strace/linux/syscall.h 25 Aug 2008 03:15:43 -0000 1.59
1674 +++ strace/linux/syscall.h 10 Nov 2008 22:53:03 -0000 1.61
1675 @@ -25,7 +25,7 @@
1676 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1677 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1679 - * $Id: syscall.h,v 1.59 2008/08/25 03:15:43 roland Exp $
1680 + * $Id: syscall.h,v 1.61 2008/11/10 22:53:03 ldv Exp $
1683 #include "dummy.h"
1684 @@ -105,6 +105,7 @@
1685 int sys_utimensat(), sys_epoll_pwait(), sys_signalfd(), sys_timerfd(), sys_eventfd();
1686 int sys_getcpu();
1687 int sys_fallocate(), sys_timerfd_create(), sys_timerfd_settime(), sys_timerfd_gettime();
1688 +int sys_signalfd4(), sys_eventfd2(), sys_epoll_create1(), sys_dup3(), sys_pipe2();
1690 /* sys_socketcall subcalls */
1692 @@ -326,3 +327,7 @@
1693 #ifdef POWERPC
1694 int sys_subpage_prot();
1695 #endif
1697 +#ifdef BFIN
1698 +int sys_sram_alloc();
1699 +#endif
1700 Index: strace/linux/syscallent.h
1701 ===================================================================
1702 RCS file: /cvsroot/strace/strace/linux/syscallent.h,v
1703 retrieving revision 1.54
1704 retrieving revision 1.56
1705 diff -u -r1.54 -r1.56
1706 --- strace/linux/syscallent.h 18 Jul 2008 01:23:49 -0000 1.54
1707 +++ strace/linux/syscallent.h 10 Nov 2008 22:53:03 -0000 1.56
1708 @@ -25,7 +25,7 @@
1709 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1710 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1712 - * $Id: syscallent.h,v 1.54 2008/07/18 01:23:49 roland Exp $
1713 + * $Id: syscallent.h,v 1.56 2008/11/10 22:53:03 ldv Exp $
1716 { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
1717 @@ -200,7 +200,7 @@
1718 { 3, 0, printargs, "nfsservctl" }, /* 169 */
1719 { 3, 0, sys_setresgid, "setresgid" }, /* 170 */
1720 { 3, 0, sys_getresgid, "getresgid" }, /* 171 */
1721 - { 5, 0, printargs, "prctl" }, /* 172 */
1722 + { 5, 0, sys_prctl, "prctl" }, /* 172 */
1723 { 1, TS, printargs, "rt_sigreturn" }, /* 173 */
1724 { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
1725 { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */
1726 @@ -357,12 +357,12 @@
1727 { 6, TF, sys_fallocate, "fallocate" }, /* 324 */
1728 { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 325 */
1729 { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 326 */
1730 - { 5, 0, printargs, "SYS_327" }, /* 327 */
1731 - { 5, 0, printargs, "SYS_328" }, /* 328 */
1732 - { 5, 0, printargs, "SYS_329" }, /* 329 */
1733 - { 5, 0, printargs, "SYS_330" }, /* 330 */
1734 - { 5, 0, printargs, "SYS_331" }, /* 331 */
1735 - { 5, 0, printargs, "SYS_332" }, /* 332 */
1736 + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 327 */
1737 + { 2, TD, sys_eventfd2, "eventfd2" }, /* 328 */
1738 + { 1, 0, sys_epoll_create1, "epoll_create1" }, /* 329 */
1739 + { 3, TD, sys_dup3, "dup3" }, /* 330 */
1740 + { 2, TD, sys_pipe2, "pipe2" }, /* 331 */
1741 + { 1, TD, printargs, "inotify_init1" }, /* 332 */
1742 { 5, 0, printargs, "SYS_333" }, /* 333 */
1743 { 5, 0, printargs, "SYS_334" }, /* 334 */
1744 { 5, 0, printargs, "SYS_335" }, /* 335 */
1745 Index: strace/linux/alpha/syscallent.h
1746 ===================================================================
1747 RCS file: /cvsroot/strace/strace/linux/alpha/syscallent.h,v
1748 retrieving revision 1.22
1749 retrieving revision 1.23
1750 diff -u -r1.22 -r1.23
1751 --- strace/linux/alpha/syscallent.h 18 Jul 2008 01:23:49 -0000 1.22
1752 +++ strace/linux/alpha/syscallent.h 3 Sep 2008 00:52:47 -0000 1.23
1753 @@ -25,7 +25,7 @@
1754 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1755 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1757 - * $Id: syscallent.h,v 1.22 2008/07/18 01:23:49 roland Exp $
1758 + * $Id: syscallent.h,v 1.23 2008/09/03 00:52:47 ldv Exp $
1761 { 6, 0, printargs, "osf_syscall" }, /* 0, not implemented */
1762 @@ -376,7 +376,7 @@
1763 { 5, 0, printargs, "pciconfig_read" }, /* 345 */
1764 { 5, 0, printargs, "pciconfig_write" }, /* 346 */
1765 { 5, 0, sys_query_module, "query_module" }, /* 347 */
1766 - { 5, 0, printargs, "prctl" }, /* 348 */
1767 + { 5, 0, sys_prctl, "prctl" }, /* 348 */
1768 { 5, TD, sys_pread, "pread" }, /* 349 */
1769 { 5, TD, sys_pwrite, "pwrite" }, /* 350 */
1770 { 1, TS, printargs, "rt_sigreturn" }, /* 351 */
1771 Index: strace/linux/arm/syscallent.h
1772 ===================================================================
1773 RCS file: /cvsroot/strace/strace/linux/arm/syscallent.h,v
1774 retrieving revision 1.15
1775 retrieving revision 1.16
1776 diff -u -r1.15 -r1.16
1777 --- strace/linux/arm/syscallent.h 18 Jul 2008 01:23:49 -0000 1.15
1778 +++ strace/linux/arm/syscallent.h 3 Sep 2008 00:52:47 -0000 1.16
1779 @@ -25,7 +25,7 @@
1780 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1781 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1783 - * $Id: syscallent.h,v 1.15 2008/07/18 01:23:49 roland Exp $
1784 + * $Id: syscallent.h,v 1.16 2008/09/03 00:52:47 ldv Exp $
1787 { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 0 */
1788 @@ -200,7 +200,7 @@
1789 { 3, 0, printargs, "nfsservctl" }, /* 169 */
1790 { 3, 0, sys_setresgid, "setresgid" }, /* 170 */
1791 { 3, 0, sys_getresgid, "getresgid" }, /* 171 */
1792 - { 5, 0, printargs, "prctl" }, /* 172 */
1793 + { 5, 0, sys_prctl, "prctl" }, /* 172 */
1794 { 1, TS, printargs, "rt_sigreturn" }, /* 173 */
1795 { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
1796 { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */
1797 Index: strace/linux/m68k/syscallent.h
1798 ===================================================================
1799 RCS file: /cvsroot/strace/strace/linux/m68k/syscallent.h,v
1800 retrieving revision 1.7
1801 retrieving revision 1.8
1802 diff -u -r1.7 -r1.8
1803 --- strace/linux/m68k/syscallent.h 18 Jul 2008 01:23:49 -0000 1.7
1804 +++ strace/linux/m68k/syscallent.h 3 Sep 2008 00:52:47 -0000 1.8
1805 @@ -25,7 +25,7 @@
1806 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1807 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1809 - * $Id: syscallent.h,v 1.7 2008/07/18 01:23:49 roland Exp $
1810 + * $Id: syscallent.h,v 1.8 2008/09/03 00:52:47 ldv Exp $
1813 { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
1814 @@ -200,7 +200,7 @@
1815 { 3, 0, printargs, "nfsservctl" }, /* 169 */
1816 { 3, 0, sys_setresgid, "setresgid" }, /* 170 */
1817 { 3, 0, sys_getresgid, "getresgid" }, /* 171 */
1818 - { 5, 0, printargs, "prctl" }, /* 172 */
1819 + { 5, 0, sys_prctl, "prctl" }, /* 172 */
1820 { 1, TS, printargs, "rt_sigreturn" }, /* 173 */
1821 { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
1822 { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */
1823 Index: strace/linux/powerpc/syscallent.h
1824 ===================================================================
1825 RCS file: /cvsroot/strace/strace/linux/powerpc/syscallent.h,v
1826 retrieving revision 1.35
1827 retrieving revision 1.36
1828 diff -u -r1.35 -r1.36
1829 --- strace/linux/powerpc/syscallent.h 25 Aug 2008 03:09:16 -0000 1.35
1830 +++ strace/linux/powerpc/syscallent.h 3 Sep 2008 00:52:47 -0000 1.36
1831 @@ -25,7 +25,7 @@
1832 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1833 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1835 - * $Id: syscallent.h,v 1.35 2008/08/25 03:09:16 roland Exp $
1836 + * $Id: syscallent.h,v 1.36 2008/09/03 00:52:47 ldv Exp $
1839 { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
1840 @@ -199,7 +199,7 @@
1841 { 3, 0, printargs, "nfsservctl" }, /* 168 */
1842 { 3, 0, sys_setresgid, "setresgid" }, /* 169 */
1843 { 3, 0, sys_getresgid, "getresgid" }, /* 170 */
1844 - { 5, 0, printargs, "prctl" }, /* 171 */
1845 + { 5, 0, sys_prctl, "prctl" }, /* 171 */
1846 { 1, TS, printargs, "rt_sigreturn" }, /* 172 */
1847 { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 173 */
1848 { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 174 */
1849 Index: strace/linux/s390/syscallent.h
1850 ===================================================================
1851 RCS file: /cvsroot/strace/strace/linux/s390/syscallent.h,v
1852 retrieving revision 1.24
1853 retrieving revision 1.25
1854 diff -u -r1.24 -r1.25
1855 --- strace/linux/s390/syscallent.h 18 Jul 2008 01:23:49 -0000 1.24
1856 +++ strace/linux/s390/syscallent.h 3 Sep 2008 00:52:47 -0000 1.25
1857 @@ -200,7 +200,7 @@
1858 { 3, 0, printargs, "nfsservctl" }, /* 169 */
1859 { 3, 0, sys_setresgid, "setresgid" }, /* 170 */
1860 { 3, 0, sys_getresgid, "getresgid" }, /* 171 */
1861 - { 5, 0, printargs, "prctl" }, /* 172 */
1862 + { 5, 0, sys_prctl, "prctl" }, /* 172 */
1863 { 1, TS, sys_sigreturn, "rt_sigreturn" }, /* 173 */
1864 { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
1865 { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */
1866 Index: strace/linux/s390x/syscallent.h
1867 ===================================================================
1868 RCS file: /cvsroot/strace/strace/linux/s390x/syscallent.h,v
1869 retrieving revision 1.23
1870 retrieving revision 1.24
1871 diff -u -r1.23 -r1.24
1872 --- strace/linux/s390x/syscallent.h 18 Jul 2008 01:23:49 -0000 1.23
1873 +++ strace/linux/s390x/syscallent.h 3 Sep 2008 00:52:47 -0000 1.24
1874 @@ -199,7 +199,7 @@
1875 { 3, 0, printargs, "nfsservctl" }, /* 169 */
1876 { -1, 0, printargs, "SYS_170" }, /* 170 */
1877 { -1, 0, printargs, "SYS_171" }, /* 171 */
1878 - { 5, 0, printargs, "prctl" }, /* 172 */
1879 + { 5, 0, sys_prctl, "prctl" }, /* 172 */
1880 { 1, TS, sys_sigreturn, "rt_sigreturn" }, /* 173 */
1881 { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
1882 { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */
1883 Index: strace/linux/sh/syscallent.h
1884 ===================================================================
1885 RCS file: /cvsroot/strace/strace/linux/sh/syscallent.h,v
1886 retrieving revision 1.18
1887 retrieving revision 1.19
1888 diff -u -r1.18 -r1.19
1889 --- strace/linux/sh/syscallent.h 19 Nov 2007 22:10:22 -0000 1.18
1890 +++ strace/linux/sh/syscallent.h 3 Sep 2008 00:52:47 -0000 1.19
1891 @@ -27,7 +27,7 @@
1892 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1893 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1895 - * $Id: syscallent.h,v 1.18 2007/11/19 22:10:22 roland Exp $
1896 + * $Id: syscallent.h,v 1.19 2008/09/03 00:52:47 ldv Exp $
1899 { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 0 */
1900 @@ -202,7 +202,7 @@
1901 { 3, 0, printargs, "nfsservctl" }, /* 169 */
1902 { 3, 0, sys_setresgid, "setresgid" }, /* 170 */
1903 { 3, 0, sys_getresgid, "getresgid" }, /* 171 */
1904 - { 5, 0, printargs, "prctl" }, /* 172 */
1905 + { 5, 0, sys_prctl, "prctl" }, /* 172 */
1906 { 1, TS, printargs, "rt_sigreturn" }, /* 173 */
1907 { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
1908 { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */
1909 Index: strace/linux/sh64/syscallent.h
1910 ===================================================================
1911 RCS file: /cvsroot/strace/strace/linux/sh64/syscallent.h,v
1912 retrieving revision 1.15
1913 retrieving revision 1.16
1914 diff -u -r1.15 -r1.16
1915 --- strace/linux/sh64/syscallent.h 20 May 2008 01:25:52 -0000 1.15
1916 +++ strace/linux/sh64/syscallent.h 3 Sep 2008 00:52:47 -0000 1.16
1917 @@ -25,7 +25,7 @@
1918 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1919 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1921 - * $Id: syscallent.h,v 1.15 2008/05/20 01:25:52 roland Exp $
1922 + * $Id: syscallent.h,v 1.16 2008/09/03 00:52:47 ldv Exp $
1925 { 0, 0, sys_setup, "setup" }, /* 0 */
1926 @@ -200,7 +200,7 @@
1927 { 3, 0, printargs, "nfsservctl" }, /* 169 */
1928 { 3, 0, sys_setresgid, "setresgid" }, /* 170 */
1929 { 3, 0, sys_getresgid, "getresgid" }, /* 171 */
1930 - { 5, 0, printargs, "prctl" }, /* 172 */
1931 + { 5, 0, sys_prctl, "prctl" }, /* 172 */
1932 { 1, TS, printargs, "rt_sigreturn" }, /* 173 */
1933 { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
1934 { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */
1935 Index: strace/linux/x86_64/syscallent.h
1936 ===================================================================
1937 RCS file: /cvsroot/strace/strace/linux/x86_64/syscallent.h,v
1938 retrieving revision 1.31
1939 retrieving revision 1.34
1940 diff -u -r1.31 -r1.34
1941 --- strace/linux/x86_64/syscallent.h 18 Jul 2008 01:23:49 -0000 1.31
1942 +++ strace/linux/x86_64/syscallent.h 10 Nov 2008 22:53:03 -0000 1.34
1943 @@ -155,7 +155,7 @@
1944 { 3, 0, sys_modify_ldt, "modify_ldt" }, /* 154 */
1945 { 2, TF, sys_pivotroot, "pivot_root" }, /* 155 */
1946 { 1, 0, sys_sysctl, "_sysctl" }, /* 156 */
1947 - { 5, 0, printargs, "prctl" }, /* 157 */
1948 + { 5, 0, sys_prctl, "prctl" }, /* 157 */
1949 { 2, TP, sys_arch_prctl, "arch_prctl" }, /* 158 */
1950 { 1, 0, sys_adjtimex, "adjtimex" }, /* 159 */
1951 { 2, 0, sys_setrlimit, "setrlimit" }, /* 160 */
1952 @@ -274,8 +274,8 @@
1953 { 2, 0, printargs, "set_robust_list" }, /* 273 */
1954 { 3, 0, printargs, "get_robust_list" }, /* 274 */
1955 { 6, TD, printargs, "splice" }, /* 275 */
1956 - { 4, TD, printargs, "sync_file_range" }, /* 276 */
1957 - { 4, TD, printargs, "tee" }, /* 277 */
1958 + { 4, TD, printargs, "tee" }, /* 276 */
1959 + { 4, TD, printargs, "sync_file_range" }, /* 277 */
1960 { 4, TD, printargs, "vmsplice" }, /* 278 */
1961 { 6, 0, sys_move_pages, "move_pages" }, /* 279 */
1962 { 4, TD|TF, sys_utimensat, "utimensat" }, /* 280 */
1963 @@ -286,3 +286,10 @@
1964 { 6, TF, sys_fallocate, "fallocate" }, /* 285 */
1965 { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 286 */
1966 { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 287 */
1967 + { 6, TN, printargs, "paccept" }, /* 288 */
1968 + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 289 */
1969 + { 2, TD, sys_eventfd2, "eventfd2" }, /* 290 */
1970 + { 1, 0, sys_epoll_create1, "epoll_create1" }, /* 291 */
1971 + { 3, TD, sys_dup3, "dup3" }, /* 292 */
1972 + { 2, TD, sys_pipe2, "pipe2" }, /* 293 */
1973 + { 1, TD, printargs, "inotify_init1" }, /* 294 */