Commit Graph

451 Commits

Author SHA1 Message Date
Roland McGrath
4724f3b0f9 . 2007-01-11 22:26:04 +00:00
Roland McGrath
a9e3224b11 . 2007-01-11 22:22:54 +00:00
ab9008bc08 2006-12-27 Dmitry V. Levin <ldv@altlinux.org>
Add const qualifier to xlookup() return value

	* defs.h (xlookup): Add const qualifier to return value.
	* desc.c (sprintflags): Likewise.
	* process.c (printpriv): Update xlookup() use.
	* signal.c (sprintsigmask): Add const qualifier to first argument and return value.
	* util.c (xlookup): Add const qualifier to return value.
	(printxval): Update xlookup() use.
2007-01-11 22:05:04 +00:00
7d61ff1dbf 2006-12-21 Dmitry V. Levin <ldv@altlinux.org>
Move counts code to separate file.
	* count.c: New file.
	* Makefile.am (strace_SOURCES): Add count.c.
	* syscall.c (call_counts, countv, counts, shortest, time_cmp,
	syscall_cmp, count_cmp, sortfun, overhead, set_sortby,
	set_overhead, call_summary_pers, call_summary): Move to count.c
	* count.c (count_syscall): New function.
	* defs.h (count_syscall): Declare it.
	* syscall.c (trace_syscall): Use it.
2006-12-21 21:15:04 +00:00
16f27946d5 RH#165469 is also Debian#350641.
RH#218435 is also Debian#353935.
2006-12-21 21:00:34 +00:00
b2f869997a 2006-12-20 Dmitry V. Levin <ldv@altlinux.org>
* syscall.c (internal_syscall): Change conditions for internal_exit,
	internal_fork, internal_clone, internal_exec and internal_wait
	calls from switching on known scno values to switching on known
	sysent[tcp->scno].sys_func values.
	Fixes RH#179740.
2006-12-21 11:44:28 +00:00
3abe8b20f6 2006-12-20 Dmitry V. Levin <ldv@altlinux.org>
Show system call summary for each personality.
	* syscall.c (countv): New call_counts pointers array.
	(counts): Convert to macro wrapper around countv.
	(call_summary_pers): New function.
	(call_summary): Use it for each personality.
	Fixes RH#192193.
2006-12-20 22:37:21 +00:00
10de62bb05 2006-12-12 Dmitry V. Levin <ldv@altlinux.org>
Fix -ff -o behaviour.  Fix piping trace output.
	* defs.h (newoutf): Remove.
	(alloctcb): Rename to alloc_tcb.  Add alloctcb() macro wrapper
	around alloc_tcb().
	* process.c [!USE_PROCFS] (internal_clone, internal_fork):
	Remove newoutf() call.
	* strace.c (set_cloexec_flag, strace_fopen, strace_popen,
	swap_uid): New functions.
	(popen_pid): New variable.
	(newoutf): Make static, use strace_fopen().
	(main): Use strace_fopen() and strace_popen(), remove uids
	swapping.  Do not open outfname when followfork > 1.
	Reinitialize tcp->outf properly.
	(alloctcb): Rename to alloc_tcb.  Use newoutf().
	(trace): Check popen_pid.  Remove newoutf() call.
	[USE_PROCFS] (proc_open, proc_poll_open): Use set_cloexec_flag().
	Fixes RH#204950, RH#218435.
2006-12-13 21:45:31 +00:00
d3cb392f85 2006-12-10 Dmitry V. Levin <ldv@altlinux.org>
Add biarch support for "struct sigevent".
	* time.c [LINUX && SUPPORTED_PERSONALITIES > 1] (printsigevent32):
	New function.
	[LINUX] (printsigevent): [SUPPORTED_PERSONALITIES > 1]
	Handle 32-bit personality.
