]> granicus.if.org Git - strace/log
strace
15 years agoCheck umove() return code
Dmitry V. Levin [Tue, 3 Nov 2009 14:38:44 +0000 (14:38 +0000)]
Check umove() return code

* bjm.c (sys_query_module): Print input parameters when entering
syscall.  Fix handling of syscall error.  Handle unlikely umove()
failures.
* ipc.c (tprint_msgrcv): New function.  Move part of msgrcv parser code
here, add check umove() return code.
(sys_msgsnd): Print msqid parameter as int instead of long.
(sys_msgrcv): Likewise.  Use tprint_msgrcv().
* process.c (print_affinitylist): Check umove() return code.
* sock.c (sock_ioctl): Handle unlikely umove() failure in the
SIOCGIFCONF parser.

15 years agoFix check for linux/netlink.h on Linux 2.6.32-rc5+
Dmitry V. Levin [Tue, 3 Nov 2009 16:49:49 +0000 (16:49 +0000)]
Fix check for linux/netlink.h on Linux 2.6.32-rc5+

* configure.ac (AC_CHECK_HEADERS): In check for linux/netlink.h, include
sys/socket.h instead of linux/socket.h beforehand.

15 years agoDecode fallocate on PowerPC
Andreas Schwab [Wed, 4 Nov 2009 11:43:20 +0000 (12:43 +0100)]
Decode fallocate on PowerPC

* linux/powerpc/syscallent.h: Decode fallocate.

15 years agoFactor out printing of 64bit syscall argument
Andreas Schwab [Wed, 4 Nov 2009 16:08:34 +0000 (17:08 +0100)]
Factor out printing of 64bit syscall argument

* defs.h (ALIGN64): Remove.
(printllval): Declare.
* util.c (printllval): Define.
* file.c (sys_readahead): Use printllval.
(sys_lseek64): Likewise.
(sys_truncate64): Likewise.
(sys_ftruncate64): Likewise.
(sys_fadvise64): Likewise.
(sys_fadvise64_64): Likewise.
(sys_fallocate): Likewise.
* io.c (sys_pread): Likewise.
(sys_pwrite): Likewise.
(sys_pread64): Likewise.
(sys_pwrite64): Likewise.
* mem.c (sys_mmap64): Likewise.

15 years agoCorrect decoding of readahead and fadvice64(_64) on PowerPC
Andreas Schwab [Tue, 3 Nov 2009 14:21:14 +0000 (15:21 +0100)]
Correct decoding of readahead and fadvice64(_64) on PowerPC

* file.c (sys_readahead): Align 64bit argument.  Handle PowerPC64
like other 64bit architectures.
(sys_fadvise64): Likewise.
(sys_fadvise64_64): Handle PowerPC like ARM.
* linux/powerpc/syscallent.h (sys_readahead): Account for 64bit
argument alignment on PowerPC32.

15 years agoMaintain separate print column for each process
Andreas Schwab [Tue, 27 Oct 2009 15:27:13 +0000 (16:27 +0100)]
Maintain separate print column for each process

* defs.h (struct tcp): Add curcol.
* strace.c: (alloc_tcb): Initialize it.
(trace): Use curcol from current process and save it before
continuing.
(tprintf): Don't modify curcol on output error.

15 years ago* strace.spec: 4.5.19-1 release. v4.5.19
Roland McGrath [Wed, 21 Oct 2009 17:36:13 +0000 (10:36 -0700)]
* strace.spec: 4.5.19-1 release.

15 years ago* file.c (printstat64): Cleanup trailing whitespace.
Dmitry V. Levin [Wed, 21 Oct 2009 13:43:57 +0000 (13:43 +0000)]
* file.c (printstat64): Cleanup trailing whitespace.

15 years agoFix decoding of newfstatat syscall on x86-64
Andreas Schwab [Fri, 16 Oct 2009 09:37:13 +0000 (11:37 +0200)]
Fix decoding of newfstatat syscall on x86-64

* file.c (printstat64) [LINUX && X68_64]: If tracing a 64-bit
process redirect to printstat.
Fixes RH#529316 "Field values shown for "newfstatat" system
call are incorrect"

15 years ago* configure.ac (AC_CHECK_HEADERS): Remove asm/reg.h.
Dmitry V. Levin [Mon, 12 Oct 2009 15:48:29 +0000 (15:48 +0000)]
* configure.ac (AC_CHECK_HEADERS): Remove asm/reg.h.

15 years agosparc/linux: Rewrite to use asm/ptrace.h
Mike Frysinger [Mon, 12 Oct 2009 15:05:14 +0000 (11:05 -0400)]
sparc/linux: Rewrite to use asm/ptrace.h

The current sparc/linux code uses asm/reg.h, but recent Linux kernels
dropped that header completely.  So switch over to the ptrace headers
as those should stick around indefinitely as part of the ABI.

