]> granicus.if.org Git - strace/blob - ChangeLog
.
[strace] / ChangeLog
1 2005-06-08  Dmitry V. Levin  <ldv@altlinux.org>
2
3         Introduce "-e trace=desc".
4         * defs.h (TRACE_DESC): New flag.
5         * syscall.c: Define TD macro before include of syscallent files
6         and undefine it afterwards.
7         (lookup_class): Recognize "desc" keyword.
8         * strace.1: Document "-e trace=desc".
9         * freebsd/i386/syscallent.h: Mark those syscalls which take a
10         file descriptor as an argument or return a file descriptor with
11         TD flag.
12         * linux/alpha/syscallent.h: Likewise.
13         * linux/hppa/syscallent.h: Likewise.
14         * linux/ia64/syscallent.h: Likewise.
15         * linux/mips/syscallent.h: Likewise.
16         * linux/powerpc/syscallent.h: Likewise.
17         * linux/s390/syscallent.h: Likewise.
18         * linux/s390x/syscallent.h: Likewise.
19         * linux/sh/syscallent.h: Likewise.
20         * linux/sh64/syscallent.h: Likewise.
21         * linux/sparc/syscallent.h: Likewise.
22         * linux/sparc64/syscallent2.h: Likewise.
23         * linux/sparc64/syscallent.h: Likewise.
24         * linux/syscallent.h: Likewise.
25         * linux/x86_64/syscallent.h: Likewise.
26         * sunos4/syscallent.h: Likewise.
27         * svr4/syscallent.h: Likewise.
28         Fixes RH#159400.
29
30         Remove TF flag from those syscalls which have no filename argument.
31         * freebsd/i386/syscallent.h: Remove TF flag from fstat, pread,
32         pwrite, fstat, sendfile.
33         * linux/alpha/syscallent.h: Remove TF flag from read, write,
34         pread, pwrite, sendfile.
35         * linux/hppa/syscallent.h: Remove TF flag from read, write,
36         pread, pwrite, fstat64, sendfile, ftruncate64.
37         * linux/ia64/syscallent.h: Remove TF flag from read, write,
38         sendfile, fstat, fadvise64.
39         * linux/mips/syscallent.h: Remove TF flag from read, write,
40         fstatfs, fstat, pread, pwrite, sendfile, ftruncate64, fstat64,
41         sendfile64, fadvise64, fstatfs64.
42         * linux/powerpc/syscallent.h: Remove TF flag from read, write,
43         fstat, pread, pwrite, sendfile, ftruncate64, fstat64, sendfile64,
44         fadvise64, fstatfs64, fadvise64_64.
45         * linux/s390/syscallent.h: Remove TF flag from pread, pwrite,
46         sendfile, ftruncate64, fstat64, sendfile64.
47         * linux/s390x/syscallent.h: Remove TF flag from pread, pwrite,
48         sendfile, sendfile64.
49         * linux/sh/syscallent.h: Remove TF flag from pread, pwrite,
50         sendfile, fstat64.
51         * linux/sh64/syscallent.h: Remove TF flag from pread, pwrite,
52         sendfile, ftruncate64, fstat64.
53         * linux/sparc/syscallent.h: Remove TF flag from sendfile, fstat64,
54         pread, pwrite, sendfile64.
55         * linux/sparc64/syscallent2.h: Likewise.
56         * linux/sparc64/syscallent.h: Likewise.
57         * linux/syscallent.h: Remove TF flag from pread, pwrite, sendfile,
58         ftruncate64, fstat64, sendfile64, fadvise64, fadvise64, fstatfs64,
59         fadvise64_64.
60         * linux/x86_64/syscallent.h: Remove TF flag from pread, pwrite,
61         sendfile, fadvise64_64.
62         * svr4/syscallent.h: Remove TF flag from pread, pwrite, ftruncate,
63         fstatvfs64, ftruncate64.
64         Fixes RH#159340.
65
66 2005-07-04  Roland McGrath  <roland@redhat.com>
67
68         * net.c (sockipv6options): Add IPV6_ADD_MEMBERSHIP,
69         IPV6_DROP_MEMBERSHIP, IPV6_ROUTER_ALERT.
70         From Ulrich Drepper <drepper@redhat.com>.
71         Fixes RH#162450.
72
73         * net.c (sockipoptions): Fix typos.
74         From Ulrich Drepper <drepper@redhat.com>.
75         Fixes RH#161578.
76
77         * util.c (printnum_int): New function, printnum with s/long/int/.
78         * defs.h: Declare it.
79         * net.c (printsockopt): Use it for int-sized option.
80         Fixes RH#162449.
81         Reported by Ulrich Drepper <drepper@redhat.com>.
82
83 2005-06-09  Roland McGrath  <roland@redhat.com>
84
85         * configure.ac, NEWS: Version 4.5.12.
86         * debian/changelog, strace.spec: 4.5.12-1.
87
88 2005-06-08  Dmitry V. Levin  <ldv@altlinux.org>
89
90         Minor namespace cleanup.
91         * defs.h (string_quote): Remove declaration.
92         * file.c (openmodessol) [LINUXSPARC]: Make static.
93         (fileflags): Likewise.
94         (aclcmds, aclipc) [HAVE_SYS_ACL_H]: Likewise.
95         (direnttypes) [FREEBSD || LINUX]: Likewise.
96         (xattrflags): Likewise.
97         * process.c (unalignctl_string): Make static.
98         (setarg): Disable.
99         * syscall.c (subcalls_table): Make static.
100         (socket_map) [!(LINUX && (ALPHA || MIPS))]: Likewise.
101         (sparc_socket_decode): Make static, define for [SPARC || SPARC64] only.
102         (decode_subcall): Make static.
103         (syscall_fixup): Likewise.
104         (get_error): Likewise.
105         (syscall_enter): Likewise.
106         * util.c (tv_tv): Disable.
107         (getpc): Likewise.
108         (string_quote): Make static.
109         Fixes RH#159688.
110
111 2005-05-12  Philippe De Muyter  <phdm@macqel.be>
112
113         * util.c (getpc, printcall): Check #if defined(M68K), not M68k.
114         Enables `-i' on m68k machines.
115
116 2005-06-06  Roland McGrath  <roland@redhat.com>
117
118         * process.c (struct_user_offsets) [X86_64]: Reorder elements so
119         matching works right.
120         Fixes RH#159787.
121
122         * linux/syscall.h (SYS_socket, SYS_bind, SYS_connect, SYS_listen)
123         (SYS_accept, SYS_getsockname, SYS_getpeername, SYS_socketpair)
124         (SYS_send, SYS_recv, SYS_sendto, SYS_recvfrom, SYS_shutdown)
125         (SYS_setsockopt, SYS_getsockopt, SYS_sendmsg, SYS_recvmsg)
126         (SYS_getsockname, SYS_semop, SYS_semgsub_et, SYS_semget, SYS_semctl)
127         (SYS_semtimedop, SYS_msgsnd, SYS_msgrcv, SYS_msgget)
128         (SYS_msgctl, SYS_shmat, SYS_shmdt, SYS_shmget)
129         (SYS_shmctl): Macros renamed to SYS_sub_*.
130         * syscall.c (dumpio): Match SYS_sub_* if defined instead of SYS_*.
131
132         * linux/syscall.h (SYS_waitid): Define if not defined.
133
134         * linux/syscallent.h: Fix pread/pwrite names to pread64/pwrite64.
135
136         * defs.h (struct sysent): New member `native_scno'.
137         (known_scno): Declare new function.
138         * linux/syscallent.h: Add new final field to interesting syscalls.
139         * syscall.c (known_scno): New function.
140         (dumpio, internal_syscall, syscall_fixup, trace_syscall): Use it.
141         * process.c (internal_fork, internal_exit): Likewise.
142         [IA64] (ARG_STACKSIZE, ARG_PTID, ARG_CTID, ARG_TLS): Likewise.
143         * strace.c (proc_open): Likewise.
144         * util.c [LINUX] (setbpt): Likewise.
145         * linux/syscall.h: Remove [!defined(X86_64)] from conditional
146         for defining SYS_socket_subcall et al.
147         * linux/syscallent.h: Likewise for #error check.
148         * syscall.c (trace_syscall): Likewise for SYS_{socketcall,ipc} cases.
149         Fixes RH#158934.
150
151 2005-06-02  Roland McGrath  <roland@redhat.com>
152
153         * file.c (printstatfs64): Cast values to unsigned long long and use
154         %llu formats.
155         Fixes RH#158243.
156
157 2005-05-31  Dmitry V. Levin  <ldv@altlinux.org>
158
159         Deal with memory management issues.
160         * defs.h (tprint_iov): Update prototype.
161         * desc.c (sys_epoll_wait) [HAVE_SYS_EPOLL_H]: Do not allocate
162         epoll_event array of arbitrary size on the stack, to avoid
163         stack overflow.
164         * file.c (print_xattr_val): Check for integer overflow during
165         malloc size calculation, to avoid heap corruption.
166         * io.c (tprint_iov) [HAVE_SYS_UIO_H]: Check for integer overflow
167         during malloc size calculation, to avoid heap corruption.
168         Change iovec array handling to avoid heap memory allocation.
169         * mem.c (get_nodes) [LINUX]: Check for integer overflow during
170         size calculation and do not allocate array of arbitrary size on
171         the stack, to avoid stack overflow.
172         * net.c (printcmsghdr) [HAVE_SENDMSG]: Do not allocate array of
173         arbitrary size on the stack, to avoid stack overflow.  Do not
174         trust cmsg.cmsg_len to avoid read beyond the end of allocated
175         object.
176         (printmsghdr) [HAVE_SENDMSG]: Update tprint_iov() usage.
177         * process.c (sys_setgroups): Check for integer overflow during
178         malloc size calculation, to avoid heap corruption.  Change gid_t
179         array handling to avoid heap memory allocation.
180         (sys_getgroups): Likewise.
181         (sys_setgroups32) [LINUX]: Likewise.
182         (sys_getgroups32) [LINUX]: Likewise.
183         * stream.c (sys_poll) [HAVE_SYS_POLL_H]: Check for integer
184         overflow during malloc size calculation, to avoid heap corruption.
185         Change pollfd array handling to avoid heap memory allocation.
186         * system.c (sys_sysctl) [LINUX]: Check for integer overflow
187         during malloc size calculation, to avoid heap corruption.
188         * util.c (dumpiov) [HAVE_SYS_UIO_H]: Check for integer overflow
189         during malloc size calculation, to avoid heap corruption.
190         Fixes RH#159196.
191
192         * util.c (printxval): Change third argument from "char *" to
193         "const char *".
194         (printflags): Add third argument, "const char *", with similar
195         meaning to the third argument of printxval().
196         * defs.h (printxval): Change third argument from "char *" to
197         "const char *".
198         (printflags): Add third argument.
199         * bjm.c (sys_query_module) [LINUX]: Pass third argument to
200         printflags().
201         * desc.c (sys_fcntl): Likewise.
202         (sys_flock) [LOCK_SH]: Likewise.
203         (print_epoll_event) [HAVE_SYS_EPOLL_H]: Likewise.
204         * file.c (sys_open): Likewise.
205         (solaris_open) [LINUXSPARC]: Likewise.
206         (sys_access): Likewise.
207         (sys_chflags, sys_fchflags) [FREEBSD]: Likewise.
208         (realprintstat) [HAVE_LONG_LONG_OFF_T &&
209         HAVE_STRUCT_STAT_ST_FLAGS]: Likewise.
210         (printstat64) [HAVE_STAT64 &&
211         HAVE_STRUCT_STAT_ST_FLAGS]: Likewise.
212         (sys_setxattr, sys_fsetxattr): Likewise.
213         * ipc.c (sys_msgget, sys_msgsnd, sys_msgrcv, sys_semget,
214         sys_shmget, sys_shmat) [LINUX || SUNOS4 || FREEBSD]: Likewise.
215         (sys_mq_open) [LINUX]: Likewise.
216         (printmqattr) [HAVE_MQUEUE_H]: Likewise.
217         * mem.c (print_mmap) [!HAVE_LONG_LONG_OFF_T]: Likewise.
218         (sys_mmap64) [_LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T]: Likewise.
219         (sys_mprotect): Likewise.
220         (sys_mremap, sys_madvise, sys_mlockall) [LINUX]: Likewise.
221         (sys_msync) [MS_ASYNC]: Likewise.
222         (sys_mctl) [MC_SYNC]: Likewise.
223         (sys_remap_file_pages, sys_mbind, sys_get_mempolicy) [LINUX]:
224         Likewise.
225         * net.c (printmsghdr) [HAVE_STRUCT_MSGHDR_MSG_CONTROL]: Likewise.
226         (sys_send, sys_sendto): Likewise.
227         (sys_sendmsg) [HAVE_SENDMSG]: Likewise.
228         (sys_recv, sys_recvfrom): Likewise.
229         (sys_recvmsg) [HAVE_SENDMSG]: Likewise.
230         (printicmpfilter) [ICMP_FILTER]: Likewise.
231         * proc.c (proc_ioctl) [SVR4 && !HAVE_MP_PROCFS || FREEBSD]: Likewise.
232         * process.c (sys_clone) [LINUX]: Likewise.
233         (printwaitn): Likewise.
234         (sys_waitid) [SVR4 || LINUX]: Likewise.
235         * signal.c (sys_sigvec) [SUNOS4 || FREEBSD]: Likewise.
236         (sys_sigaction): Likewise.
237         (printcontext) [SVR4]: Likewise.
238         (print_stack_t) [LINUX) || FREEBSD]: Likewise.
239         (sys_rt_sigaction) [LINUX]: Likewise.
240         * sock.c (sock_ioctl) [LINUX]: Likewise.
241         * stream.c (sys_putmsg, sys_getmsg): Likewise.
242         (sys_putpmsg) [SYS_putpmsg]: Likewise.
243         (sys_getpmsg) [SYS_getpmsg]: Likewise.
244         (sys_poll): Likewise.
245         (print_transport_message) [TI_BIND]: Likewise.
246         (stream_ioctl): Likewise.
247         * system.c (sys_mount, sys_reboot): Likewise.
248         (sys_cacheflush) [LINUX && M68K]: Likewise.
249         (sys_capget, sys_capset) [SYS_capget]: Likewise.
250         * term.c (term_ioctl) [TIOCMGET]: Likewise.
251         * time.c (sys_clock_nanosleep, sys_timer_settime) [LINUX]:
252         Likewise.
253         Fixes RH#159310.
254
255         * bjm.c (sys_query_module) [LINUX]: Unitize "out of memory"
256         errors reporting style.
257         * strace.c (rebuild_pollv) [USE_PROCFS]: Likewise.
258         * system.c (sys_capget, sys_capset) [SYS_capget]: Likewise.
259         * util.c (printstr): Likewise.
260         (dumpiov) [HAVE_SYS_UIO_H]: Likewise.
261         (fixvfork) [SUNOS4]: Likewise.
262         * desc.c (decode_select): Continue to decode syscall arguments
263         in case of OOM condition.
264         * file.c (sys_getdents): Likewise.
265         (sys_getdents64) [_LFS64_LARGEFILE]: Likewise.
266         (sys_getdirentries) [FREEBSD]: Likewise.
267         * mem.c (sys_mincore): Changed type of variables which deal with
268         malloc size from int to unsigned long.
269         Fixes RH#159308.
270
271 2005-05-22  Dmitry V. Levin  <ldv@altlinux.org>
272
273         * bjm.c [LINUX]: Do not include <linux/linkage.h>.  It is not
274         safe to include kernel headers, and this one is not used anyway.
275         Fixes RH#158488.
276
277 2005-05-26  Roland McGrath  <roland@redhat.com>
278
279         * system.c (sys_sysctl): Check for errors accessing user pointers.
280         Use malloc instead of alloca in case size is insane.
281
282 2005-05-09  Roland McGrath  <roland@redhat.com>
283
284         * configure.ac: Check for libaio.h.
285         * desc.c (sys_io_setup, sys_io_submit, sys_io_cancel,
286         sys_io_getevents, sys_io_destroy): New functions.
287         * linux/syscall.h: Declare them.
288         * linux/syscallent.h: Use those for io_* syscalls.
289         * linux/alpha/syscallent.h: Likewise.
290         * linux/hppa/syscallent.h: Likewise.
291         * linux/ia64/syscallent.h: Likewise.
292         * linux/mips/syscallent.h: Likewise.
293         * linux/powerpc/syscallent.h: Likewise.
294         * linux/s390/syscallent.h: Likewise.
295         * linux/s390x/syscallent.h: Likewise.
296         * linux/x86_64/syscallent.h: Likewise.
297         From Zach Brown <zach.brown@oracle.com>.
298         Fixes RH#155065.
299
300         * debian/control (Architecture): Add ppc64.
301         Fixes Debian bug #301089.
302
303 2005-05-05  Anton Blanchard  <anton@samba.org>
304
305         * process.c (ptrace_cmds): Add PTRACE_GETVRREGS and PTRACE_SETVRREGS
306         if defined.
307
308 2005-05-09  Roland McGrath  <roland@redhat.com>
309
310         * strace.c (main): Refuse negative -s argument value.
311         Fixes Debian bug #303256.
312
313 2005-04-25  Anton Blanchard  <anton@samba.org>
314
315         * file.c (openmodes): Add O_NOATIME flag if defined.
316
317 2005-04-05  Anton Blanchard  <anton@samba.org>
318
319         * linux/powerpc/ioctlent.h: Regenerated.
320
321         * signal.c (signame): Don't try and dereference negative index.
322
323         * linux/powerpc/syscallent.h: Add debug_setcontext, vserver,
324         mbind, *_mempolicy, mq_*, sys_kexec_load, add_key, request_key,
325         keyctl, waitid, sys_semtimedop.  Fix various other syscalls.
326
327         * ipc.c (shm_resource_flags): New variable, table has SHM_HUGETLB
328         but not IPC_NOWAIT, which have the same value.
329         (sys_shmget): Use that instead of resource_flags.
330
331 2005-03-22  Roland McGrath  <roland@redhat.com>
332
333         * desc.c (decode_select): Increase local buffer size.
334         Fixes RH#151570.
335
336         * configure.ac, NEWS: Version 4.5.11.
337         * debian/changelog, strace.spec: 4.5.11-1.
338
339         * linux/arm/syscallent.h: Fix 113 entry (syscall, not vm86old).
340
341 2005-03-14  Roland McGrath  <roland@redhat.com>
342
343         * configure.ac, NEWS: Version 4.5.10.
344         * debian/changelog, strace.spec: 4.5.10-1.
345
346 2005-02-26  GOTO Masanori  <gotom@debian.or.jp>
347
348         * linux/alpha/syscallent.h: Fix the reversed order of lstat64 and
349         fstat64.  Clean up osf_nrecvmsg and osf_ngetsockname.
350
351 2005-02-28  Andreas Schwab  <schwab@suse.de>
352
353         * syscall.c (getrval2): Move #ifdef IA64 inside #ifdef LINUX.
354
355 2005-03-14  Roland McGrath  <roland@redhat.com>
356
357         * linux/mips/syscallent.h: Update various calls.
358         From Thiemo Seufer <ths@networkno.de>.
359         Fixes Debian bug #256684.
360
361         * debian/control (Architecture): Add s390.
362         Fixes Debian bug #294172.
363
364 2005-03-06  Roland McGrath  <roland@redhat.com>
365
366         * strace.c (trace) [PTRACE_GETSIGINFO]: Fetch siginfo_t for SIGSEGV
367         and SIGBUS signals, use si_addr in output.
368
369 2005-03-01  Roland McGrath  <roland@redhat.com>
370
371         * file.c (print_xattr_val): Add a cast.
372
373 2005-02-05  Roland McGrath  <roland@redhat.com>
374
375         * desc.c (decode_select): Calculate size of passed fd_set vectors and
376         copy in the user's size rather than the standard sizeof(fd_set).
377         Fixes Debian bug #65654, #284290.
378
379         * util.c (printpath, printpathn): Print NULL and don't try any fetch
380         when ADDR is zero.
381         Fixes Debian bug #63093.
382
383         * debian/control (Build-Depends): Fix for s390 and sparc.
384         From Bastian Blank <waldi@debian.org>.
385         Fixes Debian bug #293564.
386
387 2004-12-19  Dmitry V. Levin  <ldv@altlinux.org>
388
389         * strace.c (main) [!USE_PROCFS]: In child process, raise SIGSTOP
390         right before execv() call.  Remove fake_execve() call.
391         * defs.h (fake_execve): Remove unused declaration.
392         * process.c (fake_execve): Remove unused function.
393         Fixes RH#143365.
394
395 2005-02-04  Roland McGrath  <roland@redhat.com>
396
397         * configure.ac, NEWS: Version 4.5.9.
398         * debian/changelog, strace.spec: 4.5.9-2.
399
400         * file.c (O_LARGEFILE): Omit when #undef'd because it was zero.
401
402 2005-02-02  Roland McGrath  <roland@redhat.com>
403
404         * debian/control: Add strace-udeb package for installer debugging.
405         * debian/rules (binary-arch): Build it.
406         From Joshua Kwan <joshk@triplehelix.org>.
407         Fixes Debian bug #268294.
408
409         * file.c (openmodes) [O_LARGEFILE] [O_LARGEFILE == 0]: Redefine to
410         known values for Linux.
411
412         * util.c (printcall): Print 16 ?s when long is 8 bytes.
413         Fixes RH#146932.
414
415         * linux/sparc/syscall.h: Declare sys_epoll_create, sys_epoll_ctl,
416         sys_epoll_wait.
417         * linux/sparc64/syscall.h: Just #include "../sparc/syscall.h" here.
418         * ioctl.c (nioctlents2): Add const to type.
419         Fixes Debian bug #278449.
420
421         * sock.c (iffflags): New variable, table of IFF_* values.
422         (print_addr): New function.
423         (sock_ioctl): Handle SIOCGIFADDR, SIOCGIFDSTADDR, SIOCGIFBRDADDR,
424         SIOCGIFNETMASK, SIOCGIFFLAGS, SIOCGIFMETRIC, SIOCGIFMTU, SIOCGIFSLAVE,
425         SIOCGIFHWADDR.  Use print_addr for SIOCGIFCONF, SIOCGIFNAME, and
426         SIOCGIFINDEX, and fix their output.
427         From Ulrich Drepper <drepper@redhat.com>.
428         Fixes RH#138223.
429         Fixes Debian bug #192164.
430
431 2004-12-20  Dmitry V. Levin  <ldv@altlinux.org>
432
433         * configure.ac: Use AC_GNU_SOURCE macro instead of changing CFLAGS.
434         * defs.h [HAVE_CONFIG_H]: Include config.h first.
435         * strace.c: Include "defs.h" first.
436         Fixes RH#143370.
437
438         * syscall.c (call_summary): Fix potential NULL dereference.
439         Fixes RH#143369.
440
441 2004-12-19  Dmitry V. Levin  <ldv@altlinux.org>
442
443         * syscall.c (qual_signal): Check bounds for numeric signal names.
444         Fix parser of symbolic signal names.
445         Fix return code, as required by qualify() function.
446         * syscall.c (qual_desc): Check bounds for descriptor number.
447         * syscall.c (qual_syscall): Correct return code, to be consistent
448         with qualify() and other qual_* functions.
449         Fixes RH#143362.
450
451 2005-02-01  Roland McGrath  <roland@redhat.com>
452
453         * system.c [LINUX] (MS_MANDLOCK, MS_NOATIME, MS_NODIRATIME, MS_BIND,
454         MS_MOVE, MS_REC, MS_VERBOSE, MS_POSIXACL, MS_ACTIVE, MS_NOUSER):
455         New macros.
456         [LINUX] (mount_flags): Add them.
457         [LINUX] (sys_mount): If any of (MS_BIND|MS_MOVE|MS_REMOUNT) bits are
458         set in the flags argument, don't try to fetch the filesystem string.
459         Fixes RH#141932.
460
461         * config.guess: Update from canonical version, timestamp 2004-11-12.
462         * config.sub: Likewise, timestamp 2004-11-30.
463
464         * process.c [LINUX] [X86_64] (sys_arch_prctl): New function.
465         * linux/syscall.h: Declare it.
466         * linux/x86_64/syscallent.h: Use it.
467         Part of RH#142667.
468
469         * process.c (sys_sched_setscheduler): Use %#lx format for bad pointer.
470         (sys_sched_getparam, sys_sched_setparam): Likewise.
471         Part of RH#142667.
472
473         * signal.c [HAVE_SIGACTION] [LINUX && X86_64] (SA_RESTORER): Define
474         here too.
475         Part of RH#142667.
476
477         * linux/syscallent.h: Use sys_mincore instead of printargs.
478         * linux/x86_64/syscallent.h: Likewise.  Also use sys_getrlimit,
479         sys_semtimedop, sys_umount2.
480         Part of RH#142667.
481
482         * syscall.c (qual_signal): Fix inverted return value and bogus
483         argument to qualify_one in the named case.
484
485         * file.c (print_xattr_val): Don't use auto array sized by syscall
486         argument.  Use malloc instead, so it can fail for insane values.
487         Fixes Debian bug #283704.
488
489         * net.c (sys_getsockopt): Fix a format %ld -> %d.
490
491         * linux/syscall.h [IA64] (SYS_semtimedop): #undef it.
492
493         * syscall.c (syscall_enter) [X86_64]: Fix 32-bit argument register map
494         not to double the middle entry!
495         Fixes RH#146093.
496
497         * linux/x86_64/syscallent.h: Fix exit_group entry.
498
499         * util.c (getpc) [S390 || S390X]: Implement it.
500         Patch by David Wilder <wilder@us.ibm.com>.
501
502         * linux/ia64/syscallent.h: Add fadvise64, fstatfs64, statfs64, mbind,
503         [gs]et_mempolicy, mq_*, sys_kexec_load, vserver, and waitid.
504         Fixes RH#146245.
505
506 2005-01-22  Andreas Schwab  <schwab@suse.de>
507
508         * net.c (sys_getsockopt): Change type of len to int.
509
510 2004-10-19  Roland McGrath  <roland@redhat.com>
511
512         * configure.ac, NEWS: Version 4.5.8.
513         * debian/changelog, strace.spec: 4.5.8-1.
514
515         * file.c (sys_fadvise64): Conditionalize just on [LINUX].
516
517         * configure.ac: Check for sys/epoll.h.
518         * desc.c: Protect #include <sys/epoll.h> with [HAVE_SYS_EPOLL_H].
519         (epollctls, epollevents): Protect each entry with #ifdef on its macro.
520
521         * strace.c (handle_group_exit): Don't detach leader that wasn't
522         TCB_ATTACHED.  Instead mark it with TCB_GROUP_EXITING.
523         Remove droptcb loop at end, no longer required since 2.6 reports each
524         thread death.
525         Fixes RH#135254.
526
527         * strace.c (trace): Use handle_group_exit for non-TCB_ATTACHED child
528         taking signal when it has nclone_threads > 0.
529
530         * strace.c (handle_group_exit, trace): Mark leader with
531         TCB_GROUP_EXITING and don't be surprised at child deaths when their
532         leader has it set.
533         Fixes RH#132150.
534
535         * process.c (WCOREFLAG): Define if not defined.
536         (W_STOPCODE, W_EXITCODE): Likewise.
537         Reported by Marty Leisner <mleisner@eng.mc.xerox.com>.
538
539         * sock.c [! LINUX]: Include <sys/socket.h> before <sys/sockio.h>.
540         Reported by Marty Leisner <mleisner@eng.mc.xerox.com>.
541
542         * debian/rules: Make strace64.1.gz symlink to strace.1.gz instead of
543         strace64.1 to strace.1, which doesn't exist.
544         Fixes Debian bug #269220.
545
546 2004-09-05  Phil Blundell  <pb@nexus.co.uk>
547
548         * linux/arm/syscallent.h: New file.
549
550 2004-10-19  Roland McGrath  <roland@redhat.com>
551
552         * debian/rules (DEB_BUILD_GNU_TYPE, CONFIG_OPTS): New variables.
553         [$(DEB_HOST_GNU_TYPE) == s390-linux] (build64, HOST64, CC64): Set them.
554         (build/Makefile): Use $(CONFIG_OPTS).
555         (build64/Makefile): Pass --host as well as --build.
556         From Bastian Blank <waldi@debian.org>.
557         Fixes Debian bug #271500.
558
559         * linux/hppa/syscallent.h: Update for 2.6.9 syscalls.
560         From Randolph Chung <tausq@debian.org>
561         Fixes Debian bug #273887.
562
563         * file.c (sys_llseek): Revert last change.
564
565 2004-09-14  Richard Henderson  <rth@twiddle.net>
566
567         * linux/alpha/syscallent.h: Add tgkill, *stat64, vserver, mbind,
568         [gs]et_mempolicy, mq_*, waitid.
569
570 2004-10-07  Roland McGrath  <roland@redhat.com>
571
572         * file.c (sys_llssek, sys_readahead, sys_fadvise64, sys_fadvise64_64):
573         Use LONG_LONG macro.
574         * io.c (sys_pread, sys_pwrite, sys_sendfile): Likewise.
575
576         * linux/x86_64/syscallent.h: Fix botched table entries.
577         From Ulrich Drepper <drepper@redhat.com>.
578
579         * mem.c [LINUX] (sys_mbind, sys_set_mempolicy, sys_get_mempolicy):
580         New functions.
581         * linux/syscall.h: Declare them.
582         * linux/x86_64/syscallent.h: Likewise.
583         From Ulrich Drepper <drepper@redhat.com>.
584
585         * linux/syscallent.h: Handle mbind, set_mempolicy, get_mempolicy.
586         From Ulrich Drepper <drepper@redhat.com>.
587
588         * file.c [LINUX && (I386 || X86_64)] (sys_fadvise64, sys_fadvise64_64):
589         New functions.
590         * linux/syscall.h: Declare them.
591         * linux/syscallent.h: Handle fadvise64 and fadvise64_64 using those.
592         * linux/x86_64/syscallent.h: Likewise.
593         From Ulrich Drepper <drepper@redhat.com>.
594
595 2004-09-13  Dmitry V. Levin  <ldv@altlinux.org>
596
597         * linux/ioctlsort.c (main): Omit duplicate lines
598         (with same name and code) from output.
599         * linux/ioctlent.sh: Build the list of ioctls defined in
600         scsi/sg.h (0x22..), scsi/scsi.h and scsi/scsi_ioctl.h (0x53..),
601         as suggested by Peter Jones <pjones@redhat.com>
602         * linux/ioctlent.h: Regenerated.
603         Fixes RH#129808.
604
605 2004-09-13  Ulrich Drepper <drepper@redhat.com>
606             Dmitry V. Levin <ldv@altlinux.org>
607
608         * time.c [LINUX] (print_rtc): New function, for printing rtc_time
609         structure.
610         [LINUX] (rtc_ioctl): New function, for parsing RTC_* ioctls.
611         * ioctl.c [LINUX] (ioctl_decode): Call rtc_ioctl.
612         * defs.h [LINUX]: Declare rtc_ioctl.
613         Fixes RH#58606.
614
615 2004-10-06  Roland McGrath  <roland@redhat.com>
616
617         * desc.c [LINUX] (sys_epoll_create, sys_epoll_ctl, sys_epoll_wait):
618         New functions.
619         * linux/syscall.h: Declare them.
620         * linux/syscallent.h: Use those for epoll_* syscalls.
621         * linux/alpha/syscallent.h: Likewise.
622         * linux/hppa/syscallent.h: Likewise.
623         * linux/ia64/syscallent.h: Likewise.
624         * linux/powerpc/syscallent.h: Likewise.
625         * linux/s390/syscallent.h: Likewise.
626         * linux/s390x/syscallent.h: Likewise.
627         * linux/sparc/syscallent.h: Likewise.
628         * linux/sparc64/syscallent.h: Likewise.
629         * linux/sparc64/syscallent2.h: Likewise.
630         * linux/x86_64/syscallent.h: Likewise.
631         From Ulrich Drepper <drepper@redhat.com>.
632         Fixes RH#134463.
633
634         * resource.c (resources): Add RLIMIT_LOCKS, RLIMIT_SIGPENDING,
635         and RLIMIT_MSGQUEUE, if defined.
636         From Ulrich Drepper <drepper@redhat.com>.
637         Fixes RH#133594.
638
639         * net.c [HAVE_SENDMSG] (printcmsghdr): New function.
640         (printmsghdr): Use it.
641         From Ulrich Drepper <drepper@redhat.com>.
642         Fixes RH#131689.
643
644         * file.c (sprintmode): Add const to return type.
645         (sprintfstype): Likewise.
646         * signal.c (printsiginfo): Add a const.
647
648 2004-09-15  Roland McGrath  <roland@redhat.com>
649
650         * linux/x86_64/syscallent.h: Use sys_waitid.
651
652         * linux/syscallent.h: waitid takes 5 arguments, and is in TP category.
653         * process.c (sys_waitid): Handle fifth argument (struct rusage *).
654
655 2004-09-11  Roland McGrath  <roland@redhat.com>
656
657         * time.c (sys_clock_nanosleep): Print zero flags arg correctly.
658         (sys_timer_settime): Likewise.
659         (printsigevent): Print signals by name for SIGEV_SIGNAL.
660         (sys_timer_create): Print clock ID symbolically.
661         From Ulrich Drepper <drepper@redhat.com>.
662         Fixes RH#131420.
663
664 2004-09-07  Michal Ludvig  <mludvig@suse.cz>
665
666         * defs.h (nioctlents1, nsignals2): Fix typos in decls.
667
668 2004-09-03  Roland McGrath  <roland@redhat.com>
669
670         * syscall.c (qual_options): Add const to defn.
671         Update all uses.
672         (call_count, error_count, tv_count): Variables removed.
673         (struct call_counts, counts): New type and variable.
674         Update all users of the old three to use the new array of structs.
675         (trace_syscall): Allocate counts on first use.
676         (sorted_count): Variable removed.
677         (call_summary): Allocate locally.
678
679         * syscall.c (sysent0, sysent1, sysent2, sysent): Add const to defn.
680         (nsyscalls0, nsyscalls1, nsyscalls2): Likewise.
681         (errnoent0, errnoent1, errnoent2, errnoent): Likewise.
682         (nerrnos0, nerrnos1, nerrnos2): Likewise.
683         * signal.c (signalent0, signalent1, signalent2): Likewise.
684         (nsignals0, nsignals1, nsignals2): Likewise.
685         (signame): LIkewise.
686         * ioctl.c (ioctlent0, ioctlent1, ioctlent2): Likewise.
687         (nioctlents0, nioctlents1, nioctlents2): Likewise.
688         (ioctl_lookup, ioctl_next_match): Likewise.
689         * defs.h: Update decls.
690         * io.c (sys_ioctl): Update users.
691
692         * util.c (xlookup, printxval, addflags, printflags): Use const for
693         struct xlat * argument.
694         * defs.h (xlookup, printxval, addflags, printflags): Update decls.
695         * bjm.c: Add const to all struct xlat defns.
696         * desc.c: Likewise.
697         * file.c: Likewise.
698         * ipc.c: Likewise.
699         * mem.c: Likewise.
700         * net.c: Likewise.
701         * proc.c: Likewise.
702         * process.c: Likewise.
703         * resource.c: Likewise.
704         * signal.c: Likewise.
705         * sock.c: Likewise.
706         * stream.c: Likewise.
707         * system.c: Likewise.
708         * term.c: Likewise.
709         * time.c: Likewise.
710         * util.c: Likewise.
711
712 2004-09-01  Roland McGrath  <roland@redhat.com>
713
714         * linux/x86_64/syscallent.h: Add new entries for timer_*, clock_*, and
715         mq_* syscalls, and names only for new calls up to 252.
716         * linux/syscallent.h: Add waitid.
717         * linux/x86_64/syscallent.h: Likewise.
718         * linux/syscall.h: Declare sys_waitid.
719
720         * process.c (internal_wait): Take second arg giving index of flags
721         argument.
722         * defs.h: Update prototype.
723         * syscall.c (internal_syscall): Update caller.
724         Also use internal_wait for SYS_waitid.
725         * process.c (sys_waitid): Define for [LINUX] as well.
726         Don't tweak TCB_SUSPENDED--internal_wait does that.
727         (waitid_types): Conditionalize use of nonstandard P_* macros.
728
729 2004-08-31  Roland McGrath  <roland@redhat.com>
730
731         * configure.ac, NEWS: Version 4.5.7.
732         * debian/changelog: 4.5.7-1.
733         * strace.spec: 4.5.7-2.
734
735         * debian/rules: Rewrite sparc64 change of 2004-07-12.
736         Always do each build in a separate build directory.
737         Fixes Debian bug #254728.
738
739         * time.c (clocknames): Use #ifdef around CLOCK_* uses.
740
741         * strace.1: Say that -c shows system CPU time, not real time.
742         Fixes Debian bug #254438.
743
744         * syscall.c (dumpio): Match pread and pwrite system calls too.
745         Fixes Debian bug #239947.
746
747         * net.c (sockoptions): Add all SO_* macros known in Linux 2.6.9.
748         Fixes Debian bug #171653.
749
750 2004-07-12  Dmitry V. Levin  <ldv@altlinux.org>
751
752         * signal.c [LINUX] (parse_sigset_t): Fix hex strings parser.
753         Fixes RH#128091.
754
755 2004-08-30  Roland McGrath  <roland@redhat.com>
756
757         * strace.c (main): Don't call fake_execve under -c.
758         From Ulrich Drepper <drepper@redhat.com>.
759         Fixes RH#129166.
760
761         * net.c (sockipoptions): Add some options.
762         [SOL_IPV6] (sockipv6options): New variable.
763         (sys_getsockopt, printsockopt): Use it for SOL_IPV6 level.
764         From Ulrich Drepper <drepper@redhat.com>.
765         Fixes RH#128391.
766
767         * time.c (clocknames): New variable, symbolic names for clock_t.
768         (sys_clock_settime, sys_clock_gettime, sys_clock_nanosleep): Use it.
769         From Ulrich Drepper <drepper@redhat.com>.
770         Fixes RH#129378.
771
772         * system.c (personality_options): Hard-code values here.
773         Don't #include <linux/personality.h> at all.
774         Fixes RH#130965 and Debian bug #40588.
775
776         * file.c (print_xattr_val): New function to show attribute values.
777         (sys_setxattr, sys_fsetxattr, sys_getxattr, sys_fgetxattr): Use it.
778         From Ulrich Drepper <drepper@redhat.com>.
779         Fixes RH#131177.
780
781 2004-07-12  Roland McGrath  <roland@redhat.com>
782
783         * configure.ac, NEWS: Version 4.5.6.
784         * strace.spec, debian/changelog: 4.5.6-1.
785
786         * Makefile.am (EXTRA_DIST): Add linux/sparc64 files.
787
788         * debian/rules: On sparc-linux, build strace64 as well.
789         From Ben Collins <bcollins@debian.org>.
790         Fixes Debian bug #254728.
791
792 2004-07-07  David S. Miller  <davem@nuts.davemloft.net>
793
794         * linux/sparc/syscallent.h: Sync with reality.
795         * linux/sparc/syscall.h (sys_sendfile64, sys_futex, sys_gettid,
796         sys_sched_setaffinity, sys_sched_getaffinity, sys_setxattr,
797         sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr,
798         sys_fgetxattr, sys_listxattr, sys_llistxattr, sys_flistxattr,
799         sys_removexattr, sys_lremovexattr, sys_fremovexattr,
800         sys_remap_file_pages, sys_readahead, sys_tgkill, sys_statfs64,
801         sys_fstatfs64, sys_clock_settime, sys_clock_gettime,
802         sys_clock_getres, sys_clock_nanosleep, sys_timer_create,
803         sys_timer_settime, sys_timer_gettime): New declarations.
804         * linux/sparc64/dummy2.h, linux/sparc64/syscallent2.h,
805         linux/sparc64/syscall.h, linux/sparc64/errnoent.h,
806         linux/sparc64/errnoent1.h, linux/sparc64/errnoent2.h,
807         linux/sparc64/ioctlent.h, linux/sparc64/ioctlent1.h,
808         linux/sparc64/ioctlent2.h, linux/sparc64/signalent.h,
809         linux/sparc64/signalent.h, linux/sparc64/signalent.h,
810         linux/sparc64/signalent1.h, linux/sparc64/signalent2.h,
811         linux/sparc64/syscall1.h, linux/sparc64/syscallent.h,
812         linux/sparc64/syscallent1.h: New files.
813         * defs.h (LINUXSPARC): Define also when SPARC64.
814         (LINUX && SPARC64): Set SUPPORTED_PERSONALITIES to 3.
815         Ignore SIGTRAP after execve by defining TCB_WAITEXECVE.
816         Define possibly missing __NR_exit_group.  Declare getrval2.
817         * configure.ac (sparc64): New architecture case.
818         * file.c (stat_sparc64): New structure.
819         (printstat_sparc64): New output routine for that.
820         (printstat): Call it, if personality is 2.
821         (printstat64): Likewise.
822         * util.c: Conditionalize ptrace defines on LINUXSPARC
823         not LINUX && SPARC.
824         (SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
825         to PTRACE_FOOREGS64 so that more sparc code can be shared
826         between 64-bit and 32-bit.
827         (_hack_syscall5): Correct trap number when SPARC64.
828         (PTRACE_WRITE{TEXT,DATA}): Add SPARC64 to ifdef guard.
829         (getpc): Handle SPARC64 && LINUX.
830         (printcall): Likewise.
831         (arg fetching/setting): Use same code for SPARC64 LINUX
832         as for SPARC.
833         (setbpt): Handle SPARC64 && LINUX.
834         (clearbpt): Likewise.
835         * signal.c: Conditionalize ptrace defines on SPARC and
836         SPARC64.
837         (SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
838         to PTRACE_FOOREGS64 so that more sparc code can be shared
839         between 64-bit and 32-bit.
840         (m_siginfo): Use same definition on SPARC64 as SPARC.
841         (sys_sigreturn): Handle LINUX && SPARC64.
842         * syscall.c: Conditionalize ptrace defines on SPARC and
843         SPARC64.
844         (SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
845         to PTRACE_FOOREGS64 so that more sparc code can be shared
846         between 64-bit and 32-bit.
847         (getscno): Use same static state on SPARC64 as SPARC,
848         and add SPARC64 handling.
849         (get_error): Handle LINUX && SPARC64.
850         (force_result): Likewise.
851         (syscall_enter): Likewise.
852         (trace_syscall): Handle sys_socketcall and sys_ipc on SPARC64
853         just like SPARC.
854         (getrval2): Handle LINUX && SPARC64.
855         * process.c: Conditionalize ptrace defines on SPARC and
856         SPARC64.
857         (SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
858         to PTRACE_FOOREGS64 so that more sparc code can be shared
859         between 64-bit and 32-bit.
860         (change_syscall): Handle LINUX && SPARC64.
861         (struct_user_offsets): Ifdef out those which do not exist
862         on SPARC64.
863         * net.c (sys_pipe): Handle LINUX && SPARC64.
864         * ioctl.c: Fix initializer typo for nioctlents2, was
865         nioctlents1 by accident.
866
867 2004-06-28  Andreas Schwab  <schwab@suse.de>
868
869         * process.c (internal_exec): Move TCB_WAITEXECVE handling here.
870         (sys_execve): Remove it here.
871
872 2004-07-12  Roland McGrath  <roland@redhat.com>
873
874         * Makefile.am (EXTRA_DIST): Add linux/sh64/syscallent.h.
875
876         * debian/control (Section): Move to utils, matching Debian override.
877
878         * net.c (addrfams): Make variable global.
879         * sock.c (sock_ioctl): Decode the arguments for SIOCGIFNAME,
880         SIOCGIFINDEX, and SIOCGIFCONF.
881         From Ulrich Drepper <drepper@redhat.com>.
882         Fixes RH#126917.
883
884         * linux/ioctlsort.c: Add some #includes.
885         [POWERPC]: Kludge out high bits.
886         * linux/ia64/ioctlent.h: Regenerated using RHEL3 headers.
887         * linux/powerpc/ioctlent.h: Likewise.
888
889 2004-07-11  Roland McGrath  <roland@redhat.com>
890
891         * linux/ioctlent.sh: Replace asm with $asm in all places.
892
893         * configure.ac: Add I386 as AM_CONDITIONAL.
894         * Makefile.am [LINUX]: Add maintainer-mode rules to regenerate
895         the ioctlent.h file.
896
897 2004-07-08  Roland McGrath  <roland@redhat.com>
898
899         * resource.c (sys_quotactl): Truncate first argument to 32 bits, since
900         that's what the kernel will do.
901
902 2004-07-07  Roland McGrath  <roland@redhat.com>
903
904         * linux/ioctlent.sh: Take optional second argument to use as directory
905         name in place of `asm'.
906
907 2004-06-27  Roland McGrath  <roland@redhat.com>
908
909         * configure.ac, NEWS: Version 4.5.5.
910         * strace.spec, debian/changelog: 4.5.5-1.
911
912 2004-06-22  Roland McGrath  <roland@redhat.com>
913
914         * syscall.c (syscall_fixup) [LINUX && X86_64]: For 32-bit process,
915         sign extend the low 32 bits of RAX to 64 bits.
916         Fixes RH#126547.
917
918         * syscall.c (force_result): [LINUX && X86_64]: Fix RAX*4 -> RAX*8.
919
920 2004-06-03  Roland McGrath  <roland@redhat.com>
921
922         * configure.ac, NEWS: Version 4.5.4.
923         * strace.spec, debian/changelog: 4.5.4-1.
924
925         * net.c (domains): Add many PF_* values #ifdef PF_*.
926         (addrfams): Add many AF_* values #ifdef AF_*.
927         Fixes Debian bug #250506.
928
929 2004-05-02  Dmitry V. Levin  <ldv@altlinux.org>
930
931         * linux/ioctlsort.c (compare): When ioctl codes equal, compare
932         names.
933         (main): Print a note that program output is generated by
934         ioctlsort.
935         * linux/ioctlent.sh: Build the list of ioctls defined in
936         linux/fb.h (0x46..), linux/kd.h (0x4B..), linux/cdrom.h (0x53..),
937         asm/ioctls.h (0x54..), linux/vt.h (0x56..), linux/videotext.h
938         (0x71..), linux/videotext.h (0x72..), asm/sockios.h (0x89..),
939         linux/sockios.h (0x89..), linux/wireless.h (0x8B..).
940         * linux/ioctlent.h: Regenerated from linux-2.6.5.
941         Fixes RH#122257.
942
943 2004-06-03  Roland McGrath  <roland@redhat.com>
944
945         * debian/control (Architecture): Add amd64.
946         Fixes Debian bug #246568.
947
948         * strace.c (main) [LINUX]: Expand TCBTAB as necessary for threads
949         attached.  Attach threads only under -f.  Set TCB_FOLLOWFORK in them.
950         (expand_tcbtab): New function, broken out of ...
951         * process.c (fork_tcb): ... here, call that.
952         * defs.h: Declare expand_tcbtab.
953
954 2004-04-19  Roland McGrath  <roland@redhat.com>
955
956         * process.c (printstatus): Add a space before | in output.
957
958 2004-04-16  Roland McGrath  <roland@redhat.com>
959
960         * configure.ac: Version 4.5.3.
961         * strace.spec, debian/changelog: 4.5.3-1.
962
963 2004-03-18  Dmitry V. Levin  <ldv@altlinux.org>
964
965         * resource.c (sys_quotactl) [LINUX]: Cast arithmetic shift operand
966         from long to unsigned long, to fix output of the quotactl command
967         parser.
968         Fixes RH#118694.
969
970 2004-04-16  Roland McGrath  <roland@redhat.com>
971
972         * linux/s390/ioctlent.h, linux/s390x/ioctlent.h: Update DASD ioctls.
973         From Maxim Shchetynin <maxim@de.ibm.com>.
974
975         * configure.ac: Check for <mqueue.h>.
976         * ipc.c (sys_mq_open, printmqattr) [! HAVE_MQUEUE_H]: Don't try to
977         decode struct mq_attr.
978         * NEWS: Mention mq support.
979
980         * linux/syscall.h: Support new mq_* syscalls on Linux.
981         * linux/syscallent.h: Likewise.
982         * linux/dummy.h: Likewise.
983         * ipc.c: Likewise.
984         * time.c (printsigevent): Handle SIGEV_THREAD.
985         From Ulrich Drepper <drepper@redhat.com>.
986         Fixes RH#120701.
987
988 2004-04-13  Roland McGrath  <roland@redhat.com>
989
990         * net.c (msg_flags): Grok MSG_FIX, MSG_SYN, MSG_RST, MSG_NOSIGNAL,
991         MSG_MORE.
992         From Ulrich Drepper <drepper@redhat.com>.
993         Fixes RH#120541.
994
995         * process.c (printstatus): Mask out bits presented symbolically, and
996         print "| 0xnnn" if the remaining bits are not all zero.
997         Fixes Debian bug #240062.
998
999         * process.c (print_affinitylist): Rewritten to handle indirect values.
1000         (sys_sched_setaffinity, sys_sched_getaffinity): Update callers.
1001         From Ulrich Drepper <drepper@redhat.com>.
1002         Fixes RH#118685.
1003
1004         * acinclude.m4: Quote first argument to AC_DEFUN in all cases.
1005
1006 2004-04-08  Roland McGrath  <roland@redhat.com>
1007
1008         * strace.c (main) [LINUX]: When attaching for -p, look in
1009         /proc/PID/task for all threads and attach them as presumed
1010         CLONE_THREAD children.
1011         * NEWS: Mention the feature.
1012         Fixes RH#120462.
1013
1014 2004-03-02  Roland McGrath  <roland@redhat.com>
1015
1016         * util.c (setbpt): Fix one missed spot to use new arg0_index macro.
1017         From Michael Holzheu <HOLZHEU@de.ibm.com>.
1018
1019         * debian/control (Standards-Version): Update to 3.6.1.
1020
1021 2004-03-01  Roland McGrath  <roland@redhat.com>
1022
1023         * configure.ac, NEWS: Version 4.5.2.
1024         * strace.spec, debian/changelog: 4.5.2-1.
1025
1026         * strace.c (main): Avoid potential buffer overruns from ludicrous
1027         arguments or PATH values.
1028         * syscall.c (qual_signal): Bail out for too-long string.
1029
1030         * mem.c [LINUX]: <asm/mman.h> -> <linux/mman.h>
1031         Fixes Debian bug #223207.
1032
1033         * linux/sparc/syscall.h: Copy linux/syscall.h decls of sys_sched_*.
1034
1035         * configure.ac: Check for `struct user_desc' in <asm/ldt.h>.
1036         * process.c [HAVE_STRUCT_USER_DESC]: Use struct user_desc in place of
1037         struct modify_ldt_ldt_s.
1038         * mem.c [HAVE_STRUCT_USER_DESC]: Likewise.
1039
1040         * system.c (sysctl_vm): Conditionalize VM_* macro uses, add some more.
1041         From Tim Yamin <plasmaroo@gentoo.org>.
1042
1043         * process.c (sys_execve): Clear instead of set TCB_WAITEXECVE on
1044         erring syscall.
1045
1046         * configure.ac: Check for `struct pt_all_user_regs'
1047         and `struct ia64_fpreg' in <sys/ptrace.h>.
1048         * util.c, process.c, syscall.c, signal.c: Work around conflicts between
1049         <sys/ptrace.h> and <linux/ptrace.h> for defining those types.
1050
1051         * process.c (struct_user_offsets) [LINUX && IA64]: Conditionalize
1052         PT_AR_CSD and PT_AR_SSD uses in case of older kernel headers.
1053
1054         * util.c [LINUX] (arg0_index, arg1_index): New macros.
1055         [S390 || S390X]: Define them with inverted values.
1056         (setbpt): Use them for u_arg indices.
1057
1058 2004-02-26  Andreas Schwab  <schwab@suse.de>
1059
1060         * defs.h [LINUX && IA64]: Declare getrval2 also on IA64.
1061         * net.c (sys_pipe) [LINUX && IA64]: For IA64 use the two return values.
1062         * syscall.c (getrval2) [LINUX && IA64]: Implement for IA64.
1063
1064 2004-03-01  Roland McGrath  <roland@redhat.com>
1065
1066         * linux/dummy.h (sys_sched_getscheduler, sys_sched_setparam,
1067         sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler,
1068         sys_sched_get_priority_max, sys_sched_get_priority_min): Remove macros.
1069         * process.c [LINUX] (sys_sched_getscheduler, sys_sched_setparam,
1070         sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler,
1071         sys_sched_get_priority_min): New functions.
1072         From Ulrich Drepper <drepper@redhat.com>.
1073         Fixes RH#116990.
1074
1075 2004-02-20  Roland McGrath  <roland@redhat.com>
1076
1077         * linux/hppa/syscallent.h: Update some syscalls.
1078         From Randolph Chung <tausq@debian.org>.
1079         Fixes Debian bug #231632.
1080
1081 2003-12-31  David Mosberger  <davidm@hpl.hp.com>
1082
1083         * process.c (internal_exit): For ia64, also recognize IA-32 252
1084         as exit_group().
1085         (change_syscall): For IA64, also support changing IA-32 syscalls.
1086         * syscall.c (internal_syscall): For IA64, also recognize IA-32
1087         syscall 252 (exit_group) as an internal_exit() syscall.
1088         * util.c (SYS_fork): For IA64, define them to the IA-32 syscall
1089         number.
1090         (SYS_vfork): Likewise.
1091         (arg_setup): For IA64 version, also support IA-32 syscalls.
1092         (get_arg0): Likewise.
1093         (get_arg1): Likewise.
1094         (set_arg0): Likewise.
1095         (set_arg1): Likewise.
1096
1097 2004-02-15  Anton Blanchard  <anton@samba.org>
1098
1099         * linux/powerpc/syscallent.h: Add rtas call.
1100         Shift multiplexed syscalls to start at 300, we are already about
1101         to hit 256 real syscalls.
1102         * linux/syscall.h: SYS_socket_subcall is now 300 for [POWERPC].
1103
1104 2004-02-19  Roland McGrath  <roland@redhat.com>
1105
1106         * strace.c (main): Use TCP->pid, not PID, in -p message.
1107         Fixes Debian bug #229802.
1108
1109 2004-01-13  Roland McGrath  <roland@redhat.com>
1110
1111         * syscall.c (force_result) [LINUX] [S390 || S390X]: Remove bogus upeek
1112         call.
1113
1114         * stream.c (internal_stream_ioctl): Fix typo strict -> struct.
1115         Reported by Petter Reinholdtsen <pere@hungry.com>.
1116
1117 2003-12-31  David Mosberger  <davidm@hpl.hp.com>
1118
1119         * process.c (struct_user_offsets) [IA64]: Fix up register name list.
1120
1121 2003-12-14  Anton Blanchard  <anton@samba.org>
1122
1123         * file.c (sys_getdents64): Don't cast d_ino and d_off to unsigned long.
1124         Use %llu formats for them.
1125
1126         * file.c [LINUX] (fsmagic): Add SYSFS_MAGIC.
1127
1128         * linux/powerpc/syscallent.h: Update to include recently added
1129         syscalls.
1130
1131         * syscall.c (get_error) [POWERPC]: Cast result to unsigned long for
1132         ppc64, we were misreporting syscalls that really succeeded as having
1133         failed.
1134
1135 2004-01-13  Roland McGrath  <roland@redhat.com>
1136
1137         * strace.1: Remove comment about vfork on Linux.
1138         Fixes Debian bug #223390.
1139
1140         * file.c (direnttypes): Define under [LINUX] as well.  Add DT_UNKNOWN.
1141         (sys_getdents64) [LINUX]: Print d_type field.
1142
1143 2003-12-15  Dmitry V. Levin  <ldv@altlinux.org>
1144
1145         * strace.c (trace) [WCOREDUMP]: Show coredump status of the
1146         killed process if available.  Fixes RH#112117.
1147
1148 2003-11-13  Roland McGrath  <roland@redhat.com>
1149
1150         * configure.ac, NEWS: Version 4.5.1.
1151         * strace.spec, debian/changelog: 4.5.1-1.
1152
1153 2003-09-06  Dmitry V. Levin  <ldv@altlinux.org>
1154
1155         * defs.h (ioctl_lookup): Prototype change.
1156         * ioctl.c (ioctl_next_match): New function.
1157         * defs.h: Declare it.
1158         * io.c (sys_ioctl): Use it, to display all possible ioctl names
1159         when there's more than one match.
1160         * ioctl.c (ioctl_lookup): Likewise.
1161         * stream.c (internal_stream_ioctl): Likewise.
1162         Patch from Solar Designer <solar@openwall.com>.
1163
1164 2003-11-13  Roland McGrath  <roland@redhat.com>
1165
1166         * linux/sh/syscallent.h: Use sys_setgroups32, sys_getgroups32.
1167         * linux/sh64/syscallent.h: Likewise.
1168
1169 2003-09-06  Dmitry V. Levin  <ldv@altlinux.org>
1170
1171         Fixes for RH#105359.
1172         * util.c (printuid): New function.
1173         * defs.h: Declare it.
1174         * file.c (sys_chown): Use it.
1175         * file.c (sys_fchown): Likewise.
1176         * process.c (sys_setreuid, sys_setregid, sys_setresuid,
1177         sys_setresgid): Likewise.
1178         * linux/syscallent.h: Better handle getgid32, geteuid32, getegid32,
1179         setreuid32, setregid32, getgroups32, setgroups32, fchown32,
1180         setresuid32, getresuid32, setresgid32, getresgid32, chown32,
1181         setuid32, setgid32, setfsuid32, setfsgid32.
1182         * process.c [LINUX]: Define GETGROUPS32_T.
1183         * process.c [LINUX] (sys_setgroups32, sys_getgroups32):
1184         New functions.
1185         * linux/syscall.h (sys_setgroups32, sys_getgroups32):
1186         Declare them.
1187
1188 2003-11-11  Roland McGrath  <roland@redhat.com>
1189
1190         * strace.c (main): Bail with usage error for missing command before we
1191         open the -o file or fiddle uids.
1192
1193 2003-11-06  Roland McGrath  <roland@redhat.com>
1194
1195         * strace.c (main): Treat piped output more like file output.
1196         Disallow -ff with piped output.  Fixes RH#105366.
1197         Reported by Dmitry V. Levin <ldv@altlinux.org>
1198
1199         * strace.c (tprintf): Check result of vfprintf and use perror when it
1200         fails while not writing to stderr itself.  Fixes Debian bug #218762.
1201
1202         * net.c (printsock): Fix typo in #ifdef AF_NETLINK.
1203         From Ulrich Drepper <drepper@redhat.com>.
1204
1205 2003-11-01  Roland McGrath  <roland@redhat.com>
1206
1207         * syscall.c (trace_syscall) [LINUX]: Calculate ONE_TICK once using
1208         setitimer rather than hard-coding a value based on HZ.
1209         Fixes RH#108012, reported by Florian La Roche <laroche@redhat.com>.
1210
1211 2003-10-21  Roland McGrath  <roland@redhat.com>
1212
1213         * strace.1: Fixed a few spelling errors.
1214         Fixes Debian bug #217008.
1215
1216         * syscall.c: Revert last change, was broken.
1217
1218 2003-10-01  Roland McGrath  <roland@redhat.com>
1219
1220         * process.c (internal_clone): Don't suspend parent when call requested
1221         a specific PID that is not a traced child.
1222
1223         * signal.c [LINUX] (parse_sigset_t): Rewrite to process hex strings
1224         from right to left so we don't have to presume the size.
1225         Reported by David Woodhouse <dwmw2@redhat.com>.
1226
1227 2003-09-25  Roland McGrath  <roland@redhat.com>
1228
1229         * mem.c (mmap_prot) [PROT_SEM, PROT_GROWSDOWN, PROT_GROWSUP]: Include
1230         these in the table if they are defined.
1231
1232 2003-09-24  Roland McGrath  <roland@redhat.com>
1233
1234         * configure.ac, NEWS: Version 4.5.
1235         * strace.spec, debian/changelog: 4.5-1.
1236
1237         * syscall.c (get_scno) [LINUX] [S390 || S390X]: Bail out of
1238         instruction decoding branch if TCB_INSYSCALL is clear.
1239         Reported by <jochen@penguin-breeder.org>.
1240
1241         * linux/ioctlent.h: Swap order of overloaded TC* and SNDCTL_* values.
1242
1243 2003-09-23  Roland McGrath  <roland@redhat.com>
1244
1245         * strace.spec: On ppc64 (maybe others later), create an strace64
1246         package as well containing just /usr/bin/strace64.
1247
1248         * signal.c (sprintsigmask): Print RT_%u for __SIGRTMIN..__SIGRTMAX.
1249         Fixes RH#104365.
1250
1251 2003-08-21  Roland McGrath  <roland@redhat.com>
1252
1253         * linux/syscallent.h: Fix mlock argument count.  Fixes RH#101499.
1254         * linux/x86_64/syscallent.h: Likewise.
1255         * linux/s390/syscallent.h: Likewise.
1256         * linux/s390x/syscallent.h: Likewise.
1257
1258 2003-07-28  Daniel Jacobowitz  <drow@mvista.com>
1259
1260         * defs.h (ALIGN64): Define for MIPS.
1261         * io.c (PREAD_OFFSET_ARG): Define.
1262         (sys_pread, sys_pwrite): Use it.
1263         * process.c (struct_user_offsets) [SH]: Check whether REG_XDREG0
1264         is defined.
1265         * linux/sh/syscallent.h (pread, pwrite): Take six arguments.
1266         (truncate64, ftruncate64): Pretty-print.
1267         * linux/mips/syscallent.h (pread, pwrite): Take six arguments.
1268         (truncate64, ftruncate64): Take four arguments.
1269
1270 2003-07-17  Roland McGrath  <roland@redhat.com>
1271
1272         * configure.ac, NEWS: Version 4.4.99.
1273         * strace.spec, debian/changelog: 4.4.99-1.
1274
1275 2003-07-15  Anton Blanchard  <anton@samba.org>
1276
1277         * ipc.c: Add SHM_HUGETLB field.
1278         Mask out permission bits in msgget, semget and shmget before
1279                 printing resource_flags.
1280         Mask execute permission bits (even though we dont currently
1281                 use them).
1282
1283 2003-07-17  Roland McGrath  <roland@redhat.com>
1284
1285         * linux/powerpc/syscallent.h (tgkill): New at 250.
1286
1287         * linux/syscallent.h: truncate64/ftruncate64 need 3 args.
1288         From Ulrich Drepper <drepper@redhat.com>.
1289
1290         * linux/syscallent.h: Handle statfs64, fstatfs64, utimes.
1291         * file.c (printstatfs): Print f_fsid and f_frsize.
1292         [LINUX] (printstatfs64, sys_statfs64, sys_fstatfs64): New functions.
1293         * linux/syscall.h: Add decls.
1294         From Ulrich Drepper <drepper@redhat.com>.
1295
1296 2003-07-09  Roland McGrath  <roland@redhat.com>
1297
1298         * linux/ia64/syscallent.h (tgkill): New at 1235.
1299
1300 2003-07-05  Richard Henderson  <rth@twiddle.net>
1301
1302         * process.c (sys_clone): Order arguments for alpha the same as x86_64.
1303         * syscall.c (ERESTART_RESTARTBLOCK): New.
1304         (trace_syscall): Print it.
1305         * linux/alpha/syscallent.h (osf_syscall): Name properly.
1306         (osf_set_program_attributes): Fix typo.
1307         (osf_nfssvc): Likewise.
1308         (osf_sigsendset): Likewise.
1309         (getdents64, gettid, readahead, tkill, setxattr, lsetxattr, fsetxattr,
1310         getxattr, lgetxattr, fgetxattr, listxattr, llistxattr, flistxattr,
1311         removexattr, lremovexattr, fremovexattr, futex, sched_setaffinity,
1312         sched_getaffinity, tuxcall, io_setup, io_destroy, io_getevents,
1313         io_submit, io_cancel, exit_group, lookup_dcookie, epoll_create,
1314         epoll_ctl, epoll_wait, remap_file_pages, set_tid_address,
1315         restart_syscall, fadvise, timer_create, timer_settime, timer_gettime,
1316         timer_getoverrun, timer_delete, clock_settime, clock_gettime,
1317         clock_getres, clock_nanosleep, semtimedop): New.
1318
1319 2003-07-08  Roland McGrath  <roland@redhat.com>
1320
1321         * signal.c (sys_tgkill): New function.
1322         * linux/syscall.h: Declare it.
1323         * linux/syscallent.h: Add tgkill.
1324
1325 2003-06-27  Roland McGrath  <roland@redhat.com>
1326
1327         * configure.ac: Check for type `struct __old_kernel_stat'.
1328         * file.c (convertoldstat, printoldstat): Define under
1329         [LINUX && HAVE_STRUCT___OLD_KERNEL_STAT] rather than a list of archs.
1330         (sys_oldstat, sys_oldfstat, sys_oldlstat): Likewise.
1331         * linux/dummy.h [! HAVE_STRUCT___OLD_KERNEL_STAT]
1332         (sys_oldstat, sys_oldfstat, sys_oldlstat): #define to printargs.
1333
1334 2003-06-26  Roland McGrath  <roland@redhat.com>
1335
1336         * configure.ac: SHMEDIA -> SH64
1337         * defs.h: Likewise.
1338         * mem.c: Likewise.
1339         * process.c: Likewise.
1340         * sock.c: Likewise.
1341         * syscall.c: Likewise.
1342         * util.c: Likewise.
1343         * linux/shmedia/syscallent.h: Moved to ...
1344         * linux/sh64/syscallent.h: ... here.
1345
1346         * config.guess: Update from canonical version, timestamp 2003-06-17.
1347         * config.sub: Likewise.
1348
1349         * syscall.c (force_result) [LINUX] [ARM]: Fix variable usage.
1350         From: Joshua Neal <tinara@netpipeline.net>.
1351
1352         * process.c [LINUX] (sys_futex): Grok FUTEX_REQUEUE and print 5th arg.
1353         * linux/syscallent.h: sys_futex argument count is now 5, not 4.
1354         * linux/ia64/syscallent.h: Likewise.
1355         * linux/powerpc/syscallent.h: Likewise.
1356         * linux/s390/syscallent.h: Likewise.
1357         * linux/s390x/syscallent.h: Likewise.
1358         * linux/x86_64/syscallent.h: Likewise.
1359         From Jakub Jelinek <jakub@redhat.com>.
1360
1361         * syscall.c (get_scno) [S390 || S390X]: Fix old vs new mode detection.
1362         From Michael Holzheu <HOLZHEU@de.ibm.com>.
1363
1364 2003-06-23  Roland McGrath  <roland@redhat.com>
1365
1366         * net.c (sys_socket): Decode protocol for PF_INET6 same as PF_INET.
1367         From Ulrich Drepper <drepper@redhat.com>.
1368
1369 2003-06-10  Roland McGrath  <roland@redhat.com>
1370
1371         * configure.ac, NEWS: Version 4.4.98.
1372         * strace.spec, debian/changelog: 4.4.98-1.
1373
1374 2003-06-09  Roland McGrath  <roland@redhat.com>
1375
1376         * linux/s390x/syscallent.h: Update many syscalls.
1377         * linux/syscall.h (SYS_socket_subcall): Update [S390X] value.
1378
1379         * linux/s390/syscallent.h: Update many syscalls.
1380         * linux/syscall.h (SYS_socket_subcall): Update [S390] value.
1381
1382         * linux/shmedia/syscallent.h: New file.
1383         From Stephen Thomas <stephen.thomas@superh.com>.
1384
1385         * strace.c (trace): Print a message and newline for a WIFEXITED report
1386         from the process we just printed an unterminated syscall line for.
1387
1388 2003-06-03  Roland McGrath  <roland@redhat.com>
1389
1390         * util.c (printcall) [LINUX]: Fix typo [IA62] -> [IA64].
1391
1392         Linux/ARM improvements from Russell King <rmk@arm.linux.org.uk>:
1393         * defs.h [LINUX] (TCB_WAITEXECVE): Define for [ARM] too.
1394         * process.c (struct_user_offsets) [LINUX] [ARM]: Add ARM registers.
1395         * signal.c [LINUX] (sys_sigreturn) [ARM]: New case.
1396         * syscall.c (get_scno, syscall_fixup) [LINUX] [ARM]: Case rewritten.
1397         (get_error) [LINUX] [ARM]: Update.
1398         (syscall_enter) [LINUX] [ARM]: New case.
1399         * util.c (printcall) [LINUX] [ARM]: New case.
1400
1401         * debian/control (Standards-Version): Update to 3.5.10.
1402
1403         * strace.c (main): In PATH search, accept only a regular file with
1404         execute bits set.  Fixes Debian bug #137103.
1405
1406 2003-06-02  Roland McGrath  <roland@redhat.com>
1407
1408         * strace.c (main): Set -q when given -o and not -p, and not when not
1409         given -o, to match what the man page always said.
1410         Fixes Debian bug #47113, #153678.
1411
1412         * configure.ac, NEWS: Version 4.4.97.
1413         * strace.spec, debian/changelog: 4.4.97-1.
1414
1415         * configure.ac, defs.h, mem.c, process.c, sock.c, syscall.c, util.c:
1416         Merged in SHmedia port from Stephen Thomas <stephen.thomas@superh.com>.
1417
1418         * config.guess: Update from ftp://ftp.gnu.org/pub/gnu/config/,
1419         timestamp 2003-05-22.
1420         * config.sub: Likewise, timestamp 2003-05-24.
1421
1422 2003-05-22  Roland McGrath  <roland@redhat.com>
1423
1424         * defs.h (struct tcb): New member `nzombies'.
1425         * strace.c (alloctcb): Initialize it.
1426         (droptcb): Increment our parent's zombie count.
1427         * process.c (internal_wait): Don't go into TCB_SUSPENDED if the
1428         process has zombies it can reap.  On the way out, if we reaped
1429         an untraced process, decrement the zombie count.
1430
1431         * process.c (sys_clone): Mask CSIGNAL out of flags and print that
1432         separately using signame.
1433
1434         * process.c (internal_clone) [TCB_CLONE_THREAD]: Use ARG_FLAGS instead
1435         of literal 0 for index.  Consult the right flags without clobbering
1436         anything when we reparent the new child to the caller's parent thread.
1437
1438         * linux/s390/syscallent.h: Fix sys_clone argument count.
1439         * linux/s390x/syscallent.h: Likewise.
1440         * linux/mips/syscallent.h: Likewise.
1441         * linux/alpha/syscallent.h: Likewise.
1442         * linux/powerpc/syscallent.h: Likewise.
1443         * linux/sh/syscallent.h: Likewise.
1444         * linux/sparc/syscallent.h: Likewise.
1445         * linux/hppa/syscallent.h: Likewise.
1446
1447         * process.c [LINUX] [S390 || S390X] (ARG_CTID, ARG_TLS): Fix swapped
1448         indices.  Reported by Jakub Jelinek <jakub@redhat.com>.
1449
1450         * signal.c [LINUX] (SI_SIGIO, SI_TKILL): New macros.
1451         [LINUX || SVR4] (siginfo_codes): Add strings for them.
1452
1453         * process.c (print_affinitylist): Fix loop condition.
1454         Reported by Ian Wienand <ianw@gelato.unsw.edu.au>.
1455
1456 2003-04-10  Roland McGrath  <roland@redhat.com>
1457
1458         * syscall.c (qual_desc): Return zero after parsing number.
1459         From Rob Leslie <rob@mars.org>, fixes Debian bug #188379.
1460
1461 2003-04-07  Roland McGrath  <roland@redhat.com>
1462
1463         * linux/syscallent.h: Handle semtimedop subcall of ipc syscall.
1464         * linux/syscall.h: Likewise.
1465         * ipc.c [LINUX] (sys_semtimedop): New function.
1466         From Ulrich Drepper <drepper@redhat.com>.
1467
1468         * ipc.c (sys_semget): Mask off permission bits for resource_flags.
1469         From Ulrich Drepper <drepper@redhat.com>.
1470
1471 2003-04-01  Philippe De Muyter  <phdm@macqel.be>
1472
1473         * sock.c, stream.c: Check #ifdef LINUX, not linux.
1474         * file.c: Always provide sys_*attr, regardless of #ifdef XATTR_CREATE.
1475
1476 2003-03-30  Roland McGrath  <roland@redhat.com>
1477
1478         * configure.ac, NEWS: Version 4.4.96.
1479         * strace.spec, debian/changelog: 4.4.96-1.
1480
1481 2003-02-26  Stuart Menefy <stuart.menefy@st.com>
1482
1483         Various fixes for SuperH [SH]:
1484         * mem.c (sys_old_mmap): mmap() parameters passed in registers
1485         * net.c (sys_pipe), syscall.c (getrval2): pipe() results returned
1486         in registers
1487         * process.c (change_syscall): Fixed register which holds system
1488         call number
1489         * util.c (arg0_offset, arg1_offset): provide definition
1490         * Makefile.am: Added new files in linux/sh
1491         * linux/sh/syscallent.h: New file.
1492         * linux/sh/errnoent.h: New file.
1493         * linux/sh/ioctlent.h: New file.
1494         * linux/sh/signalent.h: New file.
1495
1496         * linux/ioctlent.sh: Take an arg for location of header files
1497         * syscallent.sh: Replaced lost $
1498
1499 2003-03-30  Roland McGrath  <roland@redhat.com>
1500
1501         * time.c [LINUX]: Handle new Linux 2.5 clock/timer syscalls.
1502         * linux/syscall.h, linux/syscallent.h, linux/dummy.h: Likewise.
1503         From Ulrich Drepper <drepper@redhat.com>.
1504
1505         * linux/syscallent.h: Use sys_getrlimit for 191.
1506         Use name "old_getrlimit" for 76.
1507         Reported by Ulrich Drepper <drepper@redhat.com>.
1508
1509 2003-03-18  Roland McGrath  <roland@redhat.com>
1510
1511         * process.c [LINUX] (sys_clone): Don't dereference parent_tid argument.
1512
1513 2003-03-17  Roland McGrath  <roland@redhat.com>
1514
1515         * linux/x86_64/syscallent.h: clone takes 5 args.
1516         * process.c [LINUX] (sys_clone) [X86_64]: Fix argument order.
1517
1518 2003-03-15  Roland McGrath  <roland@redhat.com>
1519
1520         * linux/x86_64/syscallent.h: Add exit_group syscall at 231.
1521
1522 2003-03-14  Roland McGrath  <roland@redhat.com>
1523
1524         * linux/x86_64/syscallent.h: Update and add many 2.5 syscalls.
1525
1526         * linux/ia64/syscallent.h: clone takes 5 arguments.
1527         * process.c [LINUX && IA64] (ARG_*): Update for 2.5 clone calls.
1528
1529 2003-03-12  Roland McGrath  <roland@redhat.com>
1530
1531         * linux/ia64/syscallent.h: Fix arg counts for clone and clone2.
1532         Use sys_clone for clone2.
1533         * linux/syscall.h: Don't declare sys_clone2.
1534         * process.c (sys_clone): Rewritten to handle both flavors,
1535         print all extra args depending on flag bits.
1536         (sys_clone2): Function removed.
1537
1538         * linux/ia64/syscallent.h: Add a bunch of 2.5 syscalls.
1539
1540 2003-03-04  Roland McGrath  <roland@redhat.com>
1541
1542         * syscall.c (get_scno) [IA64]: Do TCB_WAITEXECVE check only when
1543         TCB_INSYSCALL is clear, like other platforms do.
1544
1545 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
1546
1547         * mem.c [LINUX] (sys_remap_file_pages): New function.
1548         * linux/syscall.h: Declare it.
1549         * linux/syscallent.h: Use it.
1550         * linux/powerpc/syscallent.h: Likewise.
1551
1552         * process.c [LINUX] (sys_futex): Omit final if op is not FUTEX_WAIT.
1553
1554 2003-02-26  Roland McGrath  <roland@redhat.com>
1555
1556         * configure.ac: Fix typo in netinet/in.h check.
1557         Also include <sys/types.h> and <sys/socket.h> before <netinet/in.h>.
1558         Reported by Alex Semenyaka <alexs@snark.rinet.ru>.
1559
1560 2003-02-24  Roland McGrath  <roland@redhat.com>
1561
1562         * configure.ac, NEWS: Version 4.4.95.
1563         * strace.spec, debian/changelog: 4.4.95-1.
1564
1565         * process.c (sys_getresgid): Fix typos in argument access.
1566
1567 2003-02-23  Roland McGrath  <roland@redhat.com>
1568
1569         * process.c (sys_getresuid): Fix typos in argument access.
1570         Reported by Anton Blanchard <anton@samba.org>.
1571
1572 2003-02-19  Roland McGrath  <roland@redhat.com>
1573
1574         * configure.ac, NEWS: Version 4.4.94.
1575         * strace.spec, debian/changelog: 4.4.94-1.
1576
1577         * version.c: Removed.
1578         * Makefile.am (strace_SOURCES): Remove it.
1579         * strace.c: Use PACKAGE_NAME and VERSION macros instead of version var.
1580
1581         FreeBSD rfork support changes from Russ Cox <rsc@plan9.bell-labs.com>:
1582         * syscall.c (internal_syscall): Handle SYS_rfork with internal_fork.
1583         * process.c (internal_fork) [SYS_rfork]: Bail if RFPROC flag not set.
1584
1585 2003-01-23  Roland McGrath  <roland@redhat.com>
1586
1587         * signal.c: Reorder #ifdefs so HAVE_ASM_SIGCONTEXT_H doesn't matter on
1588         SPARC, which doesn't use the header regardless.
1589
1590         * util.c [LINUX && SPARC]: Do renaming kludges around <asm/reg.h>
1591         like signal.c does.
1592
1593         * linux/sparc/syscall.h: Declare sys_getdents64, sys_llseek.
1594
1595         * linux/dummy.h [! SYS_getpmsg] (sys_getpmsg): #define to printargs.
1596         [! SYS_putpmsg] (sys_putpmsg): Likewise.
1597
1598         * process.c: Reorder includes to put sys/reg.h before linux/ptrace.h,
1599         since they can conflict.
1600
1601 2003-01-21  Roland McGrath  <roland@redhat.com>
1602
1603         * strace.c (usage): Omit -z, since it has never worked properly.
1604         * NEWS: Likewise.
1605
1606         * strace.c (main): Grok new option `-E var=val' or `-E var' to put
1607         var=val in environ or to remove var, respectively.
1608         (usage): Mention it.
1609         * strace.1, NEWS: Document it.
1610
1611         * configure.ac, NEWS: Version 4.4.93.
1612         * strace.spec, debian/changelog: 4.4.93-1.
1613         * strace.spec (Source0): Use strace-VERSION.tar.bz2 now.
1614
1615 2003-01-20  Roland McGrath  <roland@redhat.com>
1616
1617         * defs.h [LINUX] [S390 || S390X] (TCB_WAITEXECVE): Define it.
1618         * syscall.c (get_scno, syscall_fixup) [LINUX] [S390 || S390X]: Handle
1619         TCB_WAITEXECVE state with special kludges.
1620
1621         * process.c [LINUX] (sys_clone) [S390 || S390X]: Argument order is
1622         reversed from other architectures.
1623
1624         * process.c (sys_execve) [LINUX]: Make setting TCB_WAITEXECVE flag
1625         conditional on [TCB_WAITEXECVE] instead of list of processors.
1626
1627         * util.c (restore_arg0): Evaluate args in no-op defns.
1628
1629         * util.c [S390 || S390X] (arg0_offset, arg1_offset): Fix definitions
1630         for clone call on S390.  From Michael Holzheu <holzheu@de.ibm.com>.
1631
1632 2003-01-17  Anton Blanchard <anton@samba.org>
1633
1634         * util.c [LINUX] (setbpt): Handle SYS_vfork like SYS_fork.
1635
1636         * linux/syscall.h (SYS_socket_subcall): 256 also for POWERPC.
1637
1638 2003-01-14  Roland McGrath  <roland@redhat.com>
1639
1640         * linux/powerpc/errnoent.h: Add missing errnos.
1641         * linux/powerpc/ioctlent.h: Update ioctl values.
1642         From Anton Blanchard <anton@samba.org>.
1643
1644         * io.c [LINUX] (sys_pread, sys_pwrite): Fix last change.
1645         From Anton Blanchard <anton@samba.org>.
1646
1647         * linux/hppa/syscallent.h: Use sys_getdents64, sys_truncate64,
1648         sys_ftruncate64, instead of printargs, for those syscalls.
1649         * linux/mips/syscallent.h: Likewise.
1650         * linux/powerpc/syscallent.h: Likewise.
1651         * linux/s390/syscallent.h: Likewise.
1652         * linux/sparc/syscallent.h: Likewise.
1653
1654         * linux/syscall.h (SYS_socket_subcall): Only 256 for S390, S390X.
1655         All others at the moment use linux/syscallent.h, where it's 300.
1656
1657         * strace.1: Update bug reporting info.
1658
1659         * resource.c [LINUX] (quotacmds): Grok new command encodings.
1660         From Nathan Scott <nathans@debian.org>.
1661
1662         * configure.ac, NEWS: Version 4.4.92.
1663         * strace.spec, debian/changelog: 4.4.92-1.
1664
1665         * configure.ac: Match powerpc* (includes powerpc64), and don't match
1666         ppc (never comes out of config.sub).
1667
1668         * process.c (sys_ptrace): Use #lx format for address argument.
1669         [POWERPC]: Use sizeof(unsigned long) in place of 4 for multipliers.
1670         * process.c [POWERPC]: Likewise.
1671         * signal.c (sys_sigreturn) [POWERPC]: Likewise.
1672         * syscall.c (get_scno) [POWERPC]: Likewise.
1673         * util.c [POWERPC]: Likewise.
1674         (printnum): Use long for NUM.
1675         From Anton Blanchard <anton@samba.org>.
1676
1677         * defs.h (ALIGN64): Fix defn for PPC, same as FreeBSD one.
1678
1679         * util.c [LINUX] (restore_arg0, restore_arg1): New macros, defined
1680         appropriately via set_arg0 or no-ops for each architecture.
1681         (clearbpt): Use those instead of set_arg0 and set_arg1.
1682
1683         * defs.h [_LARGEFILE64_SOURCE] (_LFS64_LARGEFILE): Define it.
1684         * linux/syscallent.h: Use sys_getdents64, sys_truncate64,
1685         sys_ftruncate64, instead of printargs, for those syscalls.
1686
1687         * process.c: Use <linux/ptrace.h> regardless of <sys/reg.h>.
1688         (sys_ptrace): Use printxval.
1689         (ptrace_cmds): Make PTRACE_GETREGS et al conditional on #ifdef PTRACE_*
1690         instead of only #ifdef SUNOS4.  Add PTRACE_[GS]ETFPXREGS.
1691
1692         * ipc.c (PRINTCTL): New macro.  #ifdef IPC_64, factor out the flag and
1693         print it before using printxval.
1694         (sys_msgctl, sys_semctl, sys_shmctl): Use it.
1695
1696 2003-01-13  Roland McGrath  <roland@redhat.com>
1697
1698         * config.guess: Update from ftp://ftp.gnu.org/pub/gnu/config/,
1699         timestamp 2003-01-10.
1700         * config.sub: Likewise, timestamp 2003-01-03.
1701         * install-sh: Update from Automake 1.7.2.
1702
1703         * linux/powerpc/signalent.h: Add SIGRTMIN.
1704         From Anton Blanchard <anton@samba.org>.
1705
1706         * linux/powerpc/syscallent.h: Add missing system calls.
1707         Decode more system calls, we were just printargs for many things.
1708         Remove some x86-specific system calls.
1709         Remove two syscalls between the socket and ipc syscalls,
1710         it was resulting in all IPC syscalls being off by two.
1711
1712         * ioctl.c (ioctl_decode) [POWERPC]: Decode term ioctls like Alpha.
1713         From Anton Blanchard <anton@samba.org>.
1714
1715         * defs.h [POWERPC] (UESP, EIP, EAX, ORIG_EAX): Remove this cruft.
1716         [LINUX && POWERPC && !__powerpc64__] (ALIGN64): New macro.
1717         * io.c (sys_pread, sys_pwrite): Use ALIGN64.
1718         From Anton Blanchard <anton@samba.org>.
1719
1720         * term.c [LINUX]: Get kernel definition of struct termios.
1721         From Anton Blanchard <anton@samba.org>.
1722
1723         * linux/ioctlent.sh: Look in sound/ directory too.
1724         From Anton Blanchard <anton@samba.org>.
1725
1726         * desc.c (printflock64): Fix ADDR argument type.
1727         From Anton Blanchard <anton@samba.org>.
1728
1729         * strace.c [! HAVE_STRSIGNAL]: Clean up #ifdefs on decls for
1730         sys_siglist and _sys_siglist.
1731         Reported by John Hughes <john@Calva.COM>.
1732
1733         * net.c: HAVE_OPTHDR -> HAVE_STRUCT_OPTHDR
1734         Reported by John Hughes <john@Calva.COM>.
1735
1736         * linux/syscall.h [ARM] (SYS_socket_subcall): Set to 300.
1737
1738 2003-01-10  Roland McGrath  <roland@redhat.com>
1739
1740         * configure.ac, NEWS: Version 4.4.91.
1741         * strace.spec, debian/changelog: 4.4.91-1
1742
1743         * util.c [LINUX && X86_64] (arg0_offset, arg1_offset): Use correct
1744         values for x86-64, conditional on current_personality.
1745
1746         * strace.c (droptcb): Clear flags word before calling rebuild_pollv.
1747
1748         * configure.ac: Check struct T_conn_res for QUEUE_ptr or ACCEPTOR_id.
1749         * stream.c (print_transport_message): Use #ifdefs for those members.
1750
1751         * strace.c (rebuild_pollv): Fix typo: struct poll -> struct pollfd.
1752
1753         * configure.ac: Fix siginfo_t/sig_atomic_t checks.
1754         Use prerequisite #include <netinet/in.h> for netinet/*.h checks.
1755
1756         * strace.c (pfd2tcb): Fix for new tcbtab type.
1757         (rebuild_pollv): Likewise.
1758         (detach): Put variables used under [LINUX] inside #ifdef.
1759
1760         * process.c (change_syscall) [POWERPC]: Add missing return.
1761         * util.c [POWERPC] (arg0_offset): Set to 4*PT_R3, not 4*PT_ORIG_R3.
1762
1763         * strace.spec: New file.
1764         * debian/changelog: 4.4.90-1
1765         * debian/rules (binary-arch): Depend on build.
1766         (clean): Don't try to run Makefile.in.
1767         * debian/control (Standards-Version): Now 3.5.8.
1768
1769         * configure.ac: Diddle CFLAGS after AC_PROG_CC, not before.
1770
1771 2003-01-09  Roland McGrath  <roland@redhat.com>
1772
1773         * syscall.c (force_result) [S390 || S390X]: Fix typo.
1774
1775         * debian/control: Update Maintainer: field.
1776
1777 2003-01-08  Roland McGrath  <roland@redhat.com>
1778
1779         * NEWS: Update for 4.4.90 test release.
1780
1781         Support for new Linux 2.5 thread features.
1782         * defs.h [LINUX]: Define __NR_exit_group if not defined.
1783         (struct tcb): New members nclone_threads, nclone_detached,
1784         and nclone_waiting.
1785         (TCB_CLONE_DETACHED, TCB_CLONE_THREAD, TCB_GROUP_EXITING): New macros.
1786         (waiting_parent): Macro removed.
1787         (pid2tcb): Declare it.
1788         * process.c (internal_clone) [TCB_CLONE_THREAD]: Reparent the new
1789         child to our parent if we are a CLONE_THREAD child ourselves.
1790         Maintain TCB_CLONE_THREAD and TCB_CLONE_DETACHED flags and counts.
1791         (internal_wait) [TCB_CLONE_THREAD]: Factor out detached children when
1792         determining if we have any.  If TCB_CLONE_THREAD is set, check
1793         parent's children instead of our own, and bump nclone_waiting count.
1794         (internal_exit) [__NR_exit_group]: Set the TCB_GROUP_EXITING flag if
1795         the syscall was exit_group.
1796         * syscall.c (internal_syscall): Use internal_exit for exit_group.
1797         * strace.c (pid2tcb): No longer static.
1798         (alloctcb) [TCB_CLONE_THREAD]: Initialize new fields.
1799         (droptcb) [TCB_CLONE_THREAD]: Maintain new fields.
1800         If we have thread children, set TCB_EXITING and don't clear the TCB.
1801         (resume) [TCB_CLONE_THREAD]: Decrement parent's nclone_waiting.
1802         (detach) [TCB_CLONE_THREAD]: When calling resume, check all thread
1803         children of our parent that might be waiting for us too.
1804         [TCB_GROUP_EXITING] (handle_group_exit): New function.
1805         (trace) [TCB_GROUP_EXITING]: Use that in place of detach or droptcb.
1806
1807         Revamp -f support for Linux.
1808         * util.c [LINUX] (setbpt, clearbpt): New implementations that tweak
1809         the system call to be clone with CLONE_PTRACE set.  Various new static
1810         helper functions.
1811         * process.c (internal_clone): Define also #ifdef SYS_clone2.
1812         Initialize TCPCHILD->parent field.
1813         [CLONE_PTRACE]: Don't do PTRACE_ATTACH here, because it's preattached.
1814         Check in case the new child is in the tcb already.
1815         (internal_fork) [LINUX]: Just call internal_clone.
1816         * strace.c (trace) [LINUX]: Under -f/-F, grok an unknown pid
1817         reporting to wait, put it in the TCB with TCB_ATTACHED|TCB_SUSPENDED.
1818
1819         * linux/x86_64/syscallent1.h (sys_oldlstat): #define as printargs.
1820
1821         * file.c [LINUX]: #undef st_[amc]time in case they are macros.
1822
1823         * Makefile.am (AM_CFLAGS): New variable, define to $(WARNFLAGS).
1824
1825         * Makefile.am (EXTRA_DIST): Remove debian/postinst and debian/prerm.
1826
1827 2003-01-09  Wichert Akkerman  <wichert@deephackmode.org>
1828
1829         * debian/postinst, debian/prerm: removed, /usr/doc symlink is no
1830         longer used
1831         * debian/rules: no longer install postinst and prerm
1832         * debian/control: do not end summary with full stop (lintian)
1833
1834 2002-12-30  Roland McGrath  <roland@redhat.com>
1835
1836         * Makefile.am (bin_SCRIPTS): New variable, list strace-graph.
1837         (EXTRA_DIST): Add missing files.
1838
1839         * configure.ac: Fix asm/sigcontext.h check to include prerequisite.
1840
1841         * syscall.c (qualify_one): New function.
1842         (qual_options): Replace lookup field with qualify, update initializer.
1843         (qualify): Update caller.
1844         (qual_signal, qual_fault, qual_desc): Rewritten from lookup_*.
1845         (qual_syscall): Rewritten lookup_syscall, match name more than once.
1846         Fixes RH#70579, bites IA64 -efoo when foo exists on IA32.
1847
1848         * version.c (version): Make const, bump to 4.4.90.
1849         * strace.c: Update decl.
1850
1851         * Makefile.am [LINUX && X86_64]: Remove cruft.
1852         * linux/x86_64/errnoent1.h: New file.
1853         * linux/x86_64/ioctlent1.h: New file.
1854         * linux/x86_64/signalent1.h: New file.
1855         * linux/x86_64/syscallent1.h: New file.
1856         * linux/x86_64/i386-headers.diff: File removed.
1857         * linux/x86_64/makeheaders.sh: File removed.
1858         * linux/x86_64/Makefile.in: File removed.
1859
1860         * linux/syscallent.h [X86_64]: Disable sanity checks, subcall stuff is
1861         already broken for 32-bit personality on x86-64.
1862
1863 2002-12-29  Roland McGrath  <roland@redhat.com>
1864
1865         * configure.ac, Makefile.am: Punt subdirs, handle everything here.
1866         * linux/Makefile.am: File removed.
1867         * freebsd/Makefile.am: File removed.
1868         * sunos4/Makefile.in: File removed.
1869         * svr4/Makefile.in: File removed.
1870
1871         * linux/alpha/Makefile.in: File removed.
1872         * linux/hppa/Makefile.in: File removed.
1873         * linux/ia64/Makefile.in: File removed.
1874         * linux/powerpc/Makefile.in: File removed.
1875         * linux/s390/Makefile.in: File removed.
1876         * linux/s390x/Makefile.in: File removed.
1877
1878 2002-12-26  Roland McGrath  <roland@redhat.com>
1879
1880         * syscallent.sh: Grok three flavors of #define line, uniquify.
1881         * linux/hppa/syscallent.sh: File removed.
1882         * linux/powerpc/syscallent.sh: File removed.
1883
1884         * linux/Makefile.am: New file.
1885         * linux/Makefile.in: File removed.
1886         * freebsd/Makefile.am: New file.
1887         * freebsd/i386/Makefile.am: New file.
1888         * freebsd/i386/Makefile.in: File removed.
1889
1890 2002-12-22  Roland McGrath  <roland@redhat.com>
1891
1892         Update to Autoconf 2.57, and Automakify with version 1.7.
1893         * Makefile.am: New file.
1894         * Makefile.in: File removed.
1895         * configure.in: Moved to ...
1896         * configure.ac: ... here.  Update for Autoconf 2.5x and Automake.
1897         * aclocal.m4: Moved to ...
1898         * acinclude.m4: ... here.  Update for Autoconf 2.5x.
1899         * acconfig.h: File removed.
1900         * AUTHORS: New file, makes automake happy.
1901         * autogen.sh: File removed.
1902         * README-CVS: Update to recommend autoreconf instead.
1903         * file.c: HAVE_ST_* -> HAVE_STRUCT_STAT_ST_*.
1904         * net.c: HAVE_SIN6_SCOPE_ID -> HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID,
1905         HAVE_MSG_CONTROL -> HAVE_STRUCT_MSGHDR_MSG_CONTROL.
1906         * strace.c: *_DECLARED -> HAVE_DECL_*
1907         * stream.c: HAVE_* -> HAVE_STRUCT_*
1908
1909         * linux/Makefile.in (ioctldefs.h ioctls.h): Use $(SHELL) instead of
1910         sh, and use $(srcdir) to find the script.
1911         * linux/powerpc/Makefile.in (ioctlent.raw): Find ioctlent.sh in ../.
1912         (ioctlsort.o): Use ../ioctlsort.c, not ../../ioctlsort.c.
1913         * linux/x86_64/Makefile.in (headers): Renamed to all.
1914         * linux/alpha/Makefile.in: Add empty install target.
1915         * linux/x86_64/Makefile.in: Likewise.
1916         * linux/powerpc/Makefile.in: Likewise.
1917         * linux/Makefile.in: Likewise.
1918
1919 2002-12-26  Roland McGrath  <roland@redhat.com>
1920
1921         * defs.h [LINUX && MIPS] (MAX_QUALS): Set to 5000, not 4999.
1922         From Daniel Jacobowitz <drow@false.org>.
1923
1924 2002-12-21  Roland McGrath  <roland@redhat.com>
1925
1926         * linux/syscallent.h: Add some new 2.5 syscall names.
1927         Now clone takes 5 args.
1928         * process.c [LINUX] (clone_flags): Update with 2.5 flag bits.
1929         [LINUX] (sys_clone): Print new args.
1930         * mem.c (print_ldt_entry): Make global.
1931
1932         * linux/syscall.h [I386 || IA64] (SYS_socket_subcall): Bump to 300 for
1933         safety, since up to 260 are already used in 2.5 kernels.
1934         * linux/syscallent.h: Update the table.
1935         * linux/ia64/syscallent.h: Likewise.
1936
1937         * syscall.c (force_result): New function.
1938         * process.c (internal_wait): Handle ECHILD exit from wait call with
1939         WNOHANG flag set; force the return value to 0 in the inferior when it
1940         has live children we are tracing.
1941         * NEWS: Mention the bug fix.
1942
1943 2002-12-17  Roland McGrath  <roland@redhat.com>
1944
1945         * linux/ia64/syscallent.h: Remove placeholders 275-298 to catch up
1946         with linux/syscallent.h additions.
1947
1948         * strace.c (tcbtab): Make this a pointer to pointers, not an array.
1949         (tcbtabsize): New variable.
1950         (main): Initialize them using dynamic allocation.
1951         (alloctcb, main): Use tcbtabsize in place of MAX_PROCS; indirect.
1952         (pid2tcb, cleanup): Likewise.
1953         [USE_PROCFS] (pollv): Make this a pointer, not an array; make static.
1954         (rebuild_pollv): Dynamically allocate the vector.
1955         * defs.h (tcbtab): Update decls.
1956         (MAX_PROCS): Macro removed, no more static limit on this.
1957         * process.c (fork_tcb): New function.
1958         (internal_clone, internal_fork): Use it instead of checking nprocs.
1959
1960         * strace.c (detach) [LINUX]: Use __WALL (or a second try with __WCLONE)
1961         in wait after sending SIGSTOP.
1962
1963 2002-12-16  Roland McGrath  <roland@redhat.com>
1964
1965         * signal.c (sprintsigmask): Increase static buffer size to account for
1966         worst possible case.  Reported by Daniel Jacobowitz <drow@false.org>.
1967
1968         * process.c [LINUX] (wait4_options): Fix __WCLONE value.  Add
1969         __WNOTHREAD and __WALL.
1970
1971         * strace.c (trace) [LINUX]: Only check errno if wait4 actually fails,
1972         so we don't repeat a wait and thus drop a status.  Fixes RH#62591.
1973
1974 2002-12-15  Roland McGrath  <roland@redhat.com>
1975
1976         * process.c (setarg) [POWERPC]: Support it.
1977
1978         * util.c [POWERPC] (LOOP): Fix value, now 0x48000000 (0: b 0b).
1979         Old value was bogus, not even a proper instruction.
1980         From Guy M. Streeter <streeter@redhat.com>.
1981
1982         * strace.c (main) [! USE_PROCFS]: Always reset SIGCHLD to SIG_DFL.
1983
1984         * configure.in: Don't check for putpmsg.
1985         * stream.c (sys_getpmsg, sys_putpmsg): Make these conditional on
1986         #ifdef SYS_*, rather than on HAVE_PUTPMSG.
1987
1988         * aclocal.m4 (AC_STAT64): Include <linux/types.h> before <asm/stat.h>
1989         in test.  Test our own #ifdef LINUX rather than predefined `linux'.
1990
1991         * linux/powerpc/syscallent.h: Use sys_llseek for _llseek.
1992         * linux/sparc/syscallent.h: Likewise.
1993         * linux/hppa/syscallent.h: Likewise.
1994
1995         * syscall.c (syscall_enter) [LINUX && POWERPC]: Define PT_ORIG_R3 if
1996         not defined, since <asm/ptrace.h> defines it only #ifdef __KERNEL__.
1997         * process.c: Likewise.
1998
1999         * desc.c (sys_osf_select): Add missing return type.
2000
2001         * syscall.c (trace_syscall): Use strerror, not sys_errlist/sys_nerr.
2002
2003         * linux/ia64/syscallent.h: Remove macros for sys_delete_module,
2004         sys_nanosleep, both already in linux/dummy.h.
2005
2006         * syscall.c (get_scno): Move static `currpers' inside #ifdef X86_64.
2007         (trace_syscall): Fix return without value.
2008
2009         * linux/syscallent.h: Update table with names of new syscalls
2010         io_setup, io_destroy, io_getvents, io_submit, io_cancel.
2011         * linux/ia64/syscallent.h: Likewise.
2012         * linux/powerpc/syscallent.h: Likewise.
2013
2014         * signal.c [LINUX && I386]: Provide SA_RESTORER constant if not
2015         defined.  If the bit is set, print the sa_restorer field of sigaction.
2016
2017         * mem.c: Add sys_{get,set}_thread_area.
2018         * linux/syscall.h: Declare them.
2019         * linux/syscallent.h: Update the table for these.
2020         * linux/dummy.h (sys_modify_ldt): Define only #ifndef I386.
2021         (sys_get_thread_area, sys_set_thread_area): New macros #ifndef I386.
2022
2023         * configure.in: Check for linux/xattr.h and linux/futex.h headers.
2024         * linux/syscall.h: Add sys_* decls for new syscalls getpmsg, putpmsg,
2025         readahead, sendfile64, setxattr, fsetxattr, getxattr, fgetxattr, int
2026         listxattr, flistxattr, removexattr, fremovexattr, sched_setaffinity,
2027         sched_getaffinity, futex.
2028         * linux/syscallent.h: Update the table.
2029         * io.c: Add sys_sendfile64.
2030         * file.c: Add sys_readahead, sys_*xattr.
2031         * process.c: Add sys_futex, sys_*affinity.
2032
2033         * linux/syscall.h (SYS_socket_subcall): Define to 256 on all machines.
2034         (SYS_ipc_subcall): Always SYS_socket_subcall + SYS_socket_nsubcalls.
2035         * linux/syscallent.h: Update the table for socket and ipc subcalls.
2036
2037 2002-11-09  Heiko Carstens <heiko.carstens@de.ibm.com>
2038
2039         Bugfix for s390/s390x:
2040         * syscall.c: Fixed scno derivation for s390/s390x.
2041
2042 2002-11-06  Michal Ludvig  <mludvig@suse.cz>
2043
2044         Merged patch from Steven J. Hill <sjhill@realitydiluted.com>
2045         to allow the compilation of a native MIPS strace.
2046
2047 2002-11-06  Michal Ludvig  <mludvig@suse.cz>
2048
2049         From Marty Leisner <leisner@rochester.rr.com>,
2050         rewritten by mludvig:
2051         * strace.c (not_failing_only): New.
2052         (usage): Added -z switch description.
2053         (main): Added -z switch parsing to not_failing_only variable.
2054         * syscall.c (trace_syscall): Added not_failing_only handling.
2055
2056 2002-10-08  Heiko Carstens <heiko.carstens@de.ibm.com>
2057
2058         Missing complete changelog for 2002-10-07 commit:
2059         * Makefile.in: Added linux/s390, linux/s390x to ALL_SUBDIRS.
2060         * acconfig.h: New define for s390x.
2061         * config.sub: Added missing define for s390 and new one for s390x.
2062         * configure.in: Added new define for s390x.
2063         * file.c: Added missing #undef dirent64 and new defines for s390x.
2064         * linux/s390: New directory.
2065         * linux/s390/Makefile.in: New file.
2066         * linux/s390/errnoent.h: New file.
2067         * linux/s390/ioctlent.h: New file.
2068         * linux/s390/signalent.h: New file.
2069         * linux/s390/syscallent.h: New file.
2070         * linux/s390x: New directoy.
2071         * linux/s390x/Makefile.in: New file.
2072         * linux/s390x/errnoent.h: New file.
2073         * linux/s390x/ioctlent.h: New file.
2074         * linux/s390x/signalent.h: New file.
2075         * linux/s390x/syscallent.h: New file.
2076         * linux/syscall.h: Added sys_mincore() prototype and added new
2077         s390x defines.
2078         * process.c: Added s390x defines.
2079         (change_syscall): Changed handling for s390.
2080         (setarg): Added missing s390/s390x code in setarg().
2081         * signal.c: Added s390x define.
2082         (sys_sigreturn): Bugfix in s390/s390x code (wrong number of
2083         arguments to sprintsigmask()).
2084         * stream.c (internal_stream_ioctl): Changed int cast to long cast,
2085         since printstr() expects a long.
2086         * syscall.c (decode_subcall): Changed several variables to be long
2087         instead of int to match 64 bit requirements. Added s390x defines.
2088         (syscall_enter): Changed upeek() call to match s390 and s390x
2089         requirements.
2090         * util.c: Added s390x defines.
2091
2092 2002-10-07  Michal Ludvig  <mludvig@suse.cz>
2093
2094         Merged s390x port by Heiko Carstens <Heiko.Carstens@de.ibm.com>
2095         and bugfixes to s390 by D.J. Barrow.
2096
2097 2002-09-23  Michal Ludvig  <mludvig@suse.cz>
2098
2099         Merged x86-64 port by Andi Kleen <ak@suse.de>
2100         and Michal Ludvig <mludvig@suse.cz>
2101         * Makefile.in: New target 'headers'. Failure ignored.
2102         * acconfig.h: New defines for x86-64.
2103         * configure.in: Ditto.
2104         * defs.h: Ditto.
2105         * file.c: Ditto.
2106         * signal.c: Ditto.
2107         * process.c: Added support for x86-64.
2108         * util.c: Ditto.
2109         * syscall.c: Ditto + added automatic personality switching.
2110         * linux/syscall.h: Ditto.
2111         * linux/x86_64: New directory.
2112         * linux/x86_64/Makefile.in: New file.
2113         * linux/x86_64/gentab.pl: Ditto.
2114         * linux/x86_64/i386-headers.diff: Ditto.
2115         * linux/x86_64/makeheaders.sh: Ditto.
2116         * linux/x86_64/syscallent.h: Ditto.
2117         * mem.c (print_mmap): Always print arg[4] as int.
2118
2119 2002-09-23  Michal Ludvig  <mludvig@suse.cz>
2120
2121         * configure.in: Fix regular expressions.
2122         * linux/syscall.h: Added missing braces in prototype of
2123         sys_getdents64().
2124         * file.c: Use '#ifdef LINUX' instead of '#ifdef linux'.
2125         (struct fileflags): Made extern to inhibit compiation warnings.
2126         (sys_getdents64): Merged LINUX and SVR4 part.
2127         * syscall.c (get_scno): Split multiline string into two distinct
2128         strings.
2129
2130 2002-05-24  John Hughes <john@calva.com>
2131
2132         * stream.h, net.h: Avoid possible infinite loop caused by
2133         unsigned arithmetic in preceeding change.
2134
2135 2002-05-23  John Hughes <john@calva.com>
2136
2137         * acconfig.h: Add HAVE_OPTHDR and HAVE_T_OPTHDR defines.
2138
2139         * aclocal.m4: Add tests for struct opthdr in sys/socket.h and
2140         struct t_opthdr in sys/tiuser.h, define HAVE_OPTHDR and HAVE_T_OPTHDR
2141         if found.
2142
2143         * configure.in: use tests for struct opthdr and struct t_opthdr.
2144
2145         * defs.h: add new function print_sock_optmgmt.
2146
2147         * io.c: add hack that lets ioctl decode functions set auxilliary
2148         string return.
2149
2150         * stream.c: better decoding for timod ioctls.
2151
2152         * net.c: add function print_sock_optmgmt, used by timod ioctl
2153         decoding functions in stream.c.
2154
2155 2002-05-23  John Hughes <john@calva.com>
2156
2157         * acconfig.h: Make autoheader happy about Linux/SuperH
2158
2159 2002-05-23  John Hughes <john@calva.com>
2160
2161         * strace.c: Get rid of warning if not using POLL_HACK
2162
2163 2002-05-22  John Hughes <john@calva.com>
2164
2165         * net.c: Simplify {get,set}sockopt, decode SO_LINGER, cope with
2166         options that are not just ints, cope with systems that don't
2167         #define SOL_TCP and so on.
2168
2169 2002-05-21  John Hughes <john@calva.com>
2170
2171         * strace.c: Fix warning if POLL_HACK is used.
2172
2173 2002-05-17  John Hughes <john@calva.com>
2174
2175         * svr4/ioctlent.sh: Some defines on UW come with too many spaces.
2176
2177 2002-05-17  John Hughes <john@calva.com>
2178
2179         * svr4/ioctlent.sh: Cope with #defines wrapped in #ifdefs.
2180
2181 2002-05-17  John Hughes <john@calva.com>
2182
2183         * stream.c: tidy up output a little.
2184
2185 2002-05-17  John Hughes <john@calva.com>
2186
2187         * process.c, svr4/dummy.h, svr4/syscall.h: decode arguments
2188         to procpriv syscall.
2189
2190 2002-05-01  Wichert Akkerman <wichert@deephackmode.org>
2191
2192         * configure.in, defs.h, process.c, sock.c, syscall.c, util.c: merge
2193           patch from Greg Banks <gbanks@pocketpenguins.com> for Linux/SuperH
2194           support
2195
2196 2002-04-01  Wichert Akkerman <wichert@deephackmode.org>
2197
2198         * strace.c: close tcp->outf in droptcb()
2199
2200 2002-04-01  Wichert Akkerman <wichert@deephackmode.org>
2201
2202         * net.c: decode packet options
2203
2204 2002-03-31  Wichert Akkerman <wichert@deephackmode.org>
2205
2206         * linux/{alpha,hppa,ia64,mips,powerpc,sparc}/syscallent.h: regenerated
2207
2208 2002-03-31  Wichert Akkerman <wichert@deephackmode.org>
2209
2210         * debian/*: added
2211         * linux/syscallent.h: fix typo and add the reserved stream syscalls
2212         * defs.h, file.c, io.c: fix signed/unsigned issues
2213         * syscall.c: check for negative u_errors
2214         * cvsbuild: renamed to autogen.sh
2215
2216 2001-12-17  Wichert Akkerman <wakkerma@debian.org>
2217
2218         * net.c: add new TCP socket options
2219
2220 2001-10-26  John Hughes <john@calva.com>
2221
2222         * svr4/ioctlent.sh: Cope with #define lines containing
2223         comments that terminate on subsequent lines.  Used to
2224         comment out subsequent ioctls!
2225
2226 2001-10-25  Wichert Akkerman <wakkerma@debian.org>
2227
2228         * linux/ioctlent.h: regenerated using current scripts so
2229           term ioctls are included
2230
2231 2001-10-19  John Hughes  <john@Calva.COM>
2232
2233         * strace.c(proc_open): On SVR4 only trace the syscalls,
2234         signals and faults we care about.
2235
2236 2001-10-18  John Hughes  <john@Calva.COM>
2237
2238         * acconfig.h: Add HAS_SIGINFO_T.
2239         * aclocal.m4: add check for siginfo_t in signal.h.
2240         * configure.in: use check for siginfo_t.
2241         * defs.h: if HAVE_SIGINFO_T the declare printsiginfo.  On SVR4
2242           allow access to siginfo when signal recieved.
2243         * process.c: Remove SVR4 only version of printsiginfo.
2244         * signal.c: merge SVR4 and LINUX versions of printsiginfo.
2245         * strace.c: on SVR4 print siginfo when signal recieved.
2246
2247 2001-10-18  John Hughes  <john@Calva.COM>
2248
2249         * system.c(sys_ssisys): handle return values for ssisys
2250
2251 2001-10-18  John Hughes  <john@Calva.COM>
2252
2253         * signal.c: handle sigwait
2254         * svr4/dummy.c: Move sigwait to done
2255         * svr4/syscall.h: handle sigwait
2256
2257 2001-10-16  John Hughes  <john@Calva.COM>
2258
2259         * system.c(sys_ssisys): decode some args for ssisys.
2260
2261 2001-10-16  John Hughes  <john@Calva.COM>
2262
2263         * mem.c: MS_SYNC is zero, so must be first in xlat list.
2264
2265         * svr4/dummy.h: memcntl is much like mctl.
2266
2267 2001-10-16  John Hughes  <john@Calva.COM>
2268
2269         * util.c (umovestr): UnixWare (svr4?) returns 0 when trying
2270         to read unmapped page.  Make it possible to strace ksh.
2271
2272 2001-10-03  David Mosberger  <davidm@hpl.hp.com>
2273
2274         * process.c (internal_clone): Avoid race condition by clearing
2275         breakpoint after attaching to child.
2276
2277 2001-10-02  David Mosberger  <davidm@hpl.hp.com>
2278
2279         * linux/ia64/syscallent.h: Define ia32 syscall numbers (originally
2280         by Don Dugger, with my refinements).
2281
2282         * linux/ia64/ioctlent.h: Regenerate and manually merge conflicting
2283         ioctls (TCGETS & SNDCTL_TMR_TIMEBASE, etc.).
2284
2285         * linux/ia64/Makefile.in (ioctldefs.h ioctls.h): Update for
2286         new ioctlent.h generation scheme.
2287
2288         * linux/syscall.h (sys_clone2): Declare.
2289         [IA64] Define ia32 socket, ipc, and extra syscall numbers.
2290
2291         * linux/ioctlent.sh (regexp): Also handle <asm/ioctls.h> so we
2292         don't miss the tty ioctls (unfortunately, some of the sound timer
2293         ioctls are in conflict with them!).
2294
2295         * util.c (setbpt) [IA64]: Add ia32 support (by Don Dugger).
2296         (clrbpt) [IA64]: Ditto.
2297
2298         * syscall.c (internal_syscall): Handle SYS_clone2, SYS32_wait4,
2299         and SYS32_exit.
2300         (get_scno): Get ia32 syscall number from r1 (orig eax) instead of
2301         r8 (eax).  Handle TCB_WAITEXECVE.
2302         (syscall_fixup): Handle ia64.
2303         (syscall_enter): Fix argument fetching for ia64.
2304
2305         * strace.c [IA64 && LINUX]: Include <asm/ptrace_offsets.h>.
2306         (trace) [PT_GETSIGINFO]: Print signal address and pc if possible.
2307
2308         * process.c (tcp): New function.
2309         (change_syscall): Add support for ia64 linux.
2310         (sys_execve): Turn on TCB_WAITEXECVE for ia64 linux.
2311
2312         * desc.c (getlk): Cast l_len to "long long" to avoid warnings when
2313         type is narrower.
2314         * resource.c (sprintrlim64): Ditto.
2315
2316         * defs.h (TCB_WAITEXECVE) [IA64]: Define.
2317         [IA64]: Declare "ia32" variable.
2318
2319         * bjm.c: Do not include <linux/module.h>.  It's not safe to include
2320         kernel headers.  Declare the necessary constants and structures
2321         directly instead.
2322
2323 2001-10-01  David Mosberger  <davidm@hpl.hp.com>
2324
2325         * signal.c (parse_sigset_t): New function.
2326         (sigishandled): Fix off-by-one bug by using parse_sigset_t() and
2327         avoiding relying on internal layout of sigset_t datastructure.
2328
2329 2001-04-26  David Mosberger  <davidm@hpl.hp.com>
2330
2331         * linux/ia64/syscallent.h: Add getunwind().
2332
2333 2001-04-11  David Mosberger  <davidm@hpl.hp.com>
2334
2335         * syscall.c (syscall_enter): Use PT_RBS_END instead of deprecated
2336         PT_AR_BSP.  Pick up arguments starting with out0, which is not
2337         always the same as r32 (e.g., consider inlined syscalls).
2338
2339 2001-09-28   John Hughes <john@Calva.COM>
2340
2341   * process.c: FreeBSD-CURRENT no longer has PT_READ_U, and anyway we
2342     were showing it as PT_WRITE_U!  Fix from Maxime Henrion.
2343
2344 2001-09-18   John Hughes <john@Calva.COM>
2345
2346   * net.c: fix display of sockaddr structures, sometimes too many "}",
2347     sometimes too few.  Fix suggested by Richard Kettlewell.
2348
2349 2001-08-19   Wichert Akkerman <wakkerma@debian.org>
2350
2351   * signal.c: do not include asm/sigcontext.h on IA64 since it gets
2352     the struct from bits/sigcontext.h already which signal.h includes.
2353
2354 2001-08-03   Wichert Akkerman <wakkerma@debian.org>
2355
2356   * linux/ioctlent.sh: change regexps so we catch sound ioctls as well in
2357     Linux
2358   * linux/Makefile.in: fix a few things so the ioctl list is generated
2359     properly
2360   * ioctl.c: remember to shift ioctl masks as well
2361
2362 2001-08-03   Wichert Akkerman <wakkerma@debian.org>
2363
2364   * Linux/**/syscallent.h: synchronize section for fcntl and use sys_fcntl
2365     for sys_fcntl as well
2366
2367 2001-08-03   Wichert Akkerman <wakkerma@debian.org>
2368
2369   * linux/hppa/syscallent.h: updated from Matthew Wilcox
2370
2371 2001-08-03   Wichert Akkerman <wakkerma@debian.org>
2372
2373   * process.c: seems Linux/IA64 changed register names on us, switch to
2374     using new names.
2375
2376 2001-08-03   Wichert Akkerman <wakkerma@debian.org>
2377
2378   * strace.c: set CLOEXEC  flag for outputfile
2379
2380 2001-08-03   Wichert Akkerman <wakkerma@debian.org>
2381
2382   * linux/sparc/syscall.h, linux/sparc/syscallent.h: add some LFS calls
2383
2384 2001-07-23  Wichert Akkerman <wakkerma@debian.org>
2385
2386   * configure.in: Support cross-compiling between architectures
2387
2388 2001-07-13  Wichert Akkerman <wakkerma@debian.org>
2389
2390   * configure.in: add S390 to architecture list
2391
2392 2001-07-10  John Hughes <john@Calva.COM>
2393
2394   * TODO, defs.h, io.h, net.c, strace.c, syscall.c, util.c: Merge fixes
2395     from Richard Kettlewell <rkettlewell@zeus.com> which add I/O dumping
2396     of args to readv/writev.  Also gets rid of redundant printiovec
2397     routine from net.c (duplicate of tprint_iov in util.c).
2398
2399 2001-07-02  Wichert Akkerman <wakkerma@debian.org>
2400
2401   * config.{guess,sub}: updated
2402
2403 2001-05-15  John Hughes <john@Calva.COM>
2404
2405   * signal.c: pass a pointer to sigmask to printsigmask from printcontext,
2406     it was just passing the sigmask (ucp->uc_sigmask).
2407
2408 2001-05-15  John Hughes <john@Calva.COM>
2409
2410   * util.c: Don't run off the end of valid memory in umovestr when
2411     USE_PROCFS.  Important for FREEBSD systems (which seem to have an
2412     unmapped page just after the args/env area).
2413
2414 2001-04-18  John Hughes <john@Calva.COM>
2415
2416   * configure.in: test for sys/nscsys.h, the non-stop clusters includes.
2417   * process.c: handle rfork{1,all} and rexecve calls on non-stop clusters.
2418   * syscall.c: treat rfork{1,all} and fork{1,all} as fork like calls.
2419     Treat rexecve as an exec.
2420   * system.c: decode arguments to ssisys call on nsc systems.
2421   * svr4/dummy.h, svr4/syscall.h: now we handle rfork{1,all}, ssisys and
2422     rexecve calls.
2423
2424 2001-04-12  Wichert Akkerman <wakkerma@debian.org>
2425
2426   * process.c: fix cast for powerpc code
2427   * linux/powerpc/syscallent.h: update syscall list
2428   * README: fix address for the strace mailinglist
2429   * signal.c: switch to using /proc/<pid>/status on Linux so we can get
2430     the realtime signals as well
2431
2432 2001-04-10  Wichert Akkerman <wakkerma@debian.org>
2433
2434   * Merge patches from Maciej W. Rozycki:
2435     + util.c: add code to print PC for MIPS
2436     + linux/mips/syscallent.h: updated
2437     + system.c: formating fixes for sys_sysmips
2438     + configure.in: test for yet more headers
2439     + stream.c: use configure-headertests instead of relying on OS hints
2440
2441 2001-04-07  Wichert Akkerman <wakkerma@debian.org>
2442
2443   * NEWS: start 4.3.1 items
2444   * version.c: updated to say 4.3.1 (was still 4.2, oops!)
2445
2446 2001-04-07  Wichert Akkerman <wakkerma@debian.org>
2447
2448   * configure.in: test for asm/sysmips.h and linux/utsname.h
2449   * linux/syscall.h: fix a typo for sys_sysmips
2450   * system.c: include asm/sysmips.h and linux/utsname.h if they exist,
2451     fix typo
2452
2453 2001-03-31  Wichert Akkerman <wakkerma@debian.org>
2454
2455   * linux/mips/ioctlent.h: updated using new Linux ioctl setup
2456
2457 2001-03-31  Wichert Akkerman <wakkerma@debian.org>
2458
2459   * linux/ia64/ioctlent.h: regenerated
2460
2461 2001-03-31  Wichert Akkerman <wakkerma@debian.org>
2462
2463   * linux/{alpha,ia64,powerpc}/ioctlent.sh: removed, all archs use the
2464     general Linux ioctlent.sh
2465
2466 2001-03-31  Wichert Akkerman <wakkerma@debian.org>
2467
2468   * linux/ioctlent.sh: add dir variable for location of kernel headers
2469
2470 2001-03-29  Wichert Akkerman <wakkerma@debian.org>
2471
2472   * linux/ia64/ioctlent.h: updated using new Linux ioctl setup
2473
2474 2001-03-29  Wichert Akkerman <wakkerma@debian.org>
2475
2476   * linux/powerpc/ioctlent.h: updated using new Linux ioctl setup
2477
2478 2001-03-29  Wichert Akkerman <wakkerma@debian.org>
2479
2480   * linux/hppa/ioctlent.h: updated using new Linux ioctl setup
2481
2482 2001-03-29  Wichert Akkerman <wakkerma@debian.org>
2483
2484   * linux/alpha/ioctlent.h: updated using new Linux ioctl setup
2485
2486 2001-03-28  Wichert Akkerman <wakkerma@debian.org>
2487
2488   * configure.in: use sparc* so we can compile on sparc64 as well
2489   * process.c, syscall.c: work around double define of fpq, fq and fpu
2490     structs on Linux/sparc, and use regs instead of pt_regs
2491   * don't use asm/sigcontext.h on Linux/sparc
2492
2493 2001-03-28  Wichert Akkerman <wakkerma@debian.org>
2494
2495   * linux/sparc/ioctlent.h: updated using new Linux ioctl setup
2496
2497 2001-03-28  Wichert Akkerman <wakkerma@debian.org>
2498
2499   * strace.c: use __WALL as wait4 flag if it exists so we can properly
2500     trace threaded programs
2501
2502 2001-03-27  John Hughes <john@Calva.COM>
2503
2504   * aclocal.m4: add check for endianness of long long.
2505   * acconfig.h: add #define for LITTLE_ENDIAN_LONG_LONG.
2506   * configure.in: check for endianness of long long.
2507   * defs.h: change LONG_LONG macro to work with either endianness of
2508     long long.
2509
2510 2001-03-27  John Hughes <john@Calva.COM>
2511
2512   * net.c: Make compilable by SCO UDK compiler (doesn't like empty
2513     initialisation list for array).
2514
2515 2001-03-27  John Hughes <john@Calva.COM>
2516
2517   * svr4/syscallent.h: ntp_adjtime entry was duplicated on Solaris
2518     systems - bad merge of Harald Boehme's patch by me.
2519
2520 2001-03-27  Wichert Akkerman <wakkerma@debian.org>
2521
2522   * lots of files: add Linux/hppa support
2523
2524 2001-03-19  Wichert Akkerman <wakkerma@debian.org>
2525
2526   * linux/mips/syscallent.h: we can't have -1 nargs, change to 0
2527   * linux/syscallent.h: not that syscalls 220 and 221 are used now
2528   * config.guess: updated
2529
2530 2001-03-17  Wichert Akkerman <wakkerma@debian.org>
2531
2532   * linux/ioclsort.c: new file
2533   * linux/ioctlent.sh: complete rewrite to use a more sane approach to get
2534     the ioctl list that doesn't involve attempting to #include all kernel
2535     headers
2536   * linux/.cvsignore: added ioctdefs.h and ioctls.h which are generated
2537     by the new ioctlent.sh
2538   * ioctl.c: only look at the number and type bits for linux, since
2539     ioctlent.sh no longer supplies the others
2540
2541 2001-03-08  John Hughes <john@Calva.COM>
2542
2543   * freebsd/syscalls.pl: On FreeBSD we must cope with COMPATibility syscalls,
2544     pretend they have names ending with "?" so that -e trace=stat (for
2545     example) will work.
2546   * freebsd/i386/syscallent.h: add ? to compatability syscalls.
2547   * freebsd/i386/syscall.h: consistency.
2548
2549 2001-03-08  John Hughes <john@Calva.COM>
2550
2551   * acconfig.h: add new ST_xxx defines.
2552   * aclocal.m4: macros to check for more fields in struct stat.
2553   * configure.in: use new macros to check for fields in struct stat.
2554   * file.c: use new defines to replace #ifdef FREEBSD by #if HAVE_ST_xxx.
2555
2556 2001-03-08  John Hughes <john@Calva.COM>
2557
2558   * defs.h: rename wimpy get64 as powerful new LONG_LONG
2559   * file.c: use LONG_LONG
2560   * io.c: use LONG_LONG
2561   * mem.c use LONG_LONG
2562
2563 2001-03-08  John Hughes <john@Calva.COM>
2564
2565   * acconfig.h: new #defines HAVE_LONG_LONG_OFF_T and HAVE_LONG_LONG_RLIM_T.
2566   * aclocal.m4: routines to check for long long off_t and rlim_t.
2567   * configure.in: check for long long off_t and rlim_t.
2568   * desc.c: if HAVE_LONG_LONG_OFF_T treat flock as flock64
2569   * file.c: if HAVE_LONG_LONG_OFF_T treat stat,lstat,fstat and lseek as 64
2570     bit versions.
2571   * io.c: if HAVE_LONG_LONG_OFF_T use 64 bit versions of pread and pwrite.
2572   * mem.c: if HAVE_LONG_LONG_OFF_T use 64 bit version of mmap
2573   * resource.c: if HAVE_LONG_LONG_OFF_T use 64 bit versions of getrlimit
2574     and setrlimit.
2575   * freebsd/syscalls.print: don't explicitly use 64 bit versions of calls,
2576     now done automaticaly for us.
2577   * freebsd/i386/syscall.h: ditto.
2578   * freebsd/i386/syscallent.h ditto.
2579
2580 2001-03-07  John Hughes <john@Calva.COM>
2581
2582   * desc.c: On FreeBSD flock structure uses 64 bit offsets.
2583   * file.c: On FreeBSD use stat64 and pals instead of stat.
2584   * freebsd/syscalls.print: use stat64, lstat64 and fstat64.
2585   * freebsd/i386/syscall.h: ditto.
2586   * freebsd/i386/syscallent.h: ditto.
2587
2588 2001-03-07  John Hughes <john@Calva.COM>
2589
2590   * file.c: merge missing part of Harald Böhme's solaris patches,
2591     was only declaring sys_{stat64,lstat64,fstat64} on linux!
2592
2593 2001-03-07  John Hughes <john@Calva.COM>
2594
2595   * svr4/dummy.h: fix multiple define warning on non LFS64 systems.
2596   * svr4/syscallent.h: pread/pwrite are TF calls.
2597
2598 2001-03-07  John Hughes <john@Calva.COM>
2599
2600   * defs.h: add ALIGN64 macro to cope with FreeBSD's strange insistence
2601     on alignment for off_t (64 bit) arguments.  Also simplify get64 so
2602     we don't need to know endianness of long long.
2603   * file.c: FreeBSD now uses 64 bit versions of lseek, truncate,
2604     ftruncate, allows reduction in numvber of horrid #if's
2605   * io.c: FreeBSD now uses 64 bit versions of pread, pwrite.
2606   * mem.c: FreeBSD now uses 64 bit version of mmap.
2607   * freebsd/syscalls.print: use 64 bit versions of various syscalls.
2608   * freebsd/i386/syscall.h: use 64 bit versions of various syscalls.
2609   * freebsd/i386/syscallent.h: use 64 bit versions of various syscalls.
2610
2611 2001-03-06  John Hughes <john@Calva.COM>
2612
2613   * file.c: Implement truncate64 and ftruncate64
2614   * svr4/dummy.h: add dummies for truncate64 and ftruncate64 for non
2615     LFS64 systems.
2616   * svr4/syscall.h: add declarations for truncate64 and ftruncate64.
2617
2618 2001-03-06  John Hughes <john@Calva.COM>
2619
2620   * freebsd/syscalls.pl: fix for FreeBSD 4.1 (new optional field in
2621     syscall master file).
2622
2623 2001-03-06  John Hughes <john@Calva.COM>
2624
2625   * syscall.c: fix for FreeBSD 4.1 (SYS_semconfig has disappeared).  Also
2626     zap incorrect syscall subarg range check.
2627
2628 2001-03-06  John Hughes <john@Calva.COM>
2629
2630   * configure.in, defs.h, desc.c, file.c, io.c, mem.c, net.c, resource.c,
2631     signal.c, syscall.c, svr4/dummy.h, svr4/syscall.h, svr4/syscallent.h:
2632     merge Harald Böhme's solaris patches (_LFS64_LARGEFILE and kernel aio
2633     mostly).
2634
2635 2001-03-06  John Hughes <john@Calva.COM>
2636
2637   * dummy.h: add unimplemented UW sycalls
2638   * syscall.h: we can do settimeofday for UW, whopee!
2639   * syscallent.h: fix unimplemented UW syscalls
2640
2641 2001-03-06  John Hughes <john@Calva.COM>
2642
2643   * aclocal.m4: look for pr_syscall in pr_lwp if we HAVE_MP_PROCFS
2644   * defs.h: add PR_SYSCALL to allow use of pr_lwp.pr_syscall if it exists.
2645   * syscall.c: use PR_SYSCALL instead of pr_syscall, fix up UnixWare code
2646     so it doesn't try to use pr_sysarg.
2647
2648 2001-03-06  John Hughes <john@Calva.COM>
2649
2650   * aclocal.m4: on systems other than linux look for stat64 in sys/stat.h
2651   * file.c: handle xstat version _STAT64_VER, aka stat64.
2652
2653 2001-03-06  John Hughes <john@Calva.COM>
2654
2655   * net.c: make sure SOL_ options are defined before using.
2656   * signal.c: declare sigset variable, only used on linux, inside #ifdef.
2657
2658 2001-02-21  Wichert Akkerman <wakkerma@debian.org>
2659
2660   * net.c: fix format for printing Unix domain sockets
2661
2662 2001-02-19  Wichert Akkerman <wakkerma@debian.org>
2663
2664   * linux/mips/syscallent.h: use new sys_sysmips
2665   * system.c: add sys_sysmips decoding
2666
2667 2001-02-16  Wichert Akkerman <wakkerma@debian.org>
2668
2669   * CREDITS: add Arkadiusz Miskiewicz <misiek@pld.org.pl> who
2670     submitted the IP6 scope ID updates
2671   * acconfig.h: add HAVE_SIN6_SCOPE_ID and HAVE_SIN6_SCOPE_ID_LINUX
2672   * aclocal.m4: add AC_SIN6_SCOPE_ID to check if sin6_scope_id is
2673     available
2674   * configure.in: check for if_indextoname function and sin6_scope_id
2675   * net.c: teach printsock about IP6 scope ids
2676
2677 2001-02-16  Wichert Akkerman <wakkerma@debian.org>
2678
2679   * configure.in: test for netinet/tcp.h and netinet/udp.h existance
2680   * net.c: include netinet/tcp.h and netinet/udp.h if they exist
2681   * Makefile.in: use @mandir@ and @bindir@
2682
2683 2000-11-26  Wichert Akkerman <wakkerma@debian.org>
2684
2685   *  net.c: fix formating error in sys_setsockopt
2686   *  net.c: add list of socketlayers and use that for [gs]etsockopt
2687
2688 2000-10-12  Wichert Akkerman <wakkerma@debian.org>
2689
2690   * time.c: use sys/timex.h so things compile with 2.2 kernels
2691   * stream.c: test if MSG_* constants are #defined
2692
2693 2000-09-03  Wichert Akkerman <wakkerma@debian.org>
2694
2695   * process.c: perform bpt trick for clone as well so we can get the
2696     pid of the child before it starts doing something
2697   * file.c: rename dirent64 struct to kernel_dirent64 so things compile
2698     again with newer libcs
2699   * test/clone.c: improve our testcase a bit
2700   * Merge another patch from Gäel Roualland with FreeBSD updates
2701
2702 2000-09-01  Wichert Akkerman <wakkerma@debian.org>
2703
2704   * lots of files: merge patch from Gaël Roualland to add
2705     support for FreeBSD.
2706
2707 2000-08-09  Wichert Akkerman <wakkerma@debian.org>
2708
2709   * file.c: update to reflect that st_ino suddenly became a long long
2710     in the in Linux 2.4.0-test6
2711
2712 2000-08-09  Wichert Akkerman <wakkerma@debian.org>
2713
2714   * test/clone.c: minor fixup
2715   * Another bunch of patches from John Hughes merged:
2716   * signal.c:
2717     + SVR4 printcontext(): sigset_t != sigset_t*
2718     + getcontext returns a value, so print on exit of syscall
2719     + add UC_FP to ucontext_flags for OS writers that can't spell
2720     + sys_signal(): special case SIG_{ERR,DFL,IGN}
2721     + decode_subcall(): only do subcall range checking when needed
2722   * bunch of UnixWare updates
2723   * aclocal.m4, acconfig.h, configure.in: add test for long long type
2724
2725 2000-07-04  Wichert Akkerman <wakkerma@debian.org>
2726
2727   * net.c: add SOL_PACKET and SOL_RAW socket options, update
2728     SOL_IP and SOL_TCP
2729
2730 2000-06-23  Wichert Akkerman <wakkerma@debian.org>
2731
2732   * strace.c: close outf before we exec a child process
2733
2734 2000-06-09  Ulrich Drepper  <drepper@redhat.com>
2735
2736   * configure.in: Don't link against libnsl on Linux, it's unnecessary.
2737   * defs.h (struct tcb): Make auxstr member const.
2738   * file.c (fsmagic): And many more magic numbers.
2739   * util.c: Don't include <linux/ptrace.h> for glibc 2.1 and up.
2740
2741 2000-04-26  Wichert Akkerman <wakkerma@debian.org>
2742
2743   * defs.h: balance #if/#endif again
2744   * system.c: fix return statements in sys_capget()
2745   * Merge updates from Topi Miettinen <Topi.Miettinen@nic.fi>:
2746     + file.c: add F_[SG]ETSIG to fcntl flags
2747     + strace.c: don't setre[gu]id if not needed
2748     + system.c: handle sys_reboot for Linux
2749     + term.c: add baudrate constants up to B4000000
2750     + linux/**/syscallent.h: note that munlockall has no arguments
2751
2752 2000-04-25  David Mosberger  <davidm@hpl.hp.com>
2753
2754   * CREDITS: fix email address
2755   * process.c: handle PR_[GS]ET_UNALIGN and PR_[GS]ET_KEEPCAPS
2756   * signal.c: honour offset of sigconfig in sigframe structure for
2757     Linux/ia64
2758   * linux/ia64/syscallent.h: Add perfmonctl, pivotroot, mincore, and
2759     madvise syscalls.
2760   * syscall.c (syscall_enter): With Kevin's latest ptrace patches,
2761     AR_BSP points to the _end_ of the active register frame, so we need
2762     to adjust bsp by moving it back by the size of the active frame
2763     before using it.
2764
2765 2000-04-24  Wichert Akkerman <wakkerma@debian.org>
2766
2767   * process.c: add sparc support to change_syscall
2768
2769 2000-04-22  Wichert Akkerman <wakkerma@debian.org>
2770
2771   * linux/mips/syscallent.h: fix some typos
2772
2773 2000-04-14  Wichert Akkerman <wakkerma@debian.org>
2774
2775   * linux/mips/syscallent.h: added names for SVR4, SYSV, BSD4.3 and POSIX
2776     syscalls
2777
2778 2000-04-13  Wichert Akkerman <wakkerma@debian.org>
2779
2780   * defs.h: Linux/MIPS uses syscalls up to >4k, so set MAX_QUALS to
2781     4999
2782
2783 2000-04-09  Wichert Akkerman <wakkerma@debian.org>
2784
2785   * README-linux: updated to note that strace might not compile
2786     with development kernels
2787   * bjm.c: sys_query_module: check if malloc succeeds
2788   * system.c: sys_cap[gs]et(): check if malloc succeeds, only malloc once
2789   * linux/syscallent.h: updated for 2.3.99pre3
2790   * linux/alpha/syscallent.h: updated for 2.3.99pre3, add all osf syscalls
2791     even though Linux doesn't implement them
2792   * syscall.c: add global variables for MIPS registers as well
2793   * syscall.c: move global variables to before get_scno since that uses them
2794   * util.c: oops, misspelled defined
2795   * process.c: fix ptrace calls in change_syscall
2796   * mem.c: decode sys_madvise
2797   * Merge patch from Topi Miettinen <Topi.Miettinen@nic.fi>
2798     + add support for quotactl, fdatasync, mlock, mlockall, munlockall & acct
2799     + small fix for RLIMIT_* and RUSAGE_BOTH
2800     + enhace support for capget and capset
2801
2802 2000-02-19 Wichert Akkerman <wakkerma@debian.org>
2803
2804   * test/vfork.c: new file to test vfork traces
2805   * test/.cvsignore: new file
2806   * defs.h: Up maximum number of traced processed to 64
2807   * strace.c: Disable some debugging code from davidm
2808   * implement setarg for more architectures
2809   * implement change_syscall
2810
2811 1999-12-27  Morten Welinder  <terra@diku.dk>
2812
2813         * syscall.c (lookup_signal, lookup_desc): isdigit requires an
2814         _unsigned_ char parameter.
2815
2816 2000-02-14 Wichert Akkerman <wakkerma@debian.org>
2817
2818   * S390 updates
2819
2820 2000-02-03 Wichert Akkerman <wakkerma@debian.org>
2821
2822   * Merge Linux/ia64 patches
2823
2824 2000-01-02 Pavel Machek      <pavel@ucw.cz>
2825
2826   * probe if sys/poll.h exists in configure + minor cleanups
2827
2828   * syscall.c: split trace_syscall into few pieces to make code readable
2829
2830 2000-01-21 Wichert Akkerman  <wakkerma@debian.org>
2831
2832   * Release version 4.2 to get the current updates out and so
2833     we can concentrate in finishing the clone support.
2834
2835 2000-01-11 Wichert Akkerman  <wakkerma@debian.org>
2836
2837   * Add 1900 to tm_year in sprinttime
2838
2839 1999-12-24  Wichert Akkerman  <wakkerma@debian.org>
2840
2841  * file.c: protect printstat64 with STAT64 instead of linux so we can
2842    compile on Linux architectures that don't have it
2843  * util.c: fix LOOP for ARM
2844
2845 Fri Dec 24 18:05:00 EST 1999
2846
2847 1999-12-23  Ulrich Drepper  <drepper@cygnus.com>
2848
2849  * file.c: Use ugly libc_stat trick also for stat64.
2850    Implement sys_stat64, sys_fstat64, sys_lstat64, and printstat64.
2851  * process.c (internal_clone): Fix a few typos and add definitions to make
2852    it at least compile.
2853  * linux/syscall.h: Declare sys_stat64, sys_lstat64, and sys_fstat64.
2854  * linux/syscallent.h: Define table entries for sys_stat64, sys_lstat64,
2855    and sys_fstat64.
2856  * aclocal.m4: Define AC_STAT64.
2857  * acconfig.h: Define HAVE_STAT64.
2858  * configure.in: Add AC_STAT64.
2859
2860 Thu Dec 23 15:01:37 CET 1999 Wichert Akkerman <wakkerma@debian.org>
2861
2862   * Merge patch from ftp://oss.software.ibm.com/linux390/ to add
2863     support for Linux on the IBM S/390 architecture
2864   * process.c: add internal_clone(), currently only shows the options
2865   * syscall.c: use internal_clone to handle SYS_clone
2866
2867 Mon Dec 20 00:27:50 CET 1999 Wichert Akkerman <wakkerma@debian.org>
2868
2869   * Rewrite mmap-handling to support mmap2 on Linux
2870
2871 Tue Dec 14 11:35:16 CET 1999 Wichert Akkerman <wakkerma@debian.org>
2872
2873   * Note that Linux can handle sys_semop() as well
2874
2875 Tue Nov 30 11:05:26 CET 1999 Wichert Akkerman <wakkerma@debian.org>
2876
2877   * Include linux/in6.h for glibc2.0 and older
2878
2879 Mon Nov 29 16:33:04 CET 1999 Wichert Akkerman <wakkerma@debian.org>
2880
2881   * Merge patches from John Hughes to make configure support UnixWare
2882
2883 Sat Nov 27 21:38:17 CET 1999 Wichert Akkerman <wakkerma@debian.org>
2884
2885   * Enhance sys_query_module
2886
2887 Fri Nov 26 10:51:55 CET 1999 Wichert Akkerman <wakkerma@debian.org>
2888
2889   * Patches from John Hughes:
2890     + cosmectic fix in sys_getpmsg
2891     + allow net.c to compile on systems without AF_INET6
2892     + Only use long_to_sigset on Linux systems
2893     + UnixWare treats sigmask_t and sigmask_t* as the same thing
2894     + Add pollhack
2895     + Parse mount arguments for UnixWare
2896     + ACL fixes for UnixWare
2897
2898 Fri Nov 26 01:28:09 CET 1999 Wichert Akkerman <wakkerma@debian.org>
2899
2900   * Release 4.1 to get all the changes made out there
2901
2902 Thu Nov 18 18:04:04 CET 1999 Wichert Akkerman <wakkerma@debian.org>
2903
2904   * Merge stracefork from Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
2905     + Socket calls parsed better
2906         + bunch of alpha OSF syscalls added
2907         + Fix alpha 32/64 bit issues
2908
2909 Mon Nov  1 20:52:08 CET 1999 Wichert Akkerman <wakkerma@debian.org>
2910
2911   * Move Linux kernelmodule-functions from system.c to bjm.c and
2912     remove duplicate for sys_create_module
2913   * Linux MIPS updates:
2914     + Play with #ifdef's in net.c to get IPv6 right
2915     + Use printargs for vm86-syscall
2916
2917 Sun Oct 31 22:03:00 CET 1999 Wichert Akkerman <wakkerma@debian.org>
2918
2919   * Merge Linux mips patch from Florian Lohoff <flo@rfc822.org>
2920
2921 Mon Oct 11 00:36:25 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
2922
2923   * Merge patch from Keith Owens <kaos@ocs.com.au> to sys_query_module
2924     and sys_delete_module correctly
2925
2926 Wed Oct  6 02:00:33 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
2927
2928   * Update cvsbuild to give a better error if autoconf isn't installed
2929   * Add test for linux/ptrace.h to configure
2930   * Since we define GNU_SOURCE in the Makefile we don't need to define
2931     USE_GNU in file.c anymore
2932
2933 Fri Sep 10 04:35:16 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
2934
2935   * #define USE_GNU before including file.c so we get some extra O_* flags
2936
2937 Tue Aug 31 16:27:21 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
2938
2939   * Add missing } in IPv6 output
2940
2941 Tue Aug 31 01:23:08 CEST 1999  Wichert Akkerman <wakkerma@debian.org>
2942
2943   * Update copyright for strace-graph to BSD to be consistent with
2944     the rest of strace
2945
2946 Mon Aug 30 00:53:57 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
2947
2948   * Merge patch from Daniel Jacobowitz: KERN_JAVA_* and KERN_SECURELVL aren't
2949     defined for all kernelversions
2950   * Add strace-graph, written by Richard Braakman <dark@xs4all.nl>
2951
2952 Thu Aug 19 13:10:15 CEST 1999 Jakub Jelinek <jj@ultra.linux.cz>
2953
2954   * linux/sparc/syscall.h: Declare create_module/init_module.
2955   * configure.in: Allow compilation in a different directory
2956     than the source one.
2957   * signal.c: Use asm/reg.h and struct regs instead of pt_regs
2958     so that we don't depend on asm/ptrace.h which clashes with
2959     glibc sys/ptrace.h.
2960   * util.c: Likewise.
2961   * syscall.c: Likewise.
2962
2963 Wed Aug  4 18:01:50 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
2964
2965   * Syscall 94 on Linux alpha is sys_poll
2966
2967 Sun Jul 25 14:38:33 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
2968
2969   * Merge in UnixWare patches from John Hughes <john@Calva.COM>
2970
2971 Thu Jul 15 23:00:32 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
2972
2973   * Merge patch from Maciej W. Rozycki <macro@ds2.pg.gda.pl>:
2974     + Correctly implement fix sys_createmodule (Linux)
2975     + Add limited handlig of sys_initmodule (Linux)
2976
2977 Tue Jul 13 17:07:50 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
2978
2979   * Add configure-test for sys/reg.h and use that
2980   * Use sys/reg.h instead of asm/ptrace.h
2981
2982 Sat Jul 10 01:46:10 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
2983
2984   * Remove hack in signal.c for arm architecture
2985   * Add hack so we compile correctly on powerpc
2986
2987 Fri Jul  9 02:28:16 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
2988
2989   * Add a corrected patch from Daniel Jacobowitz
2990
2991 Thu Jul  8 16:00:04 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
2992
2993   * Merge patch from Daniel Jacobowitz to allow us to use the kernel types
2994     for the stat structure
2995
2996 Thu Jun 24 15:54:18 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
2997
2998   * Fix test for sys/reg include
2999
3000 Tue Jun 22 17:26:33 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
3001
3002   * Fixed some Linux/powerpc sillyness, thanks to Daniel Jacobowitz
3003   * Fixed some SunOS compile problems earlier that I forgot to include
3004     here
3005
3006 Mon Jun 14 12:44:25 CEST 1999
3007
3008   * Avoid leakint fd into child when forking, patch from
3009     John Hughes <john@Calva.COM>
3010
3011 Fri Jun 11 14:54:47 CEST 1999
3012
3013   * Applied IRIX64 patch from Thomas E. Dickey <dickey@clark.net>
3014   * Applied Solaris and manpage updates from Guy Harris <guy@netapp.com>
3015
3016 Wed Jun  9 14:48:49 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
3017
3018   * Brought syscall list for alpha up to date
3019
3020 Wed Jun  2 18:30:12 CEST 1999 Jakub Jelinek <jj@ultra.linux.cz>
3021
3022   * system.c: sys_umount2 syscall support.
3023   * linux/sparc/errnoent.h: Update sparc-linux errnos.
3024   * linux/sparc/syscall.h: Update used sparc-linux syscalls.
3025   * linux/sparc/syscallent.h: Match 2.2.9 system calls.
3026   * file.c: sparc-linux asm/stat.h uses dev_t etc. types,
3027     so it needs strace's own copy of the stat structure.
3028   * util.c: Make it compile on sparc-linux.
3029   * strace.c: Fix strace -f and -ff operation on sparc-linux.
3030   * signal.c: rt_sigaction has different arguments on sparc*-linux
3031     and alpha-linux.
3032   * syscall.c: Recognize sparc64-linux binaries.
3033
3034 Fri May 28 21:09:00 PST Ulrich Drepper <drepper@cygnus.com>
3035
3036   * configure.in: Fix typo (CFLAG -> CFLAGS).
3037
3038   * syscall.c: Don't include linux/ptrace.h explicitly for glibc.
3039
3040 Thu May 27 13:59:27 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
3041
3042   * Add some sysctl support, patch from Ulrich Drepper
3043
3044 Wed May 26 01:04:34 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
3045
3046   * Use kernel dirent structure for Linux
3047
3048 Sun May  9 02:18:30 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
3049
3050   * Merge in patches from Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3051     + some layout and other minor fixes
3052     + add some m68k-specific things to linux/syscallent.h. Note that m68k
3053       is similar enough to i386 to not need it's own subdirectory
3054     + add support for sendfile and mremap syscalls for Linux
3055   * Merge in patches from Sascha Schumann <sascha@schumann.2ns.de>
3056     + ioctls.h vs sys/ioctl.h on Alpha platform
3057     + pointer was casted to an int in stream.c
3058     + strsignal() needs -D_GNU_SOURCE in CFLAGS
3059     + several other casts changed
3060     + correct ARM/POWERPC architecture defines in acconfig.h
3061   * Merge in patches from Morten Welinder <terra@diku.dk>
3062     + add some autoconf-tests for includefiles
3063     + handle solaris version of sigcontext struct (actually I hacked this
3064       up again, but the idea is his :)
3065
3066 Sun Apr 18 22:32:42 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
3067
3068   * Update syscalls for linux alpha, patch from Bart Warmerdam
3069     <bartw@debian.org>
3070   * Update sparc code so it actually compiles
3071
3072 Fri Apr 16 02:18:05 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
3073
3074   * Add support for old_*stat functions for Linux. Please note you need
3075     to use reasonably recent kernel headers to compile strace now.
3076   * Change references to LINUX into linux in file.c
3077   * Fix include for LDT in mem.c
3078
3079 Thu Apr 15 22:28:15 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
3080
3081   * Change in strace maintainership, jrs passed the torch to me.
3082   * Use autoconf 2.13
3083   * Incorporate all changes already made in the Debian strace package:
3084     + compiles with more Linux kernels
3085     + added support for more Linux architectures
3086     + add support for a lot of extra syscalls
3087     + fix some problems with hanging children
3088     + check stray syscall after execv
3089     + decode capget and capset arguments
3090     + add more constants to net.c
3091     + detect ROSE networking
3092     + add more protocol families to domains
3093     + add IPIP protocol
3094     + added MSG_PROXY and MSG_CTRUNC to msg_flags
3095     + added SO_BSDCOMPAT and SO_REUSEPORT to sockoptions
3096     + added IP, IPX and TCP-options
3097     + added IP, IPX and TCP support to get-/setsockopt()
3098     + added IPX support
3099     + updated handling of signals
3100
3101 Sun Oct 27 22:28:00 1996  J. Richard Sladkey  <jrs@world.std.com>
3102
3103         * util.c (umovestr) [LINUX]: Handle Linux like SunOS4
3104         instead of SVR4.  That is, read a few bytes at a time
3105         to avoid overrunning the end of the stack.
3106
3107 Fri May 31 01:48:49 1996  J. Richard Sladkey  <jrs@world.std.com>
3108
3109         * version.c: Version 3.1 is released.
3110
3111 Thu May 23 01:04:43 1996  J. Richard Sladkey  <jrs@world.std.com>
3112
3113         * aclocal.m4 (AC_DECL_SYS_ERRLIST): Try looking in stdio.h
3114         as well since that's where glibc declares it.  Go figure.
3115         * signal.c (sys_sigreturn) [ALPHA]: Use sigcontext
3116         instead of sigcontext_struct since glibc v5+ apparently
3117         plays games with the native OS namespace.
3118         From David Mosberger-Tang <davidm@AZStarNet.com>.
3119
3120 Mon May 20 23:17:14 1996  J. Richard Sladkey  <jrs@world.std.com>
3121
3122         * version.c: Version 3.0.14 is released.
3123
3124         * aclocal.m4 (AC_STRUCT_MSG_CONTROL): New macro.
3125         * configure.in: Add call to AC_STRUCT_MSG_CONTROL.
3126         * net.c (printmsghdr): Handle BSD 4.3 and 4.4 msghdr members
3127         differently.
3128         Reported by Henrik Storner <storner@osiris.ping.dk>.
3129
3130         * configure.in: (AC_CHECK_{HEADERS,FUNCS}): Add checks for
3131         sys/filio.h and sys/stream.h and remove check for poll.
3132         * desc.c (decode_select, sys_select, sys_oldselect) [LINUX]:
3133         Handle old and new styles of argument passing for select on Linux.
3134         * ioctl.c, stream.c: Conditionalize stream code on presence of
3135         sys/stream.h instead of poll because glibc implements poll but
3136         not the rest of the stream interface.
3137         * signal.c [LINUX]: Standardize on the name sigcontext_struct.
3138         (sys_sigprocmask) [ALPHA]: Handle OSF flavor which is more like
3139         sigsetmask.
3140         * term.c (term_ioctl): Use _VMIN, if present, for TC{G,S}ETA*.
3141         * util.c (umoven, umovestr): Move data in long-sized chunks
3142         at a time, instead of hard coding it to be 4.
3143         From David Mosberger-Tang <davidm@AZStarNet.com>.
3144
3145 Mon May 20 01:19:36 1996  J. Richard Sladkey  <jrs@world.std.com>
3146
3147         * version.c: Version 3.0.13 is released.
3148
3149         * configure.in (AC_CHECK_HEADERS): Add check for asm/sigcontext.h.
3150         * signal.c [HAVE_ASM_SIGCONTEXT_H]: Conditionally include
3151         asm/sigcontext.h to define sigcontext_struct and don't define it
3152         locally if the header is present.
3153
3154         * syscall.c (nerrnos{0,2}): Correct size computation.
3155
3156         * Makefile.in: Remove dependencies and rules relating to files
3157         normally found in the os directory.  Because of the new scheme we
3158         don't know precisely where they come from.  Sigh.
3159         * signalent.sh: Make it work for sunos4, linux, and svr4.
3160         * {sunos4,linux{,/alpha},svr4}/Makefile.in: Make rules correspond
3161         to traditional make syntax.  Add signalent.h to files which can
3162         unconditionally be rebuilt.  Prevent signalent.h from being
3163         unconditionally being rebuilt since it's customized.
3164         * {sunos4,linux{,/alpha},svr4}/{ioctlent,errnoent,signalent}.h:
3165         Use versions built by {ioctlent,errnoent,signaltent}.sh.
3166         * sunos4/ioctlent.sh: Work around sprintf troubles with SunOS
3167         4.1.4 and gcc 2.7.2.
3168
3169 Sun May 19 17:14:09 1996  J. Richard Sladkey  <jrs@world.std.com>
3170
3171         * configure.in, Makefile.in: Add OSARCH concept to finish
3172         build support for the alpha.
3173         * Makefile.in, linux/Makefile.in: Rewrite clean, distclean,
3174         and maintainer-clean rules.
3175         * defs.h, ioctlsort.c: Make ioctl code member unsigned.
3176         * ioctl.c, ioctlsort.c (compare): Perform explicit checking
3177         for less, greater, and equal since subtraction on two's
3178         complement numbers isn't an order relation (it isn't transitive)!
3179         * linux/Makefile.in: Add rules for the signalent.h file.
3180         * linux/alpha/Makefile.in: New file.
3181
3182 Sun May 19 01:12:28 1996  J. Richard Sladkey  <jrs@world.std.com>
3183
3184         * version.c: Version 3.0.12 is released.
3185
3186         * linux{,alpha}/ioctlent.sh: Tweak for recent kernels.
3187         From Michael E Chastain <mec@duracef.shout.net>.
3188
3189         * defs.h (SUPPORTED_PERSONALITES, DEFAULT_PERSONALITY): New.
3190         * syscall.c (set_personality): New.
3191         * strace.c (main): Call set_personality.
3192         * defs.h, syscall.c, ioctl.c, signal.c: Make sysent, errnoent,
3193         ioctlent, and signalent indirect pointers and redirect them
3194         based on personality.
3195         * {sunos4,svr4,linux{,/alpha}}/signalent.h: New files.
3196         Suggested by Tom Dyas <tdyas@eden.rutgers.edu>.
3197
3198         * util.c (upeek): Handle case where ptrace returns a long
3199         and sizeof(long) != sizeof(int).
3200         From Richard Henderson <richard@twiddle.tamu.edu>
3201
3202 Fri May 17 21:03:36 1996  J. Richard Sladkey  <jrs@world.std.com>
3203
3204         * version.c: Version 3.0.11 is released.
3205
3206         * many files: Fix more printf warnings for other platforms.
3207
3208         * ipc.c (sys_msgrcv) [LINUX]: Conditionalize definition of ipc_wrapper.
3209
3210         * linux/dummy.h: Handle missing library support for {send,recv}msg.
3211         Reported by Thomas Bogendoerfer <tsbogend@bigbug.franken.de>.
3212
3213         * linux/syscall.h (sys_utimes): Fix a typo in the declaration.
3214         From Thomas Bogendoerfer <tsbogend@bigbug.franken.de>.
3215
3216 Fri May 17 00:50:06 1996  J. Richard Sladkey  <jrs@world.std.com>
3217
3218         * version.c: Version 3.0.10 is released.
3219
3220         * Makfile.in: Add os/arch to includes so that a given arch
3221         (like alpha) can override the native arch (like i386).
3222         * configure.in: Check for sendmsg.
3223
3224         * net.c: Make sendmsg and recvmsg dependent on an autoconf
3225         test.  Reported by Michael E Chastain <mec@duracef.shout.net>.
3226
3227         * acconfig.h, configure.in: Detect the alpha.
3228         * ioctl.c: Handle the alpha.
3229         * defs.h: Make some members long for the alpha.  Define
3230         some register nicknames.  Add support for WAITEXECVE.
3231         * file.c [ALPHA]: Support the alpha for statfs.  Add
3232         osf_statfs and osf_fstatfs for the alpha.  Make damn sure
3233         major and minor results are suitable for passing to printf.
3234         * signal.c, syscall.c: Support the alpha.
3235         * process.c: Add alpha user offsets.
3236         * most files: Use %l? for printf arguments since
3237         most are now longs for the alpha.
3238         * linux/alpha/{errnoent.h,ioctlent.{h,sh},syscallent.h}:
3239         New for the alpha.
3240         From Thomas Bogendoerfer <tsbogend@bigbug.franken.de>.
3241
3242 Wed May 15 00:29:37 1996  J. Richard Sladkey  <jrs@world.std.com>
3243
3244         * version.c: Version 3.0.9 is released.
3245
3246         * config.in, config.sub, install-sh: Upgrade to autoconf 2.10.
3247
3248         * linux/dummy.h, linux/syscallent.h, linux/syscall.h: Add recent
3249         Linux kernel version system calls.
3250
3251 Wed Mar 13 01:03:38 1996  J. Richard Sladkey  <jrs@world.std.com>
3252
3253         * ipc.c [SUNOS4]: Add SunOS support for decoding IPC calls.
3254         * syscall.c [SUNOS4]: Compile decode_subcall on SunOS and
3255         decode IPC calls using it.
3256         * sunos4/dummy.h: Alias sys_semop to printargs.
3257         * sunos4/syscall.h: Add new pseudo syscalls for IPC.
3258         * sunos4/syscallent.h: Include new subcalls for IPC.
3259         From Matthias Pfaller <leo@dachau.marco.de>.
3260
3261 Tue Feb 13 22:08:25 1996  J. Richard Sladkey  <jrs@world.std.com>
3262
3263         * version.c: Version 3.0.8 is released.
3264
3265         * time.c [LINUX]: Explicitly include linux/version.h.
3266
3267         * strace.c (main): Don't let them even *try* to
3268         get strace to attach to itself since some systems
3269         don't handle this case very gracefully.
3270         Reported by David S. Miller <davem@caip.rutgers.edu>.
3271
3272         * Makefile.in (distclean): Fix it for subdirectories.
3273
3274         * sunos4/syscallent.h, svr4/syscallent.h: Fill in the new
3275         sys_flags member for each defined system call.
3276
3277 Fri Dec  8 01:17:28 1995  Rick Sladkey  <jrs@world.std.com>
3278
3279         * defs.h (TRACE_*): New flags to describe what class
3280         of system call each system call is.
3281         (sysent): Add sys_flags member.
3282         * syscall.c (sysent): Define (and later undef) abbreviations
3283         for the system call class flags.
3284         (lookup_class): New function to translate strings to
3285         system call class flags.
3286         (qualify): Handle new system call class mechanism.
3287         * linux/syscallent.h: Fill in the new sys_flags member
3288         for each defined system call.
3289
3290         * defs.h (print_sock): Remove redundant and non-K&R C
3291         compatible prototype.  From Juergen Weigert
3292         <jnweiger@immd4.informatik.uni-erlangen.de>.
3293
3294 Thu Dec  7 01:17:40 1995  Rick Sladkey  <jrs@world.std.com>
3295
3296         * linux/ioctlent.sh: Tweak to improve ioctl accuracy.
3297         From Michael E Chastain <mec@duracef.shout.net>.
3298
3299         * system.c (includes) [LINUX]: Add linux/nfs.h for recent
3300         kernels.  From Michael E Chastain <mec@duracef.shout.net>.
3301
3302 Wed Dec  6 21:52:28 1995  Rick Sladkey  <jrs@world.std.com>
3303
3304         * file.c (sprintfstype): Enclose string result in double
3305         quotes.
3306
3307         * time.c (sys_adjtimex) [LINUX]: Conditionalize
3308         constantly evolving timex structure.
3309         From Aaron Ucko <UCKO@VAX1.ROCKHURST.EDU>.
3310
3311         * defs.h, syscall.c, strace.c: Rename syscall to
3312         trace_syscall and change prototype and all callers
3313         because of broken Linux shared libraries.
3314         From Aaron Ucko <UCKO@VAX1.ROCKHURST.EDU>.
3315
3316         * Makefile.in (clean): Check for a file with test -f not
3317         test -d.  From Aaron Ucko <UCKO@VAX1.ROCKHURST.EDU>.
3318
3319 Tue Sep 26 02:32:31 1995  Rick Sladkey  <jrs@world.std.com>
3320
3321         * version.c: Version 3.0.7 is released.
3322
3323         * util.c (string_quote): Fix thinko which caused core
3324         dumps for strings with quotes in them.
3325         Reported by Marty Leisner <leisner@sdsp.mc.xerox.com>.
3326
3327         * linux/Makefile.in (errnoent.h rule): Grab all errno.h
3328         files from /usr/include, not just the linux one.
3329         From Michael E Chastain <mec@duracef.shout.net>.
3330
3331         * linux/errnoent.sh: Total rewrite to handle more ioctls with
3332         fewer false positives on more kernel flavors.
3333         From Michael E Chastain <mec@duracef.shout.net>.
3334
3335 Mon Sep  4 01:29:22 1995  Rick Sladkey  <jrs@world.std.com>
3336
3337         * version.c: Version 3.0.6 is released.
3338
3339         * linux/dummy.h, linux/syscall.h, linux/syscallent.h: Add
3340         sys_msync.
3341         * mem.c (mctl_funcs, mctl_lockas, sys_mctl): Conditionalize
3342         on MC_SYNC instead of HAVE_MCTL.
3343         (mctl_sync): Conditionalize on MS_ASYNC instead of HAVE_MCTL.
3344         (sys_msync): New function.
3345
3346 Sat Sep  2 12:06:04 1995  Rick Sladkey  <jrs@world.std.com>
3347
3348         * linux/dummy.h, linux/syscall.h, linux/syscallent.h: Add
3349         sys_flock and sys_getdents.
3350         * desc.c (flockcmds, sys_flock): Conditionalize on LOCK_SH
3351         not SUNOS4.
3352         * file.c (sys_getdents): Define unconditionally and handle
3353         LINUX case.
3354         * strace.c (main): Disallow username option unless both real
3355         and effective uids are root.
3356
3357 Wed Aug 30 01:29:58 1995  Rick Sladkey  <jrs@world.std.com>
3358
3359         * strace.c (main): Ensure that run_uid and run_gid are
3360         always set to something meaningful.
3361         (main, newoutf) [!SVR4]: Swap real and effective uids while
3362         opening any output files.
3363         (main) [!SVR4]: Treat effective uid of root as a request
3364         to handle suid binaries correctly using the real uid of
3365         the invoking user.
3366
3367 Sat Aug 19 00:06:08 1995  Rick Sladkey  <jrs@world.std.com>
3368
3369         * Makefile.in: Add `|| true' to clean rule because
3370         although GNU make 3.74 uses `sh -c' to invoke commands
3371         every other make in the world uses `sh -ec'.
3372
3373         * syscall.c (syscall) [SVR4, MIPS]: The fifth and subsequent
3374         arguments appear to be stored on the stack, not in the
3375         registers following A3 (empirical result).
3376
3377         * defs.h: Add prototype for printsock.
3378         * svr4/dummy.h: Remove generic handling of sys_mount.
3379         * system.c [SVR4, MIPS]: Include several system headers to cleanly
3380         get access to SGI mount information.
3381         (mount_flags, nfs_flags) [SVR4, MIPS]: New objects.
3382         (sys_mount) [SVR4, MIPS]: New function.
3383         (sys_mount) [SVR4, !MIPS]: New function.
3384
3385 Tue Jul  4 00:30:34 1995  Rick Sladkey  <jrs@world.std.com>
3386
3387         * version.c: Version 3.0.5 is released.
3388
3389         * desc.c, resource.c, strace.c, syscall.c, time.c: Cast tv_sec and
3390         tv_usec members to long when using printf.
3391
3392         * ipc.c: Omit define of __KERNEL__.
3393         ({MSG,SEM,SHM}_{STAT,INFO}): Explicitly define those things we
3394         want which __KERNEL__ used to provide.
3395         (sys_msgrcv): Change reference to ipc_kludge structure to
3396         look-alike ipc_wrapper to avoid dependence on __KERNEL__.
3397
3398         mem.c (mmap_flags) [MAP_{GROWSDOWN,DENYWRITE,EXECUTABLE}]: Add
3399         Linux specific options.
3400
3401         syscall.c: Use SYS_ERRLIST_DECLARED instead of guessing.
3402         [E{RESTART{SYS,NO{INTR,HAND}},NOIOCTLCMD}]: Explicitly define
3403         instead of depending of __KERNEL__.
3404
3405         term.c: Cast c_{i,o,c,l}flag to long when using printf.
3406
3407 Tue Jun  6 00:27:48 1995  Rick Sladkey  <jrs@world.std.com>
3408
3409         * aclocal.m4 (AC_DECL_SYS_ERRLIST, AC_DECL__SYS_SIGLIST): New.
3410         * configure.in: Call AC_DECL_SYS_ERRLIST, AC_DECL_SYS_SIGLIST,
3411         and AC_DECL__SYS_SIGLIST.
3412         * acconfig.h (SYS_ERRLIST_DECLARED): New.
3413         * strace.c (strerror): Use SYS_ERRLIST_DECLARED.
3414         (strsignal): Use SYS_SIGLIST_DECLARED.
3415
3416         net.c (sys_socket): Omit inadvertent surplus comma when
3417         protocol family isn't PF_INET.
3418
3419         util.c (dumpstr): Fix incorrect printing of one too many
3420         characters when the length is not an even multiple of 16 bytes.
3421         Reported by Juergen Weigert
3422         <jnweiger@immd4.informatik.uni-erlangen.de>.
3423
3424 Thu May  4 23:37:47 1995  Rick Sladkey  <jrs@world.std.com>
3425
3426         * ioctl.c (compare): Change prototype to match POSIX qsort.
3427         * signal.c (sigishandled) [SVR4]: Omit everything after return.
3428         * strace.c (trace) [SVR4]: Break out of for loop instead of
3429         returning when finished so final return statement is executed.
3430         * syscall.c (internal_syscall): Add more SYS_wait* variations.
3431         (syscall) [LINUX]: Correct typo which commented out the M68K
3432         argument to ifdef.
3433         * util.c (printstr): Cast unsigned char pointer argument
3434         to char pointer in umovestr call.
3435         (dumpstr): Likewise for umoven.
3436
3437 Wed May  3 01:10:56 1995  Rick Sladkey  <jrs@world.std.com>
3438
3439         * version.c: Version 3.0.4 is released.
3440
3441         * signal.c (sys_sigblock): Move after the definition of
3442         sys_sigsetmask that it calls to avoid an implicit declaration.
3443         * stream.c (transport_user_options, transport_server_options):
3444         Only needed if TI_BIND is defined.
3445         * configure.in: Add -Wno-implicit to WARNFLAGS on SunOS 4.x.
3446
3447         * process.c (internal_fork) [SVR4]: Fix a typo that omitted
3448         the tcp arguement from the call to exiting.  Add getrval2
3449         check so no fork processing is done in the child.
3450         (printwaitn): Initialize exited so that its value is defined
3451         for all flows of execution.
3452
3453 Tue May  2 22:39:42 1995  Rick Sladkey  <jrs@world.std.com>
3454
3455         * linux/dummy.h: Add aliases for sysfs, personality, afs_syscall,
3456         setfsuid, setfsgid, and _llseek syscalls.
3457         * linux/syscall.h: Add prototypes for them.
3458         * linux/syscallent.h: Add them to the syscall entries table.
3459         * system.c (headers) [LINUX]: Include linux/unistd.h to get __NR_*
3460         defines and conditionally include linux/personality.h if
3461         __NR_personality is defined.
3462         (personality_options) [LINUX]: New table.
3463         (sys_personality) [LINUX]: New function.
3464
3465 Tue May  2 00:20:39 1995  Rick Sladkey  <jrs@world.std.com>
3466
3467         * strace.c (trace) [!SVR4]: Change forever loop to one predicated
3468         on the number of traced processes so that we can have untraced
3469         children (e.g. via popen).
3470
3471         * strace (main) [!SVR4]: Call fake_execve to get the actual
3472         exec and its arguments into the trace.
3473         (environ): Declare it.
3474         * process.c (fake_execve): New function.
3475         (headers): Include sys/syscall.h to get SYS_* defines.
3476
3477         * process.c (sys_execv, sys_execve): Surround argument annotations
3478         with C comment delimiters.
3479         (printargv, printargc): The arg vector is an array of char pointers
3480         not ints.
3481
3482         * strace.c (printleader): Also check for multiple -p arguments
3483         when deciding whether to print the pid field.
3484
3485         * strace.c (strerror) [!HAVE_STRERROR]: New function.
3486         * defs.h (strerror, strsignal): Add these prototypes if we provide
3487         the functions.
3488         * configure.in (AC_CHECK_FUNCS): Add strerror.
3489
3490         * strace.c (main, proc_poller): Add SIGPIPE to the list of caught
3491         and blocked signals.
3492
3493         * strace.c (main): Add username option.  Verify they are root before
3494         letting them use it.  Look up the ids in the password file.  Set
3495         them just before executing the program.
3496         From Reuben Sumner <rasumner@undergrad.math.uwaterloo.ca>.
3497
3498 Sat Apr 29 00:09:56 1995  Rick Sladkey  <jrs@world.std.com>
3499
3500         * version.c: Version 3.0.3 is released.
3501
3502         * system.c (mount_flags) [LINUX]: Omit duplicated MS_NOSUID entry.
3503         From Reuben Sumner <rasumner@undergrad.math.uwaterloo.ca>.
3504
3505         * strace.c (outfname): Initialize to NULL.
3506         (main): Defer output file processing until after arguments.
3507         Allow either a pipe or a bang for command arguments.
3508         Check if outfname is NULL instead of checking outf for stderr.
3509         Reinitialize each startup TCB's outf to fix -p/-o ordering bug.
3510         (droptcb): Reset close TCB's outf to NULL instead of stderr.
3511         (tprintf): Avoid calling vfprintf if outf is NULL.
3512
3513         * strace.c (main): Use popen if -o argument begins with a pipe.
3514         From Marty Leisner <leisner@sdsp.mc.xerox.com>.
3515
3516         * process.c (printstatus): Fix a typo where WIFSIGNALED was meant
3517         but WIFSTOPPED was used.
3518
3519         * Makefile.in: Add an EXTRA_DEFS variable and use it in the .c.o
3520         rule to prevent the comment from being untrue.
3521
3522 Fri Apr 28 22:01:56 1995  Rick Sladkey  <jrs@world.std.com>
3523
3524         * strace.c (sys_exit): Move follow fork code to internal_exit.
3525         (sys_fork): Move follow fork code to internal_fork.
3526         (sys_execv, sys_execve): Move follow fork code to internal_exec.
3527         (sys_waitpid, sys_wait4): Move follow fork code to internal_wait.
3528         (vforking): Remove this static variable and check scno in
3529         internal_fork instead.
3530         (internal_exit, internal_fork, internal_exec, internal_wait): New
3531         functions.
3532         * defs.h: Add prototypes for the new internal_* functions.
3533         * syscall.c (syscall): Move syscall entering trace qualifier check
3534         and reprint checking after context decoding and precede them with
3535         a call to internal_syscall.  Precede syscall exiting trace
3536         qualifier check with a call to internal_syscall.
3537         (internal_syscall): New function.
3538
3539         * defs.h (struct tcb): Make scno signed.
3540         * strace.c (syscall) Make u_error signed.
3541         [LINUX, I386]: Avoid unsigned cast in eax check.
3542         * syscall.c (sys_indir): Make i, scno, and nargs signed.
3543         * desc.c (sys_select): Make cumlen unsigned
3544
3545 Mon Apr 24 23:52:47 1995  Rick Sladkey  <jrs@world.std.com>
3546
3547         * net.c (socktypes): Add SOCK_PACKET.
3548
3549 Sun Apr  2 23:50:39 1995  Rick Sladkey  <jrs@world.std.com>
3550
3551         * Makefile (clean): Check explicitly for a Makefile in subdirs
3552         before running make in them.
3553
3554 Sun Mar 26 12:37:21 1995  Rick Sladkey  <jrs@world.std.com>
3555
3556         * strace.c [MIPS] (proc_open): Conditionalize run on MIPS.
3557         [MIPS] (detach): Initialize error for MIPS case.
3558         (trace): Initialize ioctl_result and ioctl_errno for overly helpful
3559         compilers.
3560         * syscall.c (decode_subcall): Move variable i into conditionals
3561         that use use it.
3562         * system.c (syssgi_options): Conditionalize SGI_RECVLMSG and
3563         SGI_SET_FPDEBUG that SGI decided to drop.  I don't have the stomach
3564         to change them all.
3565         * term.c (term_ioctl): Force [c_[iocl]flags members to long before
3566         printing since we don't know what the size of their type is.
3567         * util.c [SVR4, MIPS] (umoven): Prevent MIPS from using pread even
3568         if autoconf detects it since it seems to either not work or do
3569         something else entirely on Irix 5.3.
3570
3571 Sun Mar 26 00:01:11 1995  Rick Sladkey  <jrs@world.std.com>
3572
3573         * version.c: Version 3.0.2 is released.
3574         * linux/dummy.h: Make sys_fchdir like sys_close instead of printargs
3575         so that the file descriptor arg is decimal.
3576
3577 Sat Mar 25 22:50:13 1995  Rick Sladkey  <jrs@world.std.com>
3578
3579         * net.c [LINUX] (protocols): Explicitly define all IPPROTO_* entries
3580         because on Linux they are enumerators.
3581
3582         * system.c [LINUX] (mount_flags): Handle renaming of MS_SYNC to
3583         MS_SYNCHRONOUS.
3584
3585         * util.c (printxval): When there is no translation, print the actual
3586         number first and the the default value as a C comment.
3587
3588         * net.c (sys_send, sys_sendto, sys_sendmsg, sys_getsockopt,
3589         sys_setsockopt): Change first argument from unsigned to signed to
3590         cater to the frequent practice of calling system calls with a file
3591         descriptor of -1.
3592         * mem.c (sys_mmap): Likewise.
3593
3594 Sun Mar 19 13:53:52 1995  Rick Sladkey  <jrs@world.std.com>
3595
3596         * signal.c [LINUX] (signalent): Handle old and new values of SIGIO.
3597
3598 Sun Dec 11 22:51:51 1994  Rick Sladkey  <jrs@world.std.com>
3599
3600         * version.c: Version 3.0.1 is released.
3601         * Makefile.in, configure.in, aclocal.m4: Changes for autoconf 2.0.
3602         * config.guess, config.guess: Update from the FSF.
3603         * install-sh: New from the FSF.
3604
3605 Mon Dec  5 20:51:29 1994  Rick Sladkey  <jrs@world.std.com>
3606
3607         * Makefile.in: Add m68k arch.
3608         * acconfig.h (M68K): Add m68k define.
3609         * configure.in: Add detection of arch m68k.
3610         * process.c [M68K] (struct_user_offsets): Support m68k registers and
3611         offsets.
3612         * signal.c [M68K] (sigcontext_struct): Support m68k sigcontext
3613         structure.
3614         [M68K] (sys_sigreturn): Support m68k sigreturn handling.
3615         * syscall.c [M68K] (syscall): Support m68k syscall number register
3616         and errno in d0 instead of eax.
3617         * util.c [M68K] (getpc, printcall, setbpt, clearbpt): Support m68k
3618         program counter in PT_PC instead of EIP.
3619         [M68K] (LOOP): Support m68k loop instruction.
3620         From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
3621
3622         * mem.c [MAP_ANONYMOUS] (mmap_flags): Correct inadvertent reference
3623         to MAP_FIXED instead of MAP_ANONYMOUS.
3624         From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
3625
3626         * signal.c [LINUX] (signalent): Signal 30 is now SIGPWR.
3627         From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
3628
3629 Mon Dec  5 01:05:46 1994  Rick Sladkey  <jrs@world.std.com>
3630
3631         * defs.h (tprintf): Fix typo in non-gcc ansi prototype for tprintf.
3632         Reported by Thanh Ma <tma@encore.com>.
3633
3634         * strace.c (cleanup): Send SIGCONT before SIGTERM because Linux
3635         1.1.62 doesn't continue a traced child when the parent exits.
3636         Reported by Matt Day <mday@artisoft.com>.
3637
3638         * system.c [LINUX]: Include netinet/in.h before arpa/inet.h.
3639
3640         * util.c (printstr): Fix longstanding bug in notating string
3641         continuation.
3642
3643         * strace.c [SVR4] (proc_open): Specifically wait for the child the
3644         child to go into the execve syscall to avoid spurious traces.
3645         [LINUX] (detach): Conditionalize the status variable.
3646
3647 Sun Dec  4 23:21:42 1994  Rick Sladkey  <jrs@world.std.com>
3648
3649         * Makefile.in: Add mips arch.
3650         * acconfig.h (MIPS): Add mips define.
3651         * configure.in: Add detection of opsys irix5 and arch mips.  Check
3652         for prctl function.
3653         Check for sys/sysconfig.h header.
3654         * defs.h (MAX_ARGS): Bump maximum syscall arguments from 8 to 32.
3655         * file.c [SVR4]: Include sys/cred.h.
3656         (access_flags): Update access flags for SGI.
3657         (sprinttime): Change type of sprinttime argument from unsigned
3658         long to time_t.
3659         * process.c [HAVE_PRCTL]: Include sys/prctl.h.
3660         [HAVE_PRCTL] (prctl_options, sys_prctl): New for SGI.
3661         (printsiginfo): Conditionally compile SI_TIMER and SI_MESGQ.
3662         Cast si_band member to long before printing.
3663         * signal.c (sigact_flags): Add _SA_BSDCALL for SGI.
3664         (sigprocmaskcmds): Add SIG_SETMASK32 for SGI.
3665         * strace.c [SVR4] [MIPS]:
3666         (foobar): New dummy signal handler.
3667         (main): Install a dummy signal handler in the child before pausing
3668         to work around an SGI bug in PRSABORT.
3669         (proc_open): Send a interrupt to the child instead of aborting the
3670         syscall which doesn't work on Irix5.2.
3671         * svr4/dummy.h: Add new unfinished SGI syscalls
3672         (e.g. sys_sysmp, sys_sginap, etc.).  Handle some SGI syscalls like
3673         existing calls (e.g. sys_ksigaction like sys_sigaction).
3674         Printargs does the print thing for sys_sethostid.
3675         * svr4/syscall.h: Declare all new SGI syscalls.
3676         (SGI_KLUDGE): Define syscall table starting index to be 1 for SGI
3677         and add it to all subcall entry points.
3678         (SYS_pgrpsys_subcall, SYS_sigcall_subcall, SYS_context): Don't
3679         decode as subcalls on MIPS. Instead, use the normal syscalls.
3680         * svr4/syscallent.h [MIPS]: Lead syscall table with a dummy entry
3681         since SGI syscall numbers are off by one.
3682         [MIPS] (sys_pgrpsys): Rename to sys_setpgrp on SGI.
3683         [MIPS] (sys_xenix): Rename to sys_syssgi on SGI.
3684         [MIPS] (sys_sysmachine): Rename to sys_sysmips on SGI.
3685         [MIPS]: Conditionalize SVR4 extension into SGI and Solaris classes.
3686         * syscall.c (dumpio): Validate descriptor against MAX_QUALS.
3687         [HAVE_PR_SYSCALL] (syscall): Conditionalize SYS_vfork.
3688         [MIPS] (syscall): Add SGI section for decoding u_error and u_rval.
3689         Add workaround for broken SGI pr_sysarg on syscall entry.
3690         [SVR4] (syscall): Conditionalize subcall decoding for
3691         SYS_ptrpsys_subcall, SYS_sigcall_subcall and SYS_context_subcall.
3692         [SVR4] [MIPS] (getrval2): Handle SGI.
3693         * syscallent.sh: Dork the sed line to be choosier about SYS_ lines.
3694         * system.c [HAVE_SYSCONFIG_H]: Include sys/sysconfig.h.
3695         [MIPS] (syssgi_options, sys_syssgi): New for SGI.