Commit Graph

1510 Commits

Author SHA1 Message Date
e9a06b7ad4 sparc: fix compilation warning
* file.c [!HAVE_LONG_LONG_OFF_T] (realprintstat): Cast st_size
to unsigned long.
2011-02-23 16:16:50 +00:00
0afbf85dec Update the list of files that must be distributed
* Makefile.am (EXTRA_DIST): Add debian/source/format, debian/watch,
linux/ia64/signalent.h, linux/powerpc/ioctlent1.h,
linux/powerpc/syscallent1.h, linux/powerpc/errnoent1.h,
linux/powerpc/signalent1.h.
2011-02-23 12:43:46 +00:00
d9a4b0ab00 Fix compilation warning reported by gcc -Wunused-but-set-variable
* process.c (printwaitn) [!SUNOS4]: Do not define "exited" variable.
2011-02-23 00:27:12 +00:00
Mike Frysinger
f72418c876 ioctlsort: zero pad ioctl codes to 4 places
Zero padding the ioctl number will allow simple sorting via shell scripts.

* linux/ioctlsort.c (main): Output ioctl codes zero padded.
* linux/ioctlent.h: Regenerated.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-22 10:23:11 +00:00
Mike Frysinger
22485b702b Update mount flags to latest linux
* system.c (MS_RELATIME, MS_KERNMOUNT, MS_I_VERSION,
MS_STRICTATIME, MS_BORN): Define.
(mount_flags): Add MS_RELATIME, MS_KERNMOUNT, MS_I_VERSION,
MS_STRICTATIME, MS_BORN.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-22 10:22:13 +00:00
c36c3033fb Sync debian/changelog and strace.spec with packages
* debian/changelog: Sync with 4.5.20-2.
* strace.spec: Likewise.
2011-02-22 10:32:50 +00:00
7bab9fcc44 Add TRACE_DESC|TRACE_FILE flags to fanotify_* sysentries
* linux/*/syscallent.h: Add TD flag to fanotify_init.  Add TD|TF flags
to fanotify_mark.
2011-02-20 20:24:52 +00:00
2bc744d7c7 Fix flags of fallocate sysentries
* linux/*/syscallent.h: Fix sys_fallocate flags.
2011-02-20 20:17:00 +00:00
b9839ef129 Add TRACE_DESC flag to epoll_create* sysentries
* linux/*/syscallent.h: Add TD flag to sys_epoll_create and
sys_epoll_create1.
2011-02-20 19:58:09 +00:00
1e43961de5 Add TRACE_DESC flag to fgetxattr, flistxattr, and fremovexattr sysentries
* linux/*/syscallent.h: Add TD flag to sys_fgetxattr, sys_flistxattr,
and fremovexattr.
2011-02-20 19:50:28 +00:00
612e0920c5 Add TRACE_FILE flag to swapoff sysentries
* linux/*/syscallent.h: Add TF flag to sys_swapoff.
2011-02-20 19:14:10 +00:00
fdbe3c513a Add TRACE_DESC flag to fadvise64* sysentries
* linux/*/syscallent.h: Add TD flag to sys_fadvise64 and
sys_fadvise64_64.
2011-02-20 15:23:22 +00:00
bde8033605 Add TRACE_DESC flag to mmap, mmap2, and old_mmap sysentries
* linux/*/syscallent.h: Add TD flag to sys_mmap and sys_old_mmap.
2011-02-20 15:10:32 +00:00
b2eaa8d7ed Do not initialize native_scno on platforms with only one personality
* linux/bfin/syscallent.h: Remove redundant native_scno initialization.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
2011-02-20 13:25:04 +00:00
e51a87c0dc Add LOOP_* ioctls defined in linux/loop.h
* linux/ioctlent.sh: Add LOOP_* ioctls (0x4C..) defined in linux/loop.h
header file.
* linux/ioctlent.h: Regenerated.
Reported by Mike Frysinger.
2011-02-20 12:25:12 +00:00
2fabd0eaf0 Fix PTRACE_GETEVENTMSG usage and enhance test_ptrace_setoptions()
* strace.c (handle_ptrace_event): Fix PTRACE_GETEVENTMSG usage.
(test_ptrace_setoptions): Test that PTRACE_GETEVENTMSG works properly.
2011-02-19 21:33:50 +00:00
Mike Frysinger
330a895bbd linux/sparc: move to common syscall.h
Rather than constantly deal with the sparc/syscall.h going stale, merge
the few sparc-specific pieces into the linux/syscall.h header.

* linux/syscall.h: Add sparc-specific pieces from sparc/syscall.h.
* Makefile.am (EXTRA_DIST): Remove linux/sparc/syscall.h and
linux/sparc64/syscall.h.
* linux/sparc/syscall.h, linux/sparc64/syscall.h: Deleted.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-19 21:40:20 +00:00
Mike Frysinger
e44a4a262a sparc: add new funcs to syscall.h
Sync missing defs from the common syscall.h here.

* linux/sparc/syscall.h: Add sys_setfsuid, sys_pread64, and
sys_pwrite64 prototypes.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-19 20:42:25 +00:00
Mike Frysinger
71a78bc739 sparc: punt unused syscall.h.2
I can't find any mention of this header actually being used.
Seems to be a really old copy of the common syscall.h.

* Makefile.am (EXTRA_DIST): Remove linux/sparc/syscall.h.2.
* linux/sparc/syscall.h.2: Deleted.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-19 20:31:49 +00:00
9fdbee6dea Fix raw exit_group(2) decoding
* syscall.c (trace_syscall_entering): Check for sys_exit instead of
SYS_exit to handle exit_group(2) as well as _exit(2).
2011-02-19 00:02:27 +00:00
bd13645efb Optimize known_scno()
* syscall.c (known_scno): Do not check for native_scno field on
platforms that support only one personality.
2011-02-18 23:19:47 +00:00
fde119c792 * process.c (internal_exit) [IA64]: Remove redundant check. 2011-02-18 23:16:20 +00:00
65c1a81f6a Fix biarch support in IO dumping
* syscall.c (dumpio): Switch on tcp->sys_func instead of tcp->scno
for more reliable results.
2011-02-09 00:39:47 +00:00
10a16a76fc Simplify tprintf() declaration
* defs.h (tprintf): Simplify declaration.
2011-02-09 00:03:11 +00:00
7655fa0907 * defs.h (SYSCALL_NEVER_FAILS): Fix typo. 2011-02-05 01:07:08 +00:00
50a218d4ac Fix decoding of get[ug]id, gete[ug]id and setfs[ug]id return values
* defs.h (SYSCALL_NEVER_FAILS): New syscall flag.
* linux/dummy.h: Change redirection for sys_get[ug]id, sys_gete[ug]id
and setfs[ug]id.
* linux/*/syscallent.h: Set SYSCALL_NEVER_FAILS flag for get[ug]id,
gete[ug]id and setfs[ug]id syscalls.
* process.c [LINUX] (sys_getuid, sys_setfsuid): New functions.
* syscall.c (NF): New shorthand macro for use in syscallent.h files.
(get_error): Check SYSCALL_NEVER_FAILS flag.
Reported by Марк Коренберг <socketpair@gmail.com>.
2011-01-19 00:52:15 +00:00
62d0428cf5 * linux/*/syscallent.h: Fix typo in sys_newfstatat syscall flags. 2011-01-19 00:21:07 +00:00
Mike Frysinger
ae6a5f7c4f Blackfin: update ioctl list
* linux/bfin/ioctlent.h: Sync with latest kernel sources.
2011-01-18 00:14:51 +00:00
4dd54320b9 Fix stat64 decoding on mips
* linux/mips/syscallent.h: Use sys_stat64() to decode stat64 syscall.
This fixes Debian bug #599028.
2011-01-17 23:24:54 +00:00
e9e3d70fa1 Update linux/*/syscallent.h files to match Linux kernel v2.6.37
* linux/alpha/syscallent.h: Add hooks for fanotify_init, fanotify_mark,
and prlimit64.
* linux/i386/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/arm/syscallent.h: Add hooks for accept4, fanotify_init,
fanotify_mark, and prlimit64.
* linux/hppa/syscallent.h: Add hook for prlimit64.
2011-01-17 22:39:33 +00:00
be284cae11 block.c: cleanup
* block.c: Include <inttypes.h>.
(print_blkpg_req): Always decode struct blkpg_ioctl_arg.
Robustify decoding of strings.
(block_ioctl): Do not decode return values passed by pointers on exit
from failed syscalls.
Use format macros from inttypes.h to print values of type uint64_t.
2011-01-16 23:07:51 +00:00
4ef6db489a Add block ioctl support
* block.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h [LINUX] (block_ioctl): New function.
* ioctl.c (ioctl_decode) [LINUX]: Use it to decode HDIO_* and BLK*
ioctls.
Patch by Jeff Mahoney <jeffm@suse.com>
2011-01-15 20:15:31 +00:00
Holger Hans Peter Freyther
7fea79b760 Parse SOL_SCTP socket options
* configure.ac (AC_CHECK_HEADERS): Add netinet/sctp.h.
* net.c [HAVE_NETINET_SCTP_H]: Include <netinet/sctp.h>.
[SOL_SCTP] (socksctpoptions): New xlat structure.
(sys_getsockopt, printsockopt): Parse SOL_SCTP options.
2011-01-14 17:47:53 +00:00
Holger Hans Peter Freyther
ce9e0f4c7f * net.c (socketlayers): Add more SOL_* constants from linux/socket.h 2011-01-14 17:47:53 +00:00
1c3031b1f0 strace.1: fix misleading italics
* strace.1: Use bold instead of italics for "-e trace=" keywords.
This fixes Debian bug #589323.
2011-01-14 17:17:20 +00:00
4eb1b51022 Update linux/ioctlent.h
* linux/ioctlent.h: Regenerate using linux v2.6.37 headers.
2011-01-14 16:09:40 +00:00
ebc2f28523 Add HDIO_* ioctls defined in linux/hdreg.h
* linux/ioctlent.sh: Add HDIO_* ioctls (0x03..) defined in
linux/hdreg.h header file.
This fixes Debian bug #450953.
2011-01-14 15:30:10 +00:00
21ccf5ed07 Test PTRACE_O_TRACECLONE and PTRACE_O_TRACEVFORK along with PTRACE_O_TRACEFORK
* strace.c (test_ptrace_setoptions): Add PTRACE_O_TRACECLONE and
PTRACE_O_TRACEVFORK to PTRACE_SETOPTIONS call, to test exactly
the same set of options that is going to be used later in trace().
2011-01-13 14:49:39 +00:00
d48c6b91e2 * net.c (protocols): Add more IPPROTO_* constants defined in netinet/in.h 2011-01-10 01:14:38 +00:00
Holger Hans Peter Freyther
efa8bda2e7 * net.c (protocols): Add IPPROTO_GRE, IPPROTO_SCTP and IPPROTO_UDPLITE. 2011-01-10 00:28:55 +00:00
Carmelo AMOROSO
d64184f9aa sh: Add entry for not-multiplexed accept4
* linux/sh/syscallent.h: Add specific entry for not-multiplexed accept4
available in kernel mainline since v2.6.37-rc6, see
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21b6e4c7106b2d68a6710506d8706608272fd78b

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-01-10 00:10:51 +00:00
Carmelo AMOROSO
9b977d1067 sh: Add entries for not-multiplexed socket calls
* linux/sh/syscallent.h: Add specific entries for not-multiplexed
socket calls (available in kernel mainline since v2.6.37-rc1)

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-12-14 00:14:33 +00:00
Carmelo AMOROSO
b9c525790c sh: Fix compilation warning in do_pipe due to missing prototype
* defs.h [SH]: Make getrval2 prototype visible to do_pipe
and fix the following compiler warning:
.../net.c: In function 'do_pipe':
.../net.c:1632: warning: implicit declaration of function 'getrval2'
.../net.c:1632: warning: format '%lu' expects type 'long unsigned int',
but argument 3 has type 'int'

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-12-14 00:14:33 +00:00
696381ec63 Fix build on uClibc
* defs.h [LINUX]: Define PTRACE_GETEVENTMSG macro.
Patch by Douglas Mencken <dougmencken@gmail.com>.
2010-12-14 00:02:35 +00:00
8044bc1463 Fix strace -f -o '|command' hangup
* strace.c (main): Call test_ptrace_setoptions() before parsing
-o option, otherwise a forked command will cause a hangup inside
test_ptrace_setoptions().
2010-12-07 12:50:49 +00:00
bdafa1a905 Output diagnostics to stderr
* syscall.c (get_scno): Output information about changes in
personality mode to stderr.  Reported by Pádraig Brady.
2010-12-03 17:28:11 +00:00
e3d4b68a7b Recognize more clone flags
* process.c (CLONE_*): Define more flags from linux v2.6.25.
(clone_flags): Add entries for them.
Proposed by <zhangyanfei@cn.fujitsu.com>.
2010-12-03 17:27:59 +00:00
0ddd8addef Decode struct ucred for getsockopt SO_PEERCRED
* net.c (sys_getsockopt): Decode SO_PEERCRED.
Proposed by Arkadiusz Miśkiewicz <arekm@maven.pl>.
2010-12-03 17:27:54 +00:00
Carmelo AMOROSO
f8e5650474 sh: Add support for tracing sys_cacheflush system call
* linux/sh/syscallent.h: Update sys_cacheflush entry.
* linux/syscall.h [SH] (sys_cacheflush): New function declaration.
* system.c [SH] (cacheflush_flags): New xlat structure.
[SH] (sys_cacheflush): New function.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Reviewed-by: Angelo Castello <angelo.castello@st.com>
2010-12-03 17:27:29 +00:00
b1467440f7 Cleanup test_ptrace_setoptions()
* strace.c (test_ptrace_setoptions): Cleanup.
(main): Fix test_ptrace_setoptions() error diagnostics message.
Print ptrace_setoptions value in debug mode.
2010-11-30 17:19:09 +00:00