2006-12-13 17:45:02 +00:00
165b15dbe8 2006-12-10 Dmitry V. Levin <ldv@altlinux.org>
Add biarch support for "struct timex".
	* time.c [LINUX && SUPPORTED_PERSONALITIES > 1] (tprint_timex32):
	New function.
	[LINUX] (tprint_timex): New function.
	[LINUX] (sys_adjtimex): Use it.
2006-12-13 17:43:45 +00:00
1a684d6ebe 2006-12-10 Dmitry V. Levin <ldv@altlinux.org>
Enhance adjtimex parser.
	* time.c [LINUX] (adjtimex_modes, adjtimex_status,
	adjtimex_state): New xlat structures.
	[LINUX] (sys_adjtimex): Print the whole struct timex.
	Decode modes, status and return code.
2006-12-13 17:42:32 +00:00
1cad25dd44 2006-12-10 Dmitry V. Levin <ldv@altlinux.org>
Add biarch support for "struct itimerval".
	* time.c (printitv): Rename to printitv_bitness().
	Add printitv() macro wrapper around printitv_bitness().
	(printitv_bitness): Handle 32-bit personality.
	[ALPHA] (sys_osf_getitimer, sys_osf_setitimer):
	Use printitv_bitness().
	(tprint_timeval, tprint_timeval32): New functions.
	(printtv_bitness, printitv_bitness, sys_adjtimex): Use them.
	(printitv32): Remove.
2006-12-13 17:14:36 +00:00
4ebb4e3d31 2006-12-10 Dmitry V. Levin <ldv@altlinux.org>
Add biarch support for "struct iovec".
	* defs.h (personality_wordsize): Add.
	* io.c [HAVE_SYS_UIO_H] (tprint_iov): [LINUX &&
	SUPPORTED_PERSONALITIES > 1] Handle 32-bit personality.
	* util.c [HAVE_SYS_UIO_H] (dumpiov): [LINUX &&
	SUPPORTED_PERSONALITIES > 1] Likewise.
	Patch from Jakub Jelinek.
	Fixes RH#218433.
2006-12-13 17:08:08 +00:00
ac518d1077 2006-12-10 Dmitry V. Levin <ldv@altlinux.org>
* time.c (sys_timer_create): Check umove() return code.
2006-12-13 17:03:02 +00:00
b9fe011cdf 2006-12-10 Dmitry V. Levin <ldv@altlinux.org>
Make several global variables static.
	#ifdef definitions of rarely unused functions.
	* defs.h (rflag, tflag, outfname): Remove.
	* strace.c (iflag, interactive, pflag_seen, rflag, tflag,
	outfname, username): Make static.
	* desc.c (sys_getdtablesize): Define only for
	ALPHA || FREEBSD || SUNOS4.
	* file.c (sys_fchroot): Define only for SUNOS4 || SVR4.
	(sys_mkfifo): Define only for FREEBSD.
	* mem.c (sys_sbrk): Define only for FREEBSD || SUNOS4.
	(sys_getpagesize): Define only for
	ALPHA || FREEBSD || IA64 || SUNOS4 || SVR4.
	* net.c (sys_so_socket): Define only for SVR4.
	* process.c (sys_gethostid): Define only for
	FREEBSD || SUNOS4 || SVR4.
	(sys_gethostname): Define only for
	ALPHA || FREEBSD || SUNOS4 || SVR4.
	(sys_setpgrp): Define only for ALPHA || SUNOS4 || SVR4.
	(sys_execv): Define only for SPARC || SPARC64 || SUNOS4.
	* signal.c (sys_sigblock): Define only for FREEBSD || SUNOS4.
	(sys_sighold, sys_sigwait): Define only for SVR4.
	(sys_killpg): Define only for FREEBSD || SUNOS4.
	* stream.c (sys_getmsg): Define only for
	SPARC || SPARC64 || SUNOS4 || SVR4.
	* syscall.c (sys_indir): Define only for SUNOS4.
