]> granicus.if.org Git - strace/log
strace
14 years agoFix reporting signal mask by sigreturn on powerpc
Andreas Schwab [Mon, 22 Feb 2010 23:18:51 +0000 (00:18 +0100)]
Fix reporting signal mask by sigreturn on powerpc

* signal.c (sys_sigreturn) [POWERPC]: Skip dummy stack frame when
locating signal context.

14 years agoFix MIPS N32/N64 compile error
David Daney [Tue, 9 Feb 2010 21:22:30 +0000 (21:22 +0000)]
Fix MIPS N32/N64 compile error

* syscall.c [LINUX_MIPSN32 || LINUX_MIPSN64] (syscall_enter): Pass
tcp->pid to ptrace().

14 years agoAdd support for the TILE architecture
Chris Metcalf [Mon, 28 Dec 2009 15:00:15 +0000 (10:00 -0500)]
Add support for the TILE architecture

* configure.ac: Add TILE to the list of supported architectures.
* defs.h: Define TCB_WAITEXECVE for TILE.
* linux/tile/syscallent.h: New file.
* Makefile.am (EXTRA_DIST): Add linux/tile/syscallent.h
* process.c (change_syscall, struct_user_offsets): Add TILE support.
* syscall.c (get_scno, get_error, syscall_enter): Likewise.
* mem.c (mmap_flags, print_mmap): Add MAP_CACHE_xxx TILE extensions
support.
* signal.c (sigact_flags): Add SA_NOPTRACE.
(sys_sigreturn): Add TILE support.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
14 years agoRemove dead code
Dmitry V. Levin [Thu, 31 Dec 2009 22:50:49 +0000 (22:50 +0000)]
Remove dead code

* defs.h (tv_tv): Remove.
* net.c (sys_xsetsockaddr): Remove commented out dead code.
* process.c (setarg, sys_execv, sys_execve, struct_user_offsets):
Likewise.
* signal.c (sys_sigsuspend): Likewise.
* strace.c (reaper, trace): Likewise.
* stream.c (internal_stream_ioctl): Likewise.
* syscall.c (trace_syscall): Likewise.
* term.c (term_ioctl): Likewise.
* util.c (tv_tv, umoven, uload, getpc, fixvfork, setbpt, clearbpt):
Likewise.

14 years agoMerge Linux internal_clone() into internal_fork()
Dmitry V. Levin [Sat, 26 Dec 2009 17:55:24 +0000 (17:55 +0000)]
Merge Linux internal_clone() into internal_fork()

* defs.h (internal_clone): Remove.
* process.c (internal_clone): Merge into internal_fork().
(internal_fork) [!LINUX]: Remove dead code.
* syscall.c (internal_syscall): Replace internal_clone() with
internal_fork().

14 years ago* Makefile.am (INCLUDES): Remove redundant search directories.
Dmitry V. Levin [Mon, 25 Jan 2010 12:21:07 +0000 (12:21 +0000)]
* Makefile.am (INCLUDES): Remove redundant search directories.

14 years agoUpdate debian/* files
Frederik Schüler [Thu, 4 Feb 2010 20:14:56 +0000 (12:14 -0800)]
Update debian/* files

* debian/control: add sparc64 to the architectures list.
This closes Debian bug #560062
* Backport commit f0df31e71a58c6e79ba77c1a9d84b2f38d44bec7 to fix FTBFS.
This closes Debian bug #560516
* debian/control: Update standards-version to 3.8.3.
* debian/control: Lower package priority to optional, matching
the archive override.
* debian/control: add ${misc:Depends} to Depends: lines where
appropriate.
* debian/watch: new file, allows automatic tracking of new
upstream versions.
* debian/source/format: new file, adapt to debian source format "quilt"
* debian/rules: indentation cleanups; use dh_testroot and dh_prep
in clean target.

14 years agoFix spurious failure of AC_STAT64 test
Andreas Schwab [Mon, 25 Jan 2010 10:32:48 +0000 (11:32 +0100)]
Fix spurious failure of AC_STAT64 test

* acinclude.m4 (AC_STAT64): Include <sys/types.h> first.

14 years agoDon't kill the process when detaching
Andreas Schwab [Tue, 12 Jan 2010 10:16:32 +0000 (11:16 +0100)]
Don't kill the process when detaching

* strace.c (detach): Call clearbpt when TCB_BPTSET is set.

14 years agoDecode fifth argument of mremap syscall
Dmitry V. Levin [Thu, 24 Dec 2009 23:34:58 +0000 (23:34 +0000)]
Decode fifth argument of mremap syscall

* mem.c (sys_mremap): Decode fifth argument.
* linux/*/syscallent.h: Update the number of mremap syscall arguments.