* defs.h [LINUXSPARC] (U_REG_G1, U_REG_O0, U_REG_O1): Define.
* process.c: Drop asm/regs.h include.
[SPARC || SPARC64] (change_syscall): Change struct regs to struct pt_regs.
* signal.c: Drop asm/regs.h include.
(m_siginfo_t): Unify [SPARC || SPARC64] and [MIPS].
[SPARC || SPARC64] (sys_sigreturn): Change struct regs to struct pt_regs.
* syscall.c: Drop asm/regs.h include.
[SPARC || SPARC64] (internal_syscall, get_scno, get_error, force_result,
syscall_enter): Change struct regs to struct pt_regs.
* util.c: Drop asm/regs.h include.
(_hack_syscall5, _ptrace): Delete.
[SPARC || SPARC64] (getpc, printcall, arg_setup_state): Change
struct regs to struct pt_regs.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years ago* make-dist: Clean up.
Roland McGrath [Sun, 11 Oct 2009 23:30:57 +0000 (16:30 -0700)]
* make-dist: Clean up.

15 years ago* configure.ac: Use AC_CONFIG_AUX_DIR([.]).
Roland McGrath [Sun, 11 Oct 2009 23:25:29 +0000 (16:25 -0700)]
* configure.ac: Use AC_CONFIG_AUX_DIR([.]).

15 years ago* make-dist: New script for preparing release tarballs.
Dmitry V. Levin [Fri, 9 Oct 2009 23:15:16 +0000 (23:15 +0000)]
* make-dist: New script for preparing release tarballs.

15 years ago* git-set-file-times: Import from rsync.
Dmitry V. Levin [Fri, 9 Oct 2009 23:07:12 +0000 (23:07 +0000)]
* git-set-file-times: Import from rsync.

15 years ago* Makefile.am [MAINTAINER_MODE]: Define and export TAR_OPTIONS.
Dmitry V. Levin [Fri, 9 Oct 2009 22:10:09 +0000 (22:10 +0000)]
* Makefile.am [MAINTAINER_MODE]: Define and export TAR_OPTIONS.

15 years agoEnhance msgsnd() parser
Dmitry V. Levin [Thu, 8 Oct 2009 23:33:15 +0000 (23:33 +0000)]
Enhance msgsnd() parser

* ipc.c (tprint_msgsnd): New function.  Move msgsnd parser code here,
add check for umove() return code.
(sys_msgsnd): Use tprint_msgsnd().

15 years ago* NEWS: Update for 4.5.19 release.
Dmitry V. Levin [Thu, 8 Oct 2009 22:28:57 +0000 (22:28 +0000)]
* NEWS: Update for 4.5.19 release.

15 years agoEnhance semop()/semtimedop() sembuf parser
Dmitry V. Levin [Wed, 7 Oct 2009 22:14:00 +0000 (22:14 +0000)]
Enhance semop()/semtimedop() sembuf parser

* ipc.c (tprint_sembuf): New function. Move sembuf parser code here,
add abbrev() support.
(sys_semop, sys_semtimedop): Use tprint_sembuf().

15 years agoAdd pretty printing of sembuf argument to semop() and semtimedop()
Jakub Bogusz [Wed, 7 Oct 2009 20:25:10 +0000 (22:25 +0200)]
Add pretty printing of sembuf argument to semop() and semtimedop()

* ipc.c (semop_flags): New xlat structure.
(sys_semop, sys_semtimedop): Add pretty printing of sembuf argument.

15 years agoAdd support for Linux/no-mmu with vfork
Mike Frysinger [Thu, 8 Oct 2009 00:41:29 +0000 (20:41 -0400)]
Add support for Linux/no-mmu with vfork

* configure.ac (AC_CHECK_FUNCS): Add fork.
* strace.c (strace_vforked): Define.
(startup_child): Do not raise SIGSTOP if vforked.
(trace): Skip first exec when starting up after vforked.
* syscall.c [BFIN] (get_scno): Drop waitexec checks.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoAvoid malloc(0) in getdents parsers
Mike Frysinger [Thu, 8 Oct 2009 00:41:56 +0000 (20:41 -0400)]
Avoid malloc(0) in getdents parsers

On end of directory, getdents returns 0.  This return value is used to
then try and do malloc(0), but on some systems this will always return
NULL.  Since the code won't read the pointer in question if len is 0,
then don't bother calling malloc(0) and set the pointer to NULL ourself.
* file.c (sys_getdents, sys_getdents64): Avoid malloc(0) call.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoAdd sys_nanosleep() prototype for sparc
Mike Frysinger [Wed, 7 Oct 2009 19:52:20 +0000 (15:52 -0400)]
Add sys_nanosleep() prototype for sparc

* linux/sparc/syscall.h (sys_nanosleep): New prototype.
Reported by Frederik Schüler.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoSilence compiler warnings about implicit cast from pointer to integer
Mike Frysinger [Wed, 7 Oct 2009 05:13:39 +0000 (01:13 -0400)]
Silence compiler warnings about implicit cast from pointer to integer