2006-12-13 16:59:44 +00:00
35a55785ea 2006-11-27 Dmitry V. Levin <ldv@altlinux.org>
* system.c [LINUX]: Define CTL_PROC, since Linux 2.6.18+ headers
	removed CTL_PROC enum.	Patch from Jakub Jelinek.
	[LINUX] (sysctl_root): Add CTL_BUS, CTL_ABI and CTL_CPU.
2006-12-04 13:48:10 +00:00
a694666207 2006-11-20 Jakub Jelinek <jakub@redhat.com>
* linux/ia64/syscallent.h: Add #if check to make sure that
	SYS_socket_subcall adjustment isn't forgotten again.
2006-12-04 13:46:28 +00:00
ef5c3d657d 2006-10-16 Dmitry V. Levin <ldv@altlinux.org>
Implement comprehensive quotactl(2) parser for Linux.
	* Makefile.am (strace_SOURCES): Add quota.c.
	* quota.c: New file.
	* resource.c: Remove old quotactl(2) parser.
	Fixes RH#118696.
2006-10-16 00:26:47 +00:00
1f336e59aa 2006-10-14 Dmitry V. Levin <ldv@altlinux.org>
* configure.ac(AC_CHECK_HEADERS): Add inttypes.h.
	* file.c [_LFS64_LARGEFILE && (LINUX || SVR4)]:
	Include <inttypes.h>.
	(sys_getdents64): Use PRIu64/PRId64 to avoid gcc warnings on
	64-bit platforms.
2006-10-14 20:20:46 +00:00
cbd470fc9d 2006-10-14 Dmitry V. Levin <ldv@altlinux.org>
* strace.c (main): Check getcwd() return code.
2006-10-14 14:23:57 +00:00
95ebf5abfc 2006-10-13 Ulrich Drepper <drepper@redhat.com>
Bernhard Kaindl <bk@suse.de>
	    Dmitry V. Levin  <ldv@altlinux.org>
	    Michael Holzheu <holzheu@de.ibm.com>

	Add hooks for new syscalls.  Add decoders for *at, inotify*,
	pselect6, ppoll and unshare syscalls.

	* defs.h: Declare print_sigset.
	* desc.c (sys_pselect6): New function.
	* file.c (decode_open, decode_access, decode_mkdir,
	decode_readlink, decode_chmod, decode_utimes, decode_mknod):
	New functions.
	(sys_open, sys_access, sys_mkdir, sys_readlink, sys_chmod,
	sys_utimes, sys_mknod): Use them.
	[LINUX] (fstatatflags, unlinkatflags, inotify_modes): New
	variables.
	[LINUX] (print_dirfd, sys_openat, sys_faccessat,
	sys_newfstatat, sys_mkdirat, sys_linkat, sys_unlinkat,
	sys_symlinkat, sys_readlinkat, sys_renameat, sys_fchownat,
	sys_fchmodat, sys_futimesat, sys_mknodat, sys_inotify_add_watch,
	sys_inotify_rm_watch): New functions.
	* process.c [LINUX] (sys_unshare): New function.
	* signal.c (print_sigset): New function.
	(sys_sigprocmask): Use it.
	* stream.c (decode_poll): New function.
	(sys_poll): Use it.
	[LINUX] (sys_ppoll): New function.
	* linux/syscall.h: Delcare new syscall handlers.
	* linux/syscallent.h: Hook up new syscalls.
	* linux/alpha/syscallent.h: Likewise.
	* linux/hppa/syscallent.h: Likewise.
	* linux/ia64/syscallent.h: Likewise.
	* linux/mips/syscallent.h: Likewise.
	* linux/powerpc/syscallent.h: Likewise.
	* linux/s390/syscallent.h: Likewise.
	* linux/s390x/syscallent.h: Likewise.
	* linux/sparc/syscallent.h: Likewise.
	* linux/sparc64/syscallent.h: Likewise.
	* linux/x86_64/syscallent.h: Likewise.
	Fixes RH#178633.