14 years ago* mem.c (sys_mbind): Display first argument in hex
Chris Metcalf [Thu, 24 Dec 2009 23:19:35 +0000 (23:19 +0000)]
* mem.c (sys_mbind): Display first argument in hex

14 years ago* mem.c (mremap_flags): Add MREMAP_FIXED
Chris Metcalf [Thu, 24 Dec 2009 23:19:19 +0000 (23:19 +0000)]
* mem.c (mremap_flags): Add MREMAP_FIXED

14 years agoMove i386-specific files out of common linux dir
Mike Frysinger [Fri, 13 Nov 2009 16:46:34 +0000 (11:46 -0500)]
Move i386-specific files out of common linux dir

* linux/syscallent.h: Moved to ...
* linux/i386/syscallent.h: ... here.
* linux/ia64/syscallent.h: Update i386 syscallent.h include.
* linux/sparc/gen.pl: Likewise.
* linux/x86_64/syscallent1.h: Likewise.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoRemove support for pre-C89
Andreas Schwab [Tue, 27 Oct 2009 15:56:43 +0000 (16:56 +0100)]
Remove support for pre-C89

* defs.h: Remove references to __STDC__ and P macros.
* strace.c: Likewise.

14 years agoDecode more SOL_PACKET socket options
Dmitry V. Levin [Fri, 13 Nov 2009 12:51:04 +0000 (12:51 +0000)]
Decode more SOL_PACKET socket options

* net.c (sockpacketoptions): Add more PACKET_* entries.
(sys_getsockopt): Decode PACKET_STATISTICS.
(printsockopt): Decode PACKET_RX_RING and PACKET_TX_RING.
Patch by Gabor Gombas.

14 years agoIgnore errors if a thread is killed
Andreas Schwab [Wed, 11 Nov 2009 12:54:04 +0000 (13:54 +0100)]
Ignore errors if a thread is killed

* util.c (clearbpt): Ignore ESRCH error.

14 years agoFix handling of Linux systems without struct statfs64
Bernhard Reutner-Fischer [Wed, 14 Oct 2009 14:33:58 +0000 (16:33 +0200)]
Fix handling of Linux systems without struct statfs64

* acinclude.m4 (AC_STATFS64): New macro to check for struct statfs64.
* configure.ac: Call AC_STATFS64.
* file.c (printstatfs64, sys_statfs64, sys_fstatfs64): Compile only
  if struct statfs64 is available.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoFix getsockopt decoding on architectures where sizeof(long) > sizeof(int)
Dmitry V. Levin [Fri, 6 Nov 2009 18:05:40 +0000 (18:05 +0000)]
Fix getsockopt decoding on architectures where sizeof(long) > sizeof(int)

* net.c (sys_getsockopt): Optimize output a bit.
Decode integer argument using printnum_int(), patch by Gabor Gombas.

14 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.

14 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.

14 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.

14 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.

14 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.

14 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.

14 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.

14 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.

14 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"

14 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.

14 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>
14 years ago* make-dist: Clean up.
Roland McGrath [Sun, 11 Oct 2009 23:30:57 +0000 (16:30 -0700)]
* make-dist: Clean up.

14 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([.]).

14 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.

14 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.

14 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.

14 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().

14 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.

14 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().

14 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.

14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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.

14 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.

14 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.

14 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].

14 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.

14 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.

14 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.

14 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.

14 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.

14 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.

14 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>
14 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.

14 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.

14 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.

14 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.

14 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>
14 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>
14 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>
14 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>
14 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>
14 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.

14 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.

14 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