* util.c (do_ptrace): Cast ptrace() 4th arg to long.
(ptrace_restart): Drop void* cast on ptrace() 4th arg.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoIgnore .gdb files from FLAT toolchains
Mike Frysinger [Wed, 7 Oct 2009 05:08:46 +0000 (01:08 -0400)]
Ignore .gdb files from FLAT toolchains

* .gitignore: Add /*.gdb.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years ago* configure.ac (AC_CHECK_FUNCS): Sort and expand.
Mike Frysinger [Wed, 7 Oct 2009 05:05:12 +0000 (01:05 -0400)]
* configure.ac (AC_CHECK_FUNCS): Sort and expand.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: Update ioctl/syscall lists
Mike Frysinger [Wed, 7 Oct 2009 05:05:11 +0000 (01:05 -0400)]
Blackfin: Update ioctl/syscall lists

* linux/bfin/ioctlent.h: Sync list with latest kernel sources.
* linux/bfin/syscallent.h: Likewise.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoioctlsort: Check ppc hosts too
Mike Frysinger [Wed, 7 Oct 2009 05:05:10 +0000 (01:05 -0400)]
ioctlsort: Check ppc hosts too

* linux/ioctlsort.c: Check for __powerpc__.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoFix build on ia64
Andreas Schwab [Wed, 7 Oct 2009 14:00:31 +0000 (16:00 +0200)]
Fix build on ia64

* linux/ia64/syscallent.h: Update for addition of accept4 syscall
in ../syscallent.h.

15 years ago* strace.spec (%doc): Add ChangeLog-CVS.
Roland McGrath [Wed, 7 Oct 2009 01:03:25 +0000 (18:03 -0700)]
* strace.spec (%doc): Add ChangeLog-CVS.

15 years ago* Makefile.am (srpm): New phony target.
Roland McGrath [Wed, 7 Oct 2009 00:46:56 +0000 (17:46 -0700)]
* Makefile.am (srpm): New phony target.

15 years ago* Makefile.am (EXTRA_DIST): Add ChangeLog.
Roland McGrath [Wed, 7 Oct 2009 00:41:02 +0000 (17:41 -0700)]
* Makefile.am (EXTRA_DIST): Add ChangeLog.

($(srcdir)/ChangeLog): New target, replaces gen-changelog phony target.
Put it inside [MAINTAINER_MODE].

15 years ago* NEWS: Update for 4.5.19 release.
Dmitry V. Levin [Tue, 6 Oct 2009 10:40:17 +0000 (10:40 +0000)]
* NEWS: Update for 4.5.19 release.

15 years agoPrepare debian/* files for release
Frederik Schüler [Mon, 5 Oct 2009 20:50:07 +0000 (20:50 +0000)]
Prepare debian/* files for release

* debian/rules: Do not ship ChangeLog anymore.
* debian/control: Update to Debian standards version 3.8.1, and remove
Roland from the Maintainers list.  This closes Debian bug #521458.
* debian/changelog: Document changes and prepare for release.

15 years ago* defs.h [HPPA]: Lower MAX_ARGS from 32 to 6.
Dmitry V. Levin [Mon, 5 Oct 2009 23:32:39 +0000 (23:32 +0000)]
* defs.h [HPPA]: Lower MAX_ARGS from 32 to 6.

15 years ago* ipc.c [LINUX] (sys_shmat): HPPA does not use an IPC multiplexer.
Dmitry V. Levin [Mon, 5 Oct 2009 23:31:54 +0000 (23:31 +0000)]
* ipc.c [LINUX] (sys_shmat): HPPA does not use an IPC multiplexer.

Based on patch from Carlos O'Donell.

15 years ago* linux/hppa/syscallent.h: Update syscalls.
Carlos O'Donell [Mon, 14 Sep 2009 02:06:20 +0000 (02:06 +0000)]
* linux/hppa/syscallent.h: Update syscalls.

Based on work by Kyle McMartin and Helge Deller.

15 years agoFix SA_HANDLER function pointer comparisons for hppa
Carlos O'Donell [Wed, 9 Sep 2009 18:13:19 +0000 (18:13 +0000)]
Fix SA_HANDLER function pointer comparisons for hppa

* signal.c (sys_sigaction): Cast SA_HANDLER function pointers to long.
(sys_rt_sigaction): Likewise.

15 years agoCRIS: Correct first argument to upeek()
Edgar E. Iglesias [Mon, 5 Oct 2009 14:41:02 +0000 (14:41 +0000)]
CRIS: Correct first argument to upeek()

This complements commit ea0e6e80260d2b1b7ad40282012b0e47869bcddf.
* syscall.c [CRISV10 || CRISV32] (syscall_fixup, syscall_enter): Pass
tcp pointer instead of pid to upeek().
* util.c [CRISV10 || CRISV32] (printcall): Likewise.

Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
15 years ago* signal.c (do_signalfd): Fix typo in output format.
Dmitry V. Levin [Mon, 5 Oct 2009 13:45:19 +0000 (13:45 +0000)]
* signal.c (do_signalfd): Fix typo in output format.

15 years ago* Makefile.am (gen_changelog_start_date): Fix date.
Dmitry V. Levin [Mon, 21 Sep 2009 18:37:10 +0000 (18:37 +0000)]
* Makefile.am (gen_changelog_start_date): Fix date.

15 years agoPrepare for 4.5.19 release
Dmitry V. Levin [Mon, 14 Sep 2009 16:34:34 +0000 (16:34 +0000)]
Prepare for 4.5.19 release

* NEWS: Update for 4.5.19 release.
* configure.ac: Version 4.5.19.
* debian/changelog: 4.5.19-1.
* strace.spec: 4.5.19-1.

15 years agoUpdate debian/* to 4.5.18-1
Dmitry V. Levin [Mon, 14 Sep 2009 17:03:20 +0000 (17:03 +0000)]
Update debian/* to 4.5.18-1

* debian/changelog: Update to 4.5.18-1.
* debian/compat: Set compatibility level to 7.
* debian/control (Build-Depends): Update debhelper requirement.
(strace, strace64): Add Section and Priority tags.

15 years agoFix fadvise64 decoding on ARM
Kirill A. Shutemov [Sat, 19 Sep 2009 00:21:33 +0000 (03:21 +0300)]
Fix fadvise64 decoding on ARM

* file.c (sys_fadvise64_64) [ARM]: Fix argument ordering.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
15 years agoFix follow fork/vfork on Linux ARM OABI
Dmitry V. Levin [Fri, 18 Sep 2009 11:30:14 +0000 (11:30 +0000)]
Fix follow fork/vfork on Linux ARM OABI

__NR_SYSCALL_BASE eis 0 for EABI and is 0x900000 for OABI.
* process (change_syscall) [LINUX && ARM]: Mask off the high order bits
when changing syscall.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
Reviewed-by: Kirill A. Shutemov <kirill@shutemov.name>
15 years agoMark shell scripts as executable
Mike Frysinger [Mon, 14 Sep 2009 03:00:50 +0000 (23:00 -0400)]
Mark shell scripts as executable

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoIgnore ioctlsort helper program
Mike Frysinger [Mon, 14 Sep 2009 03:00:06 +0000 (23:00 -0400)]
Ignore ioctlsort helper program

* .gitignore: Add ioctlsort.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agolinux/errno: Add ERFKILL
Mike Frysinger [Mon, 14 Sep 2009 02:53:12 +0000 (22:53 -0400)]
linux/errno: Add ERFKILL

* linux/errnoent.h: Change ERRNO_132 to ERFKILL according to errno 132
definition introduced in Linux 2.6.31.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoAdd accept4 socketcall
Paolo Bonzini [Fri, 14 Aug 2009 10:34:06 +0000 (12:34 +0200)]
Add accept4 socketcall

This second patch in the series adds support for accept4 as a socketcall
sub-call.  Besides the need to renumber all system calls, this poses
no problem.
Tested on i686.

* linux/arm/syscallent.h: Add accept4 socketcall.
* linux/m68k/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/syscallent.h: Likewise.

* linux/sparc/syscall.h (SYS_sub_accept4): Declare.
(SYS_socket_nsubcalls): Update.
* linux/syscall.h: Likewise.

15 years agoReplace x86-64 paccept with accept4
Paolo Bonzini [Fri, 14 Aug 2009 10:34:05 +0000 (12:34 +0200)]
Replace x86-64 paccept with accept4

This patch changes the paccept syscall to accept4 for x86-64, since
the former was dropped in Linux kernel commit v2.6.27-rc7-14-g2d4c826.
At the same time, it adds support for pretty printing its arguments.

* linux/x86_64/syscallent.h: Replace paccept with accept4,
hook in sys_accept4.
* net.c (sys_accept): Leave a small stub calling the new...
(do_accept): ... function, which also adds a flags_arg argument.
(sys_accept4): New.

15 years agoZero-extend 32-bit addresses when printing argv array.
Andreas Schwab [Fri, 28 Aug 2009 17:36:20 +0000 (19:36 +0200)]
Zero-extend 32-bit addresses when printing argv array.

(printargv): Zero-extend 32-bit addresses.
Fixes RH#519480 "64-bit strace is lazy on execve of 32-bit
process".

15 years agoAdd more futex decoding.
Andreas Schwab [Wed, 12 Aug 2009 07:54:42 +0000 (09:54 +0200)]
Add more futex decoding.

* process.c (FUTEX_WAIT_REQUEUE_PI, FUTEX_CMP_REQUEUE_PI)
(FUTEX_PRIVATE_FLAG, FUTEX_CLOCK_REALTIME): Define.
(futexops): Add entries for them.
(sys_futex): Decode FUTEX_CMP_REQUEUE_PI and
FUTEX_WAIT_REQUEUE_PI.

15 years agoGenerate ChangeLog from git log
Dmitry V. Levin [Thu, 9 Jul 2009 00:47:41 +0000 (00:47 +0000)]
Generate ChangeLog from git log

* .gitignore: Add ChangeLog
* ChangeLog: Rename to ChangeLog-CVS.
* Makefile.am (gen-changelog): New rule.
(dist-hook): Depend on it.
(EXTRA_DIST): Add ChangeLog-CVS.
* README-hacking: Describe changes.
* gitlog-to-changelog: Import from gnulib.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
15 years agoCleanup trailing whitespaces and indentation that uses spaces before tabs
Dmitry V. Levin [Wed, 8 Jul 2009 11:21:17 +0000 (11:21 +0000)]
Cleanup trailing whitespaces and indentation that uses spaces before tabs

Correct spacing to fix warnings reported by
git diff --check 4b825dc642cb6eb9a060e54bf8d69288fbee4904 HEAD

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
15 years agoREADME-CVS: Rename to README-hacking
Dmitry V. Levin [Tue, 7 Jul 2009 22:33:41 +0000 (22:33 +0000)]
README-CVS: Rename to README-hacking

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
15 years ago.cvsignore: Remove obsolete file
Dmitry V. Levin [Tue, 7 Jul 2009 21:31:51 +0000 (21:31 +0000)]
.cvsignore: Remove obsolete file

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
15 years agoRevert unapproved commits.
Roland McGrath [Tue, 2 Jun 2009 23:49:22 +0000 (16:49 -0700)]
Revert unapproved commits.

15 years ago* strace.c (handle_stopped_tcbs): Fix cast for 4th argument passed to ptrace().
Dmitry V. Levin [Mon, 1 Jun 2009 18:45:41 +0000 (18:45 +0000)]
* strace.c (handle_stopped_tcbs): Fix cast for 4th argument passed to ptrace().

15 years ago* bjm.c (sys_query_module): Fix format warning reported by
Dmitry V. Levin [Mon, 1 Jun 2009 10:32:27 +0000 (10:32 +0000)]
* bjm.c (sys_query_module): Fix format warning reported by
gcc -Wformat-security.
* file.c (tprint_open_modes): Likewise.
* process.c (printargv): Likewise.
* signal.c (printsignal): Likewise.

15 years agoClean up header checks
Dmitry V. Levin [Mon, 1 Jun 2009 09:59:11 +0000 (09:59 +0000)]
Clean up header checks

* configure.ac: Reformat AC_CHECK_HEADERS to keep it sorted and
easily updated, and reduce merging errors in the future.
* system.c: Convert all non-standard #ifdef checks for specific
headers to regular #ifdef HAVE_*_H checks.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
15 years agofix thinko in ChangeLog
Denys Vlasenko [Mon, 20 Apr 2009 18:43:24 +0000 (18:43 +0000)]
fix thinko in ChangeLog

15 years ago* strace.c (printstatsol, printstat_sparc64):
Denys Vlasenko [Mon, 20 Apr 2009 18:30:13 +0000 (18:30 +0000)]
* strace.c (printstatsol, printstat_sparc64):
Remove NULL and error check for addr parameter.
(printoldstat, printstat, printoldstat64):
Move NULL and error check for addr parameter
so that it happens before printstatsol/printstat_sparc64 calls.

15 years ago* strace.c (collect_stopped_tcbs): Do not enable/disable signals
Denys Vlasenko [Mon, 20 Apr 2009 18:20:18 +0000 (18:20 +0000)]
* strace.c (collect_stopped_tcbs): Do not enable/disable signals
multiple times, do it just once per collecting pass.

15 years ago* file.c (print_dirfd): Use int for file descriptor, not a long.
Denys Vlasenko [Thu, 16 Apr 2009 12:06:16 +0000 (12:06 +0000)]
* file.c (print_dirfd): Use int for file descriptor, not a long.
* process.c (printwaitn): Use int for PID, not a long.

15 years ago* signal (sys_rt_sigtimedwait): Fix sigtimedwait syscall decoding.
Denys Vlasenko [Wed, 15 Apr 2009 13:31:59 +0000 (13:31 +0000)]
* signal (sys_rt_sigtimedwait): Fix sigtimedwait syscall decoding.

15 years ago* signal (sys_rt_sigaction): Print struct sigaction correctly
Denys Vlasenko [Wed, 15 Apr 2009 13:22:59 +0000 (13:22 +0000)]
* signal (sys_rt_sigaction): Print struct sigaction correctly
in 32/64 environment.
* desc.c (printflock): Add #ifdefs around earlier flock 32/64 fix
so that we don't waste time on arches with one personality.

15 years ago* signal.c: Whitespace, comment, and style fixes, no code changes.
Denys Vlasenko [Tue, 14 Apr 2009 12:51:00 +0000 (12:51 +0000)]
* signal.c: Whitespace, comment, and style fixes, no code changes.
* file.c: Ditto.
* time.c: Ditto.
* process.c: Ditto.
* resource.c: Ditto.

15 years ago* system.c (sram_alloc_flag): Add L2_SRAM constant.
Denys Vlasenko [Mon, 23 Mar 2009 13:12:46 +0000 (13:12 +0000)]
* system.c (sram_alloc_flag): Add L2_SRAM constant.
by Mike Frysinger (vapier AT gentoo.org).
(sys_sram_alloc): Fix improperly used %zu:
tcp->u_arg is not a size_t, it is a long.
* net.c (printcmsghdr): Fix improperly used %zu:
struct cmsghdr::cmsg_len is not a size_t.

15 years agoUpdate Changelog to more accurately describe the changes.
Denys Vlasenko [Fri, 20 Mar 2009 13:30:12 +0000 (13:30 +0000)]
Update Changelog to more accurately describe the changes.

15 years agoAs it turned out, "if (interrupted) break;" is needed in both loops,
Denys Vlasenko [Fri, 20 Mar 2009 13:28:00 +0000 (13:28 +0000)]
As it turned out, "if (interrupted) break;" is needed in both loops,
in "collect tasks" loop and in enclosing "collect/process" loop.
Before this patch, "strace cat" + "killall -INT strace" wasn't
making strace stop and exit. This patch restores 4.5.18 behavior
in this regard.

15 years agoRemove "better attach to SIGSTOP", it is not correct...
Denys Vlasenko [Tue, 17 Mar 2009 14:46:54 +0000 (14:46 +0000)]
Remove "better attach to SIGSTOP", it is not correct...
(^C fix remains).

15 years ago* strace.c (startup_attach): Take care to correctly attach
Denys Vlasenko [Tue, 17 Mar 2009 14:29:59 +0000 (14:29 +0000)]
* strace.c (startup_attach): Take care to correctly attach
to stopped processes by resending SIGSTOP.
(collect_stopped_tcbs): Check for ^C here, not in trace().
(trace): Remove check for ^C.

15 years agoDecode fcntl's F_{GET,SET}LEASE, F_NOTIFY, and F_DUPFD_CLOEXEC.
Denys Vlasenko [Tue, 10 Mar 2009 20:41:58 +0000 (20:41 +0000)]
Decode fcntl's F_{GET,SET}LEASE, F_NOTIFY, and F_DUPFD_CLOEXEC.
By Mike Frysinger (vapier AT gentoo.org)
* desc.c: Add F_SETLEASE, F_GETLEASE, F_NOTIFY,
F_DUPFD_CLOEXEC to fcntlcmds[]. Create notifyflags[] array.
(sys_fcntl): Handle new flags.

Optimize printing of open modes.
* defs.h: Declare sprint_open_modes(),
remove unused parameter in tprint_open_modes().
* desc.c (sprint_open_modes): Move fuction definition from here...
* file.c (sprint_open_modes): To here.
(tprint_open_modes): Use sprint_open_modes(), it already
generates needed string.
* ipc.c: Remove unused parameter from calls
to tprint_open_modes().

15 years agodefs.h: cosmetics (wrap overlong line)
Denys Vlasenko [Fri, 6 Mar 2009 00:33:24 +0000 (00:33 +0000)]
defs.h: cosmetics (wrap overlong line)

15 years agoAVR32 support by Hans-Christian Egtvedt
Denys Vlasenko [Fri, 27 Feb 2009 20:32:52 +0000 (20:32 +0000)]
AVR32 support by Hans-Christian Egtvedt
(hans-christian.egtvedt AT atmel.com).
* configure.ac: Make it recognize avr32.
* defs.h: Define LINUX_AVR32.
* linux/avr32/syscallent.h: New file.
* Makefile.am: Reference linux/avr32/syscallent.h.
* proc.c (change_syscall, setarg): Add support for avr32.
(struct xlat struct_user_offsets[]): Ditto.
* syscall.c (get_scno): Ditto.
(get_error, force_result, syscall_enter): Ditto.
* util.c (getpc, printcall): Ditto.

15 years agoCRIS support by Hinko Kocevar (hinko.kocevar AT cetrtapot.si)
Denys Vlasenko [Wed, 25 Feb 2009 17:08:40 +0000 (17:08 +0000)]
CRIS support by Hinko Kocevar (hinko.kocevar AT cetrtapot.si)
* configure.ac: Make it recognize cris.
* process.c: Define ARG_xxx constants for cris.
(change_syscall): Add support for cris.
(struct_user_offsets): Add cris-specific data.
* signal.c (sys_sigreturn): Add support for cris.
* syscall.c (get_scno): Add support for cris.
(syscall_fixup): Add support for cris.
(get_error): Add support for cris.
(syscall_enter): Add support for cris.
(force_result): While at it, fix cpp directives indentation.
* util.c (printcall): Add support for cris.

15 years agoBy Hans-Christian Egtvedt (hans-christian.egtvedt AT atmel.com):
Denys Vlasenko [Wed, 25 Feb 2009 14:24:02 +0000 (14:24 +0000)]
By Hans-Christian Egtvedt (hans-christian.egtvedt AT atmel.com):

strace.c: suppress "warning: unused static" message by adding #ifdef's around
 a variable
.gitignore: trivial
test/*.c: cleanup (suppress warnings, much better style).

15 years agoReplace many more bare ptrace calls with calls to wrappers
Denys Vlasenko [Tue, 24 Feb 2009 15:17:53 +0000 (15:17 +0000)]
Replace many more bare ptrace calls with calls to wrappers
which do proper error-checking and set tcp->ptrace_errno.
In some cases, missing error checking is added.
Error handling for trace_syscall() failures and other cases
where tcp->ptrace_errno is nonzero is cleaned up a bit
and made more verbose if we see error other than ESRC.
Some comments are added or expanded.
* defs.h: Declare ptrace_cmds[]. Modify do_ptrace
declaration (last parameter is long, not void *).
* process.c: Make ptrace_cmds[] non-static.
(change_syscall): Use do_ptrace() instead of bare ptrace().
* signal.c: Use do_ptrace() instead of bare ptrace().
* strace.c: Update trace_syscall() failure handling.
* syscall.c: Use do_ptrace() instead of bare ptrace().
* util.c: Use do_ptrace() instead of bare ptrace().
Update do_ptrace() wrapper.
(str_PTRACE_xxx): New function - helper returning "PTRACE_xxx".
(do_ptrace_peekdata): New function - wrapper for PTRACE_PEEKDATA
(do_ptrace5): New function - wrapper for 5-argument ptrace calls.

15 years ago* process.c: Indent preprocessor directives so that nesting
Denys Vlasenko [Tue, 24 Feb 2009 12:59:47 +0000 (12:59 +0000)]
* process.c: Indent preprocessor directives so that nesting
can be figured out. Add PTRACE_SET_SYSCALL to ptrace_cmds[].

15 years agolinux/ioctlent.sh: update by Mike Frysinger (now collects enums too)
Denys Vlasenko [Mon, 23 Feb 2009 13:22:06 +0000 (13:22 +0000)]
linux/ioctlent.sh: update by Mike Frysinger (now collects enums too)

15 years agoMore cleanups from Mike Frysingler:
Denys Vlasenko [Mon, 23 Feb 2009 08:07:45 +0000 (08:07 +0000)]
More cleanups from Mike Frysingler:
README: update an URL
.gitignore: added
config.guess config.sub install-sh: removed, they are revenerated
 by autoconf anyway

15 years agoHACKING-scripts: new doc file by Mike Frysinger
Denys Vlasenko [Mon, 23 Feb 2009 07:56:01 +0000 (07:56 +0000)]
HACKING-scripts: new doc file by Mike Frysinger

15 years agos/sort | uniq/sort -u/
Denys Vlasenko [Sun, 22 Feb 2009 03:01:20 +0000 (03:01 +0000)]
s/sort | uniq/sort -u/

15 years agoFurther signalent.h cleanup.
Denys Vlasenko [Fri, 20 Feb 2009 17:38:47 +0000 (17:38 +0000)]
Further signalent.h cleanup.
* linux/ia64/signalent.h: Remove, it is identical to common signalent.h
sans "SIGRTnn" definitions which are redundant.
* linux/powerpc/signalent.h: Remove, it is identical to common signalent.h
sans outdated "SIGUNUSED" which should be "SIGSYS".
* linux/s390/signalent.h: Ditto.
* linux/s390x/signalent.h: Ditto.
* Makefile.am: Remove references to the above files.

15 years agoPatch by Mike Frysinger (vapier AT gentoo.org).
Denys Vlasenko [Fri, 20 Feb 2009 17:32:34 +0000 (17:32 +0000)]
Patch by Mike Frysinger (vapier AT gentoo.org).
* linux/ioctlent.sh: Update sed machinery to parse _IOC() macros
with two constants.

15 years agoPatch by Mike Frysinger (vapier AT gentoo.org).
Denys Vlasenko [Fri, 20 Feb 2009 16:24:39 +0000 (16:24 +0000)]
Patch by Mike Frysinger (vapier AT gentoo.org).
* Makefile.am: Remove reference to linux/sh/signalent.h.
* linux/sh/signalent.h: Remove, it is identical to common signalent.h.

15 years agofix accidental damage to ChangeLog
Denys Vlasenko [Fri, 20 Feb 2009 16:03:42 +0000 (16:03 +0000)]
fix accidental damage to ChangeLog

15 years agoPatch by Mike Frysinger (vapier AT gentoo.org).
Denys Vlasenko [Fri, 20 Feb 2009 16:00:41 +0000 (16:00 +0000)]
Patch by Mike Frysinger (vapier AT gentoo.org).
* linux/errnoent.h: Make ERRNO_58 show EDEADLOCK for POWERPC.
* Makefile.am: Remove reference to linux/powerpc/errnoent.h.
* linux/powerpc/errnoent.h: Remove, we can use common errnoent.h now.

15 years agoPatch by Mike Frysinger (vapier AT gentoo.org).
Denys Vlasenko [Fri, 20 Feb 2009 15:51:51 +0000 (15:51 +0000)]
Patch by Mike Frysinger (vapier AT gentoo.org).
Removing redundant errnoent.h files.
* Makefile.am: Remove references to linux/ia64/errnoent.h,
linux/s390/errnoent.h, linux/s390x/errnoent.h and linux/sh/errnoent.h.
* linux/ia64/errnoent.h: Remove, this arch uses common errnoent.h.
* linux/s390/errnoent.h: Ditto.
* linux/s390x/errnoent.h: Ditto.
* linux/sh/errnoent.h: Ditto.

15 years agotest/sigkill_rain.c: a testcase with lots of async deaths
Denys Vlasenko [Fri, 13 Feb 2009 10:26:31 +0000 (10:26 +0000)]
test/sigkill_rain.c: a testcase with lots of async deaths

15 years ago.
Roland McGrath [Wed, 11 Feb 2009 03:03:29 +0000 (03:03 +0000)]
.

15 years ago2009-02-10 Roland McGrath <roland@redhat.com>
Roland McGrath [Wed, 11 Feb 2009 03:03:28 +0000 (03:03 +0000)]
2009-02-10  Roland McGrath  <roland@redhat.com>

* configure.ac: Check for struct sigcontext.
* signal.c [LINUX] [M68K] (struct sigcontext): Don't define it if
[HAVE_STRUCT_SIGCONTEXT].
From Muttley Meen <muttley.meen@gmail.com>.

15 years agoCleanup after tcb table expansion simplification.
Denys Vlasenko [Tue, 10 Feb 2009 16:03:20 +0000 (16:03 +0000)]
Cleanup after tcb table expansion simplification.
There was code which was trying to continue tracing
even if table expansion fails. Now we treat it as fatal
failure, so this code is removed by this change.
* defs.h: Delete TCB_FOLLOWFORK constant.
* process.c: Delete fork_tcb() and all calls of it.
* strace.c (startup_attach): Remove usage of TCB_FOLLOWFORK.
* syscall.c: Indent preprocessor directives.

15 years ago* defs.h: Correct the comment about TCB_SUSPENDED.
Denys Vlasenko [Mon, 9 Feb 2009 18:55:59 +0000 (18:55 +0000)]
* defs.h: Correct the comment about TCB_SUSPENDED.
* strace.c: Fix misplaced #endif.
* util.c: Indent preprocessor directives, mark code parts
which can never be reached by compilation because of
the combination of #if directives. These are likely dead code,
I want to remove them later.

15 years ago* strace.c (newoutf): Prevent -o FILENAME overflowing the stack.
Denys Vlasenko [Thu, 29 Jan 2009 20:38:20 +0000 (20:38 +0000)]
* strace.c (newoutf): Prevent -o FILENAME overflowing the stack.
(startup_attach): Fix wrong pid in "Process <PID> attached".
(handle_group_exit): Do not consider exit to be spurious if
tcb has TCB_STARTUP bit set - we can attach to the task
right before its death, it can legitimately happen.
(handle_stopped_tcbs): Ditto.

15 years ago* process.c (internal_clone): Check and complain if pid value
Denys Vlasenko [Wed, 28 Jan 2009 19:00:54 +0000 (19:00 +0000)]
* process.c (internal_clone): Check and complain if pid value
looks insane.
* strace.c (alloc_tcb): Clear *all* fields in reused tcb.
(main): Query and remember uname() info on startup.
(handle_stopped_tcbs): Do not use PTRACE_SETOPTIONS on Linux < 2.6.29.
(printleader): Correct printing of "<unavailable>" markers.

15 years ago* strace.c (collect_stopped_tcbs): Guard against the case when
Denys Vlasenko [Tue, 27 Jan 2009 19:38:44 +0000 (19:38 +0000)]
* strace.c (collect_stopped_tcbs): Guard against the case when
waitpid() reports the same task multiple times.
Run tested.

15 years ago* process.c (printwaitn): Add comment about wait4() pid expansion.
Denys Vlasenko [Mon, 26 Jan 2009 19:09:35 +0000 (19:09 +0000)]
* process.c (printwaitn): Add comment about wait4() pid expansion.
Use #ifdef ALPHA instead of LINUX_64BIT, it was misleading
(by implying "any 64-bit platform").
* defs.h: Remove now-unused LINUX_64BIT define.
* resource.c (sys_osf_getrusage): Fix indentation.

15 years agofix fallout from recent tcb table expansion error handling change
Denys Vlasenko [Mon, 26 Jan 2009 12:55:40 +0000 (12:55 +0000)]
fix fallout from recent tcb table expansion error handling change

15 years agosyscall.c (get_scno): Fix warnings about unused 'pid' variable
Denys Vlasenko [Fri, 23 Jan 2009 16:30:26 +0000 (16:30 +0000)]
syscall.c (get_scno): Fix warnings about unused 'pid' variable