2006-10-13 20:25:12 +00:00
9633942c07 2006-10-06 Dmitry V. Levin <ldv@altlinux.org>
* strace.c [!USE_PROCFS] (trace): Presence of PT_GETSIGINFO
	macro does not mean that PT_CR_IPSR and PT_CR_IIP macros are
	also defined, so check them along with PT_GETSIGINFO.
	Fixes RH#209856.
2006-10-11 23:11:43 +00:00
504eb0b9c6 2006-09-01 Dmitry V. Levin <ldv@altlinux.org>
* file.c (print_xattr_val): Fix memory corruption bug reported
	by James Antill.
	Fixes RH#200621.
2006-10-11 22:58:31 +00:00
aca9a74264 2006-04-21 Dmitry V. Levin <ldv@altlinux.org>
* defs.h [LINUX && X86_64 && !__NR_exit_group]: Define
	__NR_exit_group.
2006-10-11 22:56:49 +00:00
76860f60d7 2006-03-29 Dmitry V. Levin <ldv@altlinux.org>
Fix race conditions in tcb allocation.
	* process.c (fork_tcb): Return error code as documented.  Do not
	print "tcb table full" error message.
	[USE_PROCFS] (internal_fork): Do not print "tcb table full"
	error message.
	[SYS_clone || SYS_clone2] (internal_clone, internal_fork): Call
	fork_tcb() before alloctcb().  Do not print "tcb table full"
	error message.
	* strace.c (main): Do not print "tcb table full" error message.
	(expand_tcbtab): Print error message in case of memory allocation
	failure.
	(alloctcb): Print error message when tcb table is full.
	(trace): Expand tcb table if necessary prior to allocating
	entry there.  Do not print "tcb table full" error message.
	Fixes RH#180293.
2006-10-11 22:55:25 +00:00
Roland McGrath
fd52f8d9af fix bz tag 2006-10-10 00:57:30 +00:00
Roland McGrath
ff87ae2ef1 . 2006-08-22 07:37:00 +00:00
Roland McGrath
7103001b35 . 2006-08-22 06:33:45 +00:00
Roland McGrath
6ef291b9eb . 2006-08-22 06:06:24 +00:00
Roland McGrath
de1701007f . 2006-04-25 07:48:06 +00:00
Roland McGrath
5b97ae3122 . 2006-04-25 07:39:48 +00:00
Roland McGrath
9216ba7a74 . 2006-04-25 07:34:44 +00:00
Roland McGrath
9d19e163f0 . 2006-04-25 07:33:26 +00:00
Roland McGrath
2377706eb5 . 2006-04-25 07:22:04 +00:00
Roland McGrath
074a8e1619 . 2006-01-17 06:23:01 +00:00
Roland McGrath
ef6b8bf61b . 2006-01-14 00:20:26 +00:00
Roland McGrath
402c9d1ed5 . 2006-01-12 22:35:02 +00:00
Roland McGrath
e8e43207bd . 2006-01-12 11:07:40 +00:00
Roland McGrath
9ee476f7d4 . 2006-01-12 11:03:48 +00:00
Roland McGrath
97a932bc72 . 2006-01-12 10:19:01 +00:00
Roland McGrath
4935530a8a . 2006-01-12 09:51:03 +00:00
Roland McGrath
7c061b2135 . 2006-01-12 09:45:59 +00:00
Roland McGrath
52f70f7451 . 2005-12-02 04:34:25 +00:00
Roland McGrath
362f1c3e3f . 2005-12-02 04:23:50 +00:00
Roland McGrath
8e5ca84830 . 2005-12-02 04:08:39 +00:00
Roland McGrath
bc38ae72f2 . 2005-12-02 03:59:47 +00:00
Roland McGrath
89e94ff094 . 2005-12-02 03:57:20 +00:00
Roland McGrath
61b675e197 . 2005-12-02 03:44:20 +00:00
Roland McGrath
68565786b5 . 2005-10-21 22:06:58 +00:00
Roland McGrath
03c3d75de1 . 2005-08-03 12:18:37 +00:00