History log of /external/strace/syscall.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
64aa1b1e2dd14c5259bd349270f4d1e29d4fb421 04-Jun-2014 Zubin Mithra <zubin.mithra@gmail.com> Decode paths associated with file descriptors returned by syscalls

* defs.h (RVAL_FD): New macro.
(RVAL_MASK, RVAL_STR, RVAL_NONE): Update.
* desc.c (sys_dup, sys_delete_module): New functions.
(do_dup2, decode_open, sys_creat): Change return value to RVAL_FD.
* linux/dummy.h (sys_delete_module, sys_dup): Remove.
* linux/syscall.h (sys_delete_module, sys_dup): New prototypes.
* syscall.c (trace_syscall_exiting): Handle RVAL_FD.

Signed-off-by: Zubin Mithra <zubin.mithra@gmail.com>
/external/strace/syscall.c
ed69fc2dc3da87d337ddd02f9153a82a46196cdf 16-Apr-2014 Masatake YAMATO <yamato@redhat.com> unwind: move stacktrace capturing and mmap cache invalidating to trace_syscall_entering

Instead of handling stacktrace capturing and mmap cache invalidating in
sys_* functions, handle them uniformly in trace_syscall_entering using
new flags introduced by previous two commits.

The patch is simpler than its older version(v3). The value of
hide_log_until_execve is just ignored. I found the value is nothing
to do with this patch. unwind_cache_invalidate is mentioned only
once in trace_syscall_exiting.
Both are suggested by Dmitry Levin.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
/external/strace/syscall.c
1d78d22058da04eac7bf726c059d5c3fb193da08 16-Apr-2014 Masatake YAMATO <yamato@redhat.com> unwind: introduce markers specifying the needs of special care in unwinding

Some system calls require capturing the stack trace before they are
processed in kernel. Typical one is execve. Some system calls require
invalidating mmap cache after they are processed in kernel.

In current implementation these requirements are handled directly by
appropriate syscall handlers. However, it is difficult to keep the
source code maintainable using this approach to cover all system calls
which have such requirements.

A more generic way to implement this is to flag all syscalls that
require special processing, and handle these flags right in
trace_syscall_entering instead of changing syscall handlers.

This patch just defines new flags: STACKTRACE_INVALIDATE_CACHE and
STACKTRACE_CAPTURE_ON_ENTER.

The names of macros are suggested by Dmitry Levin.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
/external/strace/syscall.c
6141392856a170c9297783e6bfbd9fd970f76fdf 16-Apr-2014 Masatake YAMATO <yamato@redhat.com> unwind: give all exported functions "unwind_" prefix

* unwind.c (init_unwind_addr_space): Rename to unwind_init.
(init_libunwind_ui): Rename to unwind_tcb_init.
(free_libunwind_ui): Rename to unwind_tcb_fin.
(delete_mmap_cache): Rename to unwind_cache_invalidate.
(print_stacktrace): Rename to unwind_print_stacktrace.
* defs.h: Update prototypes.
* mem.c: All callers updated.
* process.c: Likewise.
* strace.c: Likewise.
* syscall.c: Likewise.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
/external/strace/syscall.c
327064b63722a4400058e0e7e9b39d9e34b14b57 23-Jul-2013 Luca Clementi <luca.clementi@gmail.com> Add -k option to print stack trace after each syscall

Print the stack trace of the traced process after each system call when
-k option is specified. It is implemented using libunwind to unwind the
stack and to obtain the function name pointed by the IP.

Based on the code that was originally taken from strace-plus
of Philip J. Guo.

* configure.ac: Add --with-libunwind option. Check libunwind support.
* Makefile.am: Add libunwind support.
* defs.h (struct tcb) [USE_LIBUNWIND]: Append libunwind specific fields.
[USE_LIBUNWIND] (stack_trace_enabled, alloc_mmap_cache,
delete_mmap_cache, print_stacktrace): New prototypes.
* mem.c (print_mmap, sys_munmap, sys_mprotect): Add libunwind support.
* process.c (sys_execve): Likewise.
* strace.c (usage, alloctcb, droptcb, init): Likewise.
* syscall.c (trace_syscall_exiting): Likewise.
* unwind.c: New file.
* strace.1: Document -k option.
/external/strace/syscall.c
ac5133d0cb5c18a39f6fa9b7ca2ebcba9277a904 29-May-2014 Dmitry V. Levin <ldv@altlinux.org> Constify count_syscall function

* count.c (count_syscall): Add const qualifier to timeval argument and
rename it. Store the wall clock time spent while in syscall in separate
timeval variable.
* defs.h (count_syscall): Update prototype.
* syscall.c (trace_syscall_exiting): Update count_syscall invocation.
/external/strace/syscall.c
6556315493082df9a24dbce9dadea4d6673e9965 12-May-2014 Dmitry V. Levin <ldv@altlinux.org> Alias sys_vfork to sys_fork

* process.c (sys_vfork): Remove.
* linux/syscall.h (sys_vfork): Likewise.
* linux/dummy.h (sys_vfork): Alias to sys_fork.
* linux/alpha/syscallent.h: Fix vfork entry.
* util.c (setbpt): Do not check for sys_vfork.
* syscall.c (syscall_fixup_for_fork_exec): Likewise.
/external/strace/syscall.c
0160e161081c08480bb4fd63a292040c7611f6ec 19-Mar-2014 Dmitry V. Levin <ldv@altlinux.org> ARM EABI: disable OABI support by default

OABI is rarely used in ARM EABI systems nowadays, so disable its support
by default. Add --enable-arm-oabi option to enable ARM OABI support.

* configure.ac: New option --enable-arm-oabi.
* syscall.c (get_scno) [ARM]: Check ENABLE_ARM_OABI macro defined by
configure instead of undocumented STRACE_KNOWS_ONLY_EABI macro.
/external/strace/syscall.c
7a28f7f128fcca6ef0010b98cb21adcf8c3b8ae1 04-Mar-2014 Elliott Hughes <enh@google.com> aarch64: fix decoding of arm syscall numbers

If an aarch64 strace is tracing a process using the arm personality, it
also needs to call the shuffle_scno function for the ARM-specific
syscalls.

* syscall.c (shuffle_scno): Define on AARCH64.
(get_scno) [AARCH64]: Call shuffle_scno when the tracee is in 32-bit mode.

Signed-off-by: Elliott Hughes <enh@google.com>
/external/strace/syscall.c
a78d777c869829a3f0320e1793adb44fb57ac950 18-Feb-2014 James Yang <james.yang@freescale.com> powerpc64: fix 64-bit process detection on embedded

* syscall.c (get_scno) [POWERPC64]: Fix 64-bit process detection
on embedded powerpc.

Signed-off-by: James Yang <james.yang@freescale.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/syscall.c
94e246ac57b52346144fece3549820ed04b13058 31-Dec-2013 Mike Frysinger <vapier@gentoo.org> Delete old PTRACE_{PEEK,POKE}USR logic

The code base has settled on PTRACE_{PEEK,POKE}USER (with an E) and has
logic in defs.h to make sure it's set sanely. Delete this old logic as
the defs.h takes care of it now.

* process.c: Delete PTRACE_PEEKUSR/PTRACE_POKEUSR defines.
* signal.c: Likewise.
* syscall.c: Delete PTRACE_PEEKUSR define.
* util.c: Likewise.
/external/strace/syscall.c
0b4060f61f1bb101b5d8d084714b7d2feacdb199 24-Sep-2013 Ali Polatel <alip@exherbo.org> Work around conflict between <sys/ptrace.h> and <linux/ptrace.h>

Since glibc-2.18~39 <sys/ptrace.h> defines ptrace_peeksiginfo_args
which collides with <linux/ptrace.h>.

* configure.ac: Check for `struct ptrace_peeksiginfo_args' in
<sys/ptrace.h>.
* process.c: Work around potential conflict between <sys/ptrace.h>
and <linux/ptrace.h> by redefining ptrace_peeksiginfo_args.
* signal.c: Likewise.
* syscall.c: Likewise.
* util.c: Likewise.

Signed-off-by: Ali Polatel <alip@exherbo.org>
/external/strace/syscall.c
7daacbbbe7349677476a3d2fbf174dcf86f171be 15-Aug-2013 Vineet Gupta <Vineet.Gupta1@synopsys.com> Add support for ARC Cores from Synopsys

Take #2 on mainlining strace support for ARC (last one was 4.6 based back
in March 2011), see
http://sourceforge.net/p/strace/mailman/message/27210168/

The syscall ABI is asm-generic/unistd.h based (so no legacy syscalls),
hence very similar to metag port.

test/* all seem to work well.

* linux/arc/ioctlent.h.in: New file.
* linux/arc/syscallent.h: Likewise.
* Makefile.am (EXTRA_DIST): Add linux/arc/ioctlent.h.in and
linux/arc/syscallent.h.
* configure.ac: Add ARC to the list of supported architectures.
* defs.h: Add ARC support.
* process.c (struct_user_offsets): Likewise.
* signal.c (sys_sigreturn): Likewise.
* syscall.c (print_pc, get_regset, get_regs, get_scno, get_syscall_args,
get_syscall_result, get_error): Likewise.
* util.c (change_syscall): Likewise.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
/external/strace/syscall.c
e600ac67ee7b11600773e73ab9772392dd6e6d04 18-Jul-2013 Denys Vlasenko <dvlasenk@redhat.com> I386: fix signedness mismatch warning

&i386_regs.esp is a pointer to long, not unsigned long.
It needs a cast.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
94e10354d888d1f09bc803616869802a13a576bf 18-Jul-2013 Denys Vlasenko <dvlasenk@redhat.com> ARM: remove wrong NSIG = 32 define

ARM in fact has 64 signals (1..64), and NSIG should be 65
(as usual, rememebr that NSIG_libc == NSIG_kernel+1).

I carefully reviewed all usages of NSIG. In syscall.c,
the only usage is:
for (i = 0; i <= NSIG; i++)
if (strcasecmp(s, signame(i) + 3) == 0)...
which is safe even if NSIG is way too big - signame(i)
returns a well-formed string for any i.

In signal.c, memcpy(&sigset, &sc.sc_mask, NSIG / 8) is used by
IA64 and TILE code, so ARM change can't affect it. And final
usage is:
struct new_sigaction::unsigned long sa_mask[NSIG / sizeof(long)];
It will grow on ARM (and become correct in the process).
Its only use is
memcpy(&sigset, &sa.sa_mask, NSIG / 8);
printsigmask(&sigset, 1);
which used to copy garbage in high bits, now it will copy actual data.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
b51f364c4241aa247a7a22f92c06f1f1a4ab99b4 16-Jul-2013 Denys Vlasenko <dvlasenk@redhat.com> Improve sigreturn decoding on x86 to show RT signal bits too.

This includes decoding of 32-bit sigreturn by 64-bit strace,
which previously wasn't done.

Added a test for it.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
9459dfb891af6ef376a2a78d4a272b9a396ea484 12-Jul-2013 Anton Blanchard <anton@samba.org> powerpc: fix some compiler warnings

Fix a number of differing signedness warnings when building on
powerpc.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
f5730e9614b73053a1b3fcd63a776d9cd6baa83a 07-Jul-2013 Denys Vlasenko <dvlasenk@redhat.com> s390[x]: get rid of syscall_mode, delete code which never triggers

Before this change, the logic was as follows:
syscall entry:
get_scno:
syscall_mode = GPR2
scno = syscall_mode unless syscall_mode == -ENOSYS
(if -ENOSYS, scn is retrieved by decoding current insn)
fixup:
gpr2 = GPR2
syscall_mode = scno unless syscall_mode == -ENOSYS
if (gpr2 != syscall_mode) stray_entry
syscall exit:
get_res:
gpr2 = GRP2
fixup:
syscall_mode = scno unless syscall_mode == -ENOSYS
if (WAITEXECVE && gpr2 in (-ENOSYS, scno)) gpr2 = 0;
get_error:
gpr2 is retval

Entry fixup's if() can never trigger:
regardless whether GPR2 is -ENOSYS or not, syscall_mode is always
equal to GRP2 value there. So it can be removed.

On sysexit path, syscall mode is never used.

Therefore, syscall_mode variable is deleted. grp2 is read from
GPR2 register in get_scno, redundant read in entry fixup is removed.
As a result, entry fixup's s390 code block vanishes completely.

gpr2 variable is renamed s390_gpr2 to match the convention used
by other arches.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
8b7aa2b35d40836d376990f0e5eaf473b70bc26d 04-Jul-2013 Denys Vlasenko <dvlasenk@redhat.com> ARM: add STRACE_KNOWS_ONLY_EABI define which can be used to omit OABI support

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
5a2483ba25fd80cb189abcdc14624be72b0c4c0b 01-Jul-2013 Denys Vlasenko <dvlasenk@redhat.com> Remove ia64-specific printing of current address on signal delivery

The address is printed anyway by printleader() if -i is active.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
c09646aa9e8768d308267bb92747b2d1ff58b1c3 01-Jul-2013 Denys Vlasenko <dvlasenk@redhat.com> Rename ia32 to ia64_ia32mode, and make it bool, not long

Grepping for just ia32 was turning up many false positives.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
4793221a53fb69aa519bc91ab19a79524c0df097 30-Jun-2013 Denys Vlasenko <dvlasenk@redhat.com> Fold is_restart_error() into its sole user

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
44a6d04e5ef32b42faa1e7e4fd93dbdf4237a6af 28-Jun-2013 Denys Vlasenko <dvlasenk@redhat.com> POWERPC: get rid of "static long ppc_result"

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
6b3016e43512e055eb42cf03194eb4c6eee17841 28-Jun-2013 Denys Vlasenko <dvlasenk@redhat.com> POWERPC: read ppc_regs.nip if -i

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
7eb893236ca547779b597325a4a0e4b349e4c566 28-Jun-2013 Denys Vlasenko <dvlasenk@redhat.com> POWERPC: if GETREGS fails with EIO, don't try it again

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
7f5a132c817ee70343913619371adc29691832bc 28-Jun-2013 Denys Vlasenko <dvlasenk@redhat.com> Get rid of powerpc_getreg(), it's a copy of upeek()

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
752e5a02e67f66f555aa39faf522f07126924e62 28-Jun-2013 Denys Vlasenko <dvlasenk@redhat.com> Change upeek() to take pid, not full tcp.

This will be used by next change.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
14d51a6423aa47378518a71e8345a3d1944d97e7 26-Jun-2013 Anton Blanchard <anton@samba.org> powerpc: Provide a fallback for old kernels without PTRACE_GETREGS

PTRACE_GETREGS was added to the ppc kernel in 2.6.23. In order to
provide backward compatibility for very old kernels, add a manual
fallback.

* syscall.c (powerpc_getreg, powerpc_getregs_old): New functions.
(get_regs): Call powerpc_getregs_old if PTRACE_GETREGS is not supported.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
ce6e33be1dbfc16620ea7991a414e879ef84fe22 26-Jun-2013 Anton Blanchard <anton@samba.org> powerpc: Use PTRACE_GETREGS to fetch all registers

* defs.h: declare ppc_regs and get_regs_error.
* signal.c (sys_sigreturn): Use ppc_regs instead of upeek.
* syscall.c: define ppc_regs.
(printcall): Use ppc_regs instead of upeek.
(get_scno): Replace multiple upeek calls with one PTRACE_GETREGS call.
(get_syscall_result): Likewise.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
2a3d27552f17a5b378344620bec7d255bac65a8d 14-May-2013 Denys Vlasenko <dvlasenk@redhat.com> Hide startup syscalls.

Tested with "./strace [-D] [-q] [-bexecve] env true",
all cases seem to work.

* defs.h: Declare new variable: bool hide_log_until_execve.
* strace.c: Define hide_log_until_execve.
Rename skip_startup_execve to skip_one_b_execve.
(startup_child): Do not set skip_one_b_execve = 1 here.
(init): If "strace PROG" case (as opposed to "strace -pPID"),
set skip_one_b_execve and hide_log_until_execve to 1.
(trace): Don't print signal messages if hide_log_until_execve == 1.
* syscall.c (trace_syscall_entering):
Skip syscall printing if hide_log_until_execve == 1.
Reset hide_log_until_execve if we enter execve syscall.
(trace_syscall_exiting): Skip syscall printing if hide_log_until_execve == 1.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
8f636ed12870cdc8e4b38194eb4b701f42ad222b 25-Mar-2013 Chris Zankel <chris@zankel.net> Add support for the XTENSA architecture

* configure.ac: Add XTENSA to the list of supported architectures.
* defs.h: Add XTENSA support.
* linux/xtensa/syscallent.h: New file.
* linux/xtensa/ioctlent.h.in: Likewise.
* process.c (struct_user_offsets): Add XTENSA support.
* signal.c (sys_sigreturn): Likewise.
* syscall.c (printcall, get_scno, get_syscall_args,
get_syscall_result, get_error): Likewise.
* util.c (change_syscall): Likewise.

Signed-off-by: Chris Zankel <chris@zankel.net>
/external/strace/syscall.c
b787b10e167bd14c77d005f26af31e1d23e81c2b 18-Mar-2013 Dmitry V. Levin <ldv@altlinux.org> Reorganize get_regs code, hopefully without functional changes

* syscall.c [I386 || ARM || OR1K || METAG] (ARCH_REGS_FOR_GETREGSET):
New macro.
(get_regset): Implement for AARCH64, METAG, OR1K and X32.
(get_regs) [AARCH64 || METAG || OR1K || X32]: Use it.
/external/strace/syscall.c
faa177e3d9da5f2d93dff20af19622196dced559 18-Mar-2013 Dmitry V. Levin <ldv@altlinux.org> arm, i386: use PTRACE_GETREGSET if available

* syscall.c [ARM || I386 || X86_64] (get_regset): New function.
(get_regs) [ARM || I386 || X86_64]: Use it.
/external/strace/syscall.c
32c049a9d8f6f50fa475929a9638e4cf6619e96e 18-Mar-2013 Dmitry V. Levin <ldv@altlinux.org> Include <sys/uio.h> and <elf.h> on all architectures

* syscall.c: Include <sys/uio.h> and <elf.h> on all architectures.
/external/strace/syscall.c
27e3ae973af5c70b469a1febe88f1c383fdd323e 18-Mar-2013 Dmitry V. Levin <ldv@altlinux.org> x86-64: enhance PTRACE_GETREGSET test

* syscall.c (get_regs) [X86_64]: Check whether PTRACE_GETREGSET
works regardless of the kernel version.
/external/strace/syscall.c
ee348c60735e35730c3e95b89a4dd89bbcb4e7b5 18-Mar-2013 Dmitry V. Levin <ldv@altlinux.org> x32: use PTRACE_GETREGSET unconditionally

* syscall.c (get_regs) [X32]: Assume that PTRACE_GETREGSET always works
regardless of the kernel version.
/external/strace/syscall.c
0482c5a21da75686960bfa3331c86051efdc99f5 18-Mar-2013 Dmitry V. Levin <ldv@altlinux.org> x86-64, x32: do not include linux/ptrace.h unnecessarily

* syscall.c [X86_64 || X32]: Stop including linux/ptrace.h.
/external/strace/syscall.c
aba62927974603bb1ac0b659f6a4f8afb9899c83 05-Mar-2013 Denys Vlasenko <vda.linux@googlemail.com> Emit better message for ERESTARTNOHAND return

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
5f999a869b681ff69cbb801225677fc125b6aefd 22-Feb-2013 James Hogan <james.hogan@imgtec.com> Add support for Imagination Technologies Meta

Add support for Imagination Technologies Meta architecture (the
architecture/ABI is usually referred to as metag in code). The Meta
Linux kernel port is in the process of being upstreamed for v3.9 so it
uses generic system call numbers.

sys_lookup_dcookie writes a filename to buffer argument, so I've set
TF flag.
nfsservctl appears to be set to sys_ni_syscall in asm-generic/unistd.h
so I've left it blank.
truncate64/ftruncate64/pread64/pwrite64/readahead have unaligned 64bit
args which are packed tightly on metag, so less arguments on metag.
fchdir/llseek takes a file descriptor so s/TF/TD/
sync_file_range has 2 64bit args so uses 6 args, so s/4/6/
timerfd_create/msgget/msgctl/msgrcv/semget/segtimedop/semop/shmget/
shmctl/shmat/shmdt/recvmsg/migrate_pages have different number of args.
oldgetrlimit is just getrlimit for metag.
add TM flag to various memory syscalls.
metag doesn't directly use sys_mmap_pgoff for mmap2.
prlimit64/process_vm_readv/process_vm_writev take a pid so add TP flag.
fanotify_init doesn't appear to take a file descriptor so remove TD.
Add kcmp syscall.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Christian Svensson <blue@cmd.nu>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
7b9e45e89151c80c5569ad32b4174893258adcec 01-Mar-2013 Dmitry V. Levin <ldv@altlinux.org> Fix trace=set regression introduced by commit v4.7-111-g9cbc15b

* syscall.c (qual_syscall, qualify): Pass personality down to
qualify_one.
* tests/qual_syscall: New test.
* tests/Makefile.am (TESTS): Add qual_syscall.
/external/strace/syscall.c
e6f55240a1d599adb160ced4bdad36d8f1fd7b92 26-Feb-2013 Dmitry V. Levin <ldv@altlinux.org> Fix compilation errors uncovered by -Werror=enum-compare

This fixes regression introduced by commit v4.7-111-g9cbc15b.

* syscall.c: Merge all nsyscalls* enums into single enum.
Likewise merge nerrnos*, nsignals*, and nioctlents* into single enums.
/external/strace/syscall.c
905e8e0e2f0a1f51ab92424dcb005885ea8b2459 26-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Mass replace error_msg("%s", "literal") -> error_msg("literal")

There is no need to print literal strings through "%s".
Only untrusted strings such as filenames need that.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
b43dacd6d15e8d929cf5a20a50c9c09dc51eacf7 23-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Correct i > MAX_NSYSCALLS commparison: should be i >= MAX_NSYSCALLS

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
9cbc15b7e72b2f108b886f89778ae606c7b6a526 22-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Eliminate MAX_QUALS, make qualifier array dynamic

MAX_QUALS was 2048, even though most arches used less than 500 entries
in it. MAX_QUALS had to be maintained by hand to be higher than syscall
count. It also limited the highest possible fd to track.

This change makes qual_flagsN[] arrays start sized to the required minimum
(number of syscalls) and grow dynamically if user requested
-e read=BIGNUM. As a precaution, BIGNUM should be < 2^15, but this limit
can be raised with no cost for normal strace invocations.

qual_flags is now a define to qual_vec[current_personality].

As a bonus, this patch aliases sysent, errnoent, signalent, ioctlent
names in one-personality arches to their corresponding <foo>0 arrays,
removing one indirection level.

text data bss dec hex filename
244471 700 12928 258099 3f033 strace.t7/strace
244627 680 10860 256167 3e8a7 strace.t8/strace

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
a9fe13c9437707fa132fde4e51a20d88381e7430 22-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Create and use struct_sysent and struct_ioctlent typedefs.

This is a preparatory mass replace patch with no code changes.

The future change will need to typedef sysent to sysent0,
which results in compile failures when "struct sysent" string
gets mangled into "struct sysent0".

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
c1540fe19d0980be3f6a218c91a03983f8a86009 21-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Remove unused QUAL_FAULT code (was used by non-Linux code only).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
a585c9d6416d5ca7e3af3ffd4887205f06f8286d 21-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Use uint8_t for qual_flags[] instead of ints.

Resulting bss reduction is ~6kbytes:

text data bss dec hex filename
245703 700 19072 265475 40d03 strace.t4/strace
245687 700 12928 259315 3f4f3 strace.t5/strace

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
74ec14f968a418691b851cbbfeb0269174c64b08 21-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Eliminate many SCNO_IS_VALID checks

By adding tcp->s_ent pointer tot syscall table entry,
we can replace sysent[tcp->scno] references by tcp->s_ent.
More importantly, we may ensure that tcp->s_ent is always valid,
regardless of tcp->scno value. This allows us to drop
SCNO_IS_VALID(tcp->scno) checks before we access syscall
table entry.

We can optimize (qual_flags[tcp->scno] & QUAL_foo) checks
with a similar technique.

Resulting code shrink:
text data bss dec hex filename
245975 700 19072 265747 40e13 strace.t3/strace
245703 700 19072 265475 40d03 strace.t4/strace

* count.c (count_syscall): Use cheaper SCNO_IN_RANGE() check.
* defs.h: Add "int qual_flg" and "const struct sysent *s_ent"
to struct tcb. Remove "int u_nargs" from it.
Add UNDEFINED_SCNO constant which will mark undefined scnos
in tcp->qual_flg.
* pathtrace.c (pathtrace_match): Drop SCNO_IS_VALID check.
Use tcp->s_ent instead of sysent[tcp->scno].
* process.c (sys_prctl): Use tcp->s_ent->nargs instead of tcp->u_nargs.
(sys_waitid): Likewise.
* strace.c (init): Add compile-time check that DEFAULT_QUAL_FLAGS
constant is consistent with init code.
* syscall.c (decode_socket_subcall): Use tcp->s_ent->nargs
instead of tcp->u_nargs. Set tcp->qual_flg and tcp->s_ent.
(decode_ipc_subcall): Likewise.
(printargs): Use tcp->s_ent->nargs instead of tcp->u_nargs.
(printargs_lu): Likewise.
(printargs_ld): Likewise.
(get_scno): [MIPS,ALPHA] Use cheaper SCNO_IN_RANGE() check.
If !SCNO_IS_VALID, set tcp->s_ent and tcp->qual_flg to default values.
(internal_fork): Use tcp->s_ent instead of sysent[tcp->scno].
(syscall_fixup_for_fork_exec): Remove SCNO_IS_VALID check.
Use tcp->s_ent instead of sysent[tcp->scno].
(get_syscall_args): Likewise.
(get_error): Drop SCNO_IS_VALID check where it is redundant.
(dumpio): Drop SCNO_IS_VALID check where it is redundant.
Use tcp->s_ent instead of sysent[tcp->scno].
(trace_syscall_entering): Use (tcp->qual_flg & UNDEFINED_SCNO) instead
of SCNO_IS_VALID check. Use tcp->s_ent instead of sysent[tcp->scno].
Drop SCNO_IS_VALID check where it is redundant.
Print undefined syscall name with undefined_scno_name(tcp).
(trace_syscall_exiting): Likewise.
* util.c (setbpt): Use tcp->s_ent instead of sysent[tcp->scno].

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
7270de551ca6b3ea097c114005b6b028990ce3dc 21-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> ARM: make it one-personality arch

ARM in fact _is_ one personality.

We had two personalities for it because it has a handful of
syscalls with huge scnos (0x000f00xx).

Extending syscall table to have [0x000f0005] index is of course
not a good idea.

Someone decided to handle that by having a separate personality
just for these syscalls.

But multi-personality arch does a bit more work in other parts.

This patch is another alternative: "move" 0x000f00nn syscalls
down to the entries just above last ordinary syscall,
by manipulating scno if it falls into the 0x000f00xx range.

In order to not worsen genuine undefined scnos' printing,
the code remaps scno back to actual value before printing
"syscall_NNN" string.

* defs.h: Remove multi-reprsonality defines from ARM.
* syscall.c (shuffle_scno): New function.
(undefined_scno_name): New function.
(get_scno): [ARM] Replace personality setting with scno shuffling.
(trace_syscall_entering): Print unknown syscall name using
undefined_scno_name().
(trace_syscall_exiting): Likewise.
* linux/arm/syscallent.h: Add ARM specific syscalls at the end.
* linux/arm/errnoent1.h: Deleted.
* linux/arm/ioctlent1.h: Deleted.
* linux/arm/signalent1.h: Deleted.
* linux/arm/syscallent1.h: Deleted.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
e7030e5a7ef541f0ffda46a2850ef720245f01a5 20-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> arm: shorten syscall table for EABI - no point in storing NULL entries

Also, reformatted ARM code in get_scno(), mostly improved comments,
without code changes.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
2544f988c96a48e48369a767d8886c4282859ed3 19-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Fix compiler warnings

With constant current_wordsize == 4 and 32-bit longs,
gcc was spooked by "1ul << (8 * current_wordsize)" = "1ul << 32".

Make such places conditional on SIZEOF_LONG > 4.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
30c03230a8a5ba41d183279dcd6d0668940267db 19-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Improve comment text. No code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
c956ef085f5685b47bd7a66d0bff5abcb0a50484 16-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Simple optimization in get_error

* defs.h: Define SCNO_IN_RANGE(scno) macro.
* syscall.c (get_error): Change return type to void.
Use SCNO_IN_RANGE instead of SCNO_IS_VALID.
(trace_syscall_exiting): Stop checking get_error() return value.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
5721cdbcdba76eef854a30e7e56e328eae976e44 16-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Mass rename of SCNO_IN_RANGE define to SCNO_IS_VALID

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
48e4c1bf4dcfa9730c4ac4fc9b8d115569ef389b 16-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Finish prefixing regs struct names with arch_

* defs: Rename regs -> sparc_regs.
* signal.c (sys_sigreturn): Use new variable name.
* syscall.c: Rename regs -> sparc_regs, regs -> avr32_regs.
(getrval2): Use new variable names.
(printcall): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
2550d4890eae4d2d32ec6be0185eef6d30ce0124 15-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Use the same type for i386_regs on 32-bit and 64-bit x86.

* defs.h: Stop including <asm/ptrace.h> for x86.
Change i386_regs from "struct pt_regs" to "struct user_regs_struct".
* syscall.c: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
ddd2da2562938ef53d9721f912d3c6137476a0b4 15-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Fix build error on Tile

* syscall.c (get_scno): [TILE] Remove TCB_WAITEXECVE check,
it is never true on Tile, and stopped compiling when
TCB_WAITEXECVE define was removed for Tile.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
6cf36057b3abedf527809fee34df202c71891bce 15-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> x86: zero-extend 32-bit args in syscall entry instead of sign-extension

Zero-extension is slightly more common that sign-extension:
all pointers are zero-extended, and some other params are unsigned.

Whereas signed ones (fds, pids, etc) are often treated as
_32-bit ints_ even by kernel, so just unconditionally casting
such tcp->u_arg[N] to int works.

* syscall.c (get_syscall_args): [X86] Zero-extend 32-bit args
instead of sign-extension.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
ae8643e671db5c574ecba6aa7fe9012f286dc257 15-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> A better handling of current_wordsize

On x86_64:
text data bss dec hex filename
435661 26628 47424 509713 7c711 strace_old
435501 26612 47440 509553 7c671 strace_new_clever_wordsize

On x32 and arm it should be even better, current_wordsize becomes
a constant there.

* defs.h: Declare current_wordsize as a variable if needed,
else declare as a constant define.
Remove declatation of personality_wordsize[].
* syscall.c: Make personality_wordsize[] static.
Declare current_wordsize as a variable if needed.
(set_personality): Set current_wordsize only if non-constant.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
e3b248dd838da5d49c12cd6ca9b2e0644580c9ca 15-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> x86: fix required kernel version for GETREGSET

* syscall.c (get_regs): [X86] Use GETREGSET only if kernel >= 2.6.35

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
492f81f14cc86c13b0f67ac66a3d5ea9f6ccb673 14-Feb-2013 Christian Svensson <blue@cmd.nu> Add support for the OpenRISC 1000 platform

* configure.ac: Added or1k architecture..
* defs.h: Added or1k to use register reading system.
* linux/or1k/ioctlent.h.in: Use i386 ioctls.
* linux/or1k/syscallent.h: New file.
* process.c: Added or1k register defs to struct_user_offsets[].
* syscall.c: Added or1k_io iovec for or1k GETREGSET,
  regset structure for or1k.
  (printcall): Added handling for or1k.
  (get_regs): Likewise.
  (get_scno): Likewise.
  (get_syscall_args): Likewise.
  (get_syscall_result): Likewise.
(get_error): Likewise.
* util.c (change_syscall): Added dummy handling for or1k.
* system.c (sys_or1k_atomic): New function (or1k specific syscall).

Signed-off-by: Christian Svensson <blue@cmd.nu>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
eec8d5d6b028665a73169fda96e4e873cb8351f0 14-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> [X86] Use ptrace(PTRACE_GETREGSET, NT_PRSTATUS) to get registers.

Unlike PTRACE_GETREGS, this new method detects 32-bit processes
reliably, without checking segment register values which
are undocumented and aren't part of any sort of API.
While at it, also fixed x32 detection to use __X32_SYSCALL_BIT,
as it should have been from the beginning.

* defs.h: Declare os_release and KERNEL_VERSION.
* strace.c: Make os_release non-static, remove KERNEL_VERSION define.
* syscall.c: New struct i386_user_regs_struct,
static union x86_regs_union and struct iovec x86_io.
(printcall): Use i386_regs or x86_64_regs depending on x86_io.iov_len.
(get_regs): On x86 and kernels 2.6.30+, use PTRACE_GETREGSET,
on earlier kernels fall back to old method.
(get_scno): [X86] Determine personality based on regset size
on scno & __X32_SYSCALL_BIT.
(syscall_fixup_on_sysenter): Use i386_regs or x86_64_regs depending
on x86_io.iov_len.
(get_syscall_args): Likewise.
(get_error): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
d22213a3eecdeb3d13cf428bd090fdfb0f2a8d7d 13-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Rename some register statics by prefixing their names with arch.

This makes it easier to grep for them.

* syscall.c: Rename variables:
r0 -> bfin_r0,alpha_r0,sh_r0.
a3 -> mips_a3.
r2 -> mips_r2.
(get_scno): Use new variable names.
(get_syscall_result): Likewise.
(get_error): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
ab2f40224279861110114cad81fedadd7abe9b98 12-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Remove stray syscall result reading code on syscall entry for s390

This is a leftover from sysenter/sysexit split.
I can't run-test it, but from code inspection it seems to be correct.

* syscall.c (get_scno): Remove stray syscall result reading for s390[x].

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
afea7dd4a597e15e74ec3de5a78288056296311b 12-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Fix is_negated_errno() check for X32

X32's return value is 64-bit. We were truncating it to 32-bit long
before checking for -errno.

* syscall.c (is_negated_errno_x32): New function.
(get_error): Use is_negated_errno_x32 for X32 architecture.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
59aea0a7d50f19741b95ccba64b45edd7c8d0eab 11-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Preparatory patch for "new" x86 personality detection

* syscall.c: Move PT_FLAGS_COMPAT define to its only user, get_scno().
Rename arm_regs_union's fields to names less likely to collide with
system defines.
(get_regs): Use sizeof(arm_regs_union) instead of sizeof(aarch64_regs).
This should be the same, but htis way it's cleaner.
Remove __X32_SYSCALL_MASK and use __X32_SYSCALL_BIT instead.
Explain 64-bit check in X32 build better.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
7ba8e72bb56243b8a7df949cef8a7d6039d889ac 08-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> S390: stop using needlessly static long pc variable

* syscall.c: Remove "static long pc" variable.
(get_scno): Use an automatic long variable instead of a static.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
28ac68f2ab90e85663ecedcf9b56847290cd1ed4 08-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Optimize AArch64 handling of 32-bit personality

By putting aarch64_regs and arm_regs into a union,
register copying is eliminated.
No need to check and change personality on syscall exit.

* defs.h: Remove unused NUM_ARM_REGS define. Fix indentation.
* syscall.c: Put aarch64_regs and arm_regs into a union.
(update_personality): Shorten bitness message.
(printcall): Add commented-out PC printing.
(get_regs): Remove now-unnecessary 64-to-32 bits register copying.
(get_syscall_result): Drop personality changing code.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
89804ec3e1a5c912474d43438059aef3893d2e82 07-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Rename some register statics by prefixing their names with arch.

This makes it easier to grep for them.

* syscall.c: Make IA64's r8, r10 global variables static.
Rename variables:
r8,r10 -> ia64_r8,ia64_r10.
d0 -> m68k_d0.
a3 -> alpha_a3.
r28 -> hppa_r28.
r9 -> sh64_r9.
r10 -> cris_r10.
r3 -> microblaze_r3.
(get_scno): Use new variable names.
(syscall_fixup_on_sysenter): Likewise.
(get_syscall_result): Likewise.
(get_error): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
401374e9c236751a0bc548bef8fc369a905a4190 06-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Rename ARM's regs structure to arm_regs

Compile-tested.

* defs.h: Rename regs structure to arm_regs.
* syscall.c: Likewise.
(printcall): Use new name instead of old one.
(get_regs): Likewise.
(get_scno): Likewise.
(get_syscall_args): Likewise.
(get_error): Likewise.
* signal.c (sys_sigreturn): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
4bdb6bb7346de8577402d73e71616e8632269261 06-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Stop needlessly using static variable

* syscall.c: Remove static long psr.
(get_scno): Use local psr variable.
(get_syscall_result): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
8d4ca0c8cd81329ad730ab52b1e0653c1bbea803 06-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Shortcut tests for fork/exec syscalls

This change should speed up strace by a tiny bit.

More importantly, it makes it much more clear that
fork and exec fixups are not necessary for any reasonably
recent kernels. IOW: syscall_fixup_for_fork_exec() and its callees
are all dead code.

* defs.h: Declare new need_fork_exec_workarounds flag variable.
* strace.c: Define need_fork_exec_workarounds flag variable.
(test_ptrace_setoptions_followfork): Return 0/1 as success/fail indicator.
(test_ptrace_setoptions_for_all): Likewise.
(init): Set need_fork_exec_workarounds to TRUE if needed.
* syscall.c: Rename internal_syscall() to syscall_fixup_for_fork_exec().
(trace_syscall_entering): Call syscall_fixup_for_fork_exec() only if
need_fork_exec_workarounds == TRUE.
(trace_syscall_exiting): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
af8dc6b3a562193c27c89531e7ac6d94e7c3c322 05-Feb-2013 Chris Metcalf <cmetcalf@tilera.com> tile: fix merge skew with new get_regs architecture

* defs.h [TILE]: Declare clear_regs(), get_regs() and get_regs_error.
* syscall.c (get_regs) [TILE]: Fix merge skew.
(printcall) [TILE]: fix a compiler warning about pt_reg_t in
a printf expression.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/syscall.c
ddba73e4c01e8867886d56c508af2c33cc87dc49 05-Feb-2013 Dmitry V. Levin <ldv@altlinux.org> Print 64-bit instruction pointers zero padded

* syscall.c (printcall): Print 64-bit instruction pointers zero padded.
/external/strace/syscall.c
f0f41cfb1902afe42a728b8cffe878a4a3620def 05-Feb-2013 Dmitry V. Levin <ldv@altlinux.org> x86_64: fix compilation warning introduced in previous commit

* syscall.c (printcall): Cast x86_64_regs.rip to the type being printed.
/external/strace/syscall.c
df39e56d2d53013813a529862da6321222605f58 05-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Simple bug fix for x86_86

* syscall.c (printcall): Use x86_64_regs.rip, not x86_64_regs.ip.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
0b99a8ac3bf6314bc92ab528b3849ab3faf7bf4c 05-Feb-2013 Chris Metcalf <cmetcalf@tilera.com> Add tilegx support to strace

tilegx support has been in the kernel since 3.0.
In addition, fix some issues with the tilepro support already
present in strace, primarily the decision to use the
<asm/unistd.h> numbering space for system calls.

* defs.h [TILE]: Include <asm/ptrace.h> and provide an extern
struct pt_regs tile_regs for efficiency. Provide compat 32-bit
personality via SUPPORTED_PERSONALITIES, PERSONALITY0_WORDSIZE,
PERSONALITY1_WORDSIZE, and DEFAULT_PERSONALITY.
* linux/tile/errnoent1.h: New file, includes linux/errnoent.h.
* linux/tile/ioctlent1.h: New file, includes linux/ioctlent.h.
* linux/tile/signalent1.h: New file, includes linux/signalent.h.
* linux/tile/syscallent.h: Update with new asm-generic syscalls.
The version previously committed was the from the first tile patch
to LKML, which subsequently was changed to use <asm-generic/unistd.h>.
* linux/tile/syscallent1.h: Copy from linux/tile/syscallent.h.
* mem.c (addtileflags) [TILE]: use %ld properly for a "long" variable.
* process.c [TILE]: Choose clone arguments correctly and properly
suppress all "struct user" related offsets in user_struct_offsets.
* signal.c [TILE]: Use tile_regs not upeek.
* syscall.c (update_personality) [TILE]: Print mode.
(PT_FLAGS_COMPAT) [TILE]: Provide if not in system headers.
(tile_regs) [TILE]: Define 'struct pt_regs' variable to hold state.
(get_regs) [TILE]: use PTRACE_GETREGS to set tile_regs rather than using upeek.
(get_scno) [TILE]: Set personality.
(get_syscall_args) [TILE]: Use tile_regs.
(get_syscall_result) [TILE]: Update tile_regs.
(get_error) [TILE]: Use tile_regs.
(printcall) [TILE]: Print pc.
(arg0_offset, arg1_offset, restore_arg0, restore_arg1) [TILE]:
Properly handle tile call semantics and support tilegx.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
4645582edbbc6c3605904634de7bcb9b0b4f0ef2 05-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Small optimization for SPARC[64] get_scno

* syscall.c: Remove static unsigned long trap veriable.
(get_scno): Use local trap variable.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
1ebe08d6136f904c8a5a5e02da7b72749080088b 05-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Do not compile getrval2() if not needed

* syscall.c (getrval2): Do not compile it for architetures where
it isn't ever used.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
ce7d953ebecc10f71e191b6d18cfeb2399429d5f 05-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Optimize out PTRACE_PEEKUSER with -i

strace -i was fetching PC with a separate PEEKUSER
despite having GETREGS data:

ptrace(PTRACE_GETREGS, 22331, 0, 0x8087f00) = 0
ptrace(PTRACE_PEEKUSER, 22331, 4*EIP, [0x80dd7b7]) = 0
write(3, "[080dd7b7] ioctl(0, SNDCTL_TMR_T"..., 82) = 82
ptrace(PTRACE_SYSCALL, 22331, 0, SIG_0) = 0

Now it does this:

ptrace(PTRACE_GETREGS, 22549, 0, 0x8087ea0) = 0
write(3, "[080dd7b7] ioctl(0, SNDCTL_TMR_T"..., 82) = 82
ptrace(PTRACE_SYSCALL, 22549, 0, SIG_0) = 0

Analogous improvement in sys_sigreturn() is also implemented.

* defs.h: Declare extern struct pt_regs regs for SPARC[64] and ARM.
Declare clear_regs(), get_regs() and get_regs_error flag variable.
* strace.c (trace): Call get_regs(pid) as soon as we know the tcb
and that it is stopped.
* syscall.c (get_regs): New function. Used to fetch registers early,
just after tracee has stopped.
(printcall): Move it here from util.c. Use global regs.REG data,
if available on the arch, instead of re-fetching it.
(get_scno): Use global regs.REG data.
(get_syscall_result): Likewise.
* signal.c (sys_sigreturn): Likewise.
* util.c (printcall): Moved to syscall.c.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
890a5cad2321ae72fb5ca1b253edb874b1ca7180 10-Nov-2012 Steve McIntyre <steve.mcintyre@linaro.org> Add support for tracing 32-bit ARM EABI binaries on AArch64

* defs.h [AARCH64]: Copy in the definition of arm_pt_regs and the
accessor macros, so it's possible to build on AArch64 without
ARM system headers. Set SUPPORTED_PERSONALITIES to 2.
Define PERSONALITY0_WORDSIZE and PERSONALITY1_WORDSIZE.
Set DEFAULT_PERSONALITY to 1.
* linux/aarch64/errnoent1.h: New file, includes generic errnoent.h.
* linux/aarch64/ioctlent1.h: New file, includes generic ioctlent.h.
* linux/aarch64/signalent1.h: New file, includes generic signalent.h.
* linux/aarch64/syscallent1.h: Rename from linux/aarch64/syscallent.h.
* linux/aarch64/syscallent.h: New file, includes arm/syscallent.h.
* syscall.c [AARCH64]: Define aarch64_regs.
(update_personality) [AARCH64]: Add debug output.
(get_scno) [AARCH64]: Determine if we're in ARM or AArch64 mode by
checking the size of the returned uio structure from PTRACE_GETREGSET
and interpret the structure accordingly.
(get_syscall_result): Likewise.
(get_syscall_args): Merge the AArch64 and ARM sections so that on
AArch64 we can fall back to supporting the ARM personality.
(get_error): Likewise.

Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
/external/strace/syscall.c
d8d3bd3709eb52581c8ce86cec5a7a9c43c3c5b9 24-Oct-2012 Steve McIntyre <steve.mcintyre@linaro.org> Add AArch64 support to strace

AArch64 has been included in linux from 3.7 onwards.
Add support for AArch64 in strace, tested on linux in a simulator.

* configure.ac: Support AArch64.
* defs.h [AARCH64]: Include <sys/ptrace.h>, define TCB_WAITEXECVE.
* ipc.c (indirect_ipccall): Support AArch64.
* process.c (struct_user_offsets): Likewise.
* syscall.c [AARCH64]: Include <asm/ptrace.h>, <sys/uio.h>, and
<elf.h>. Define struct user_pt_regs regs.
(get_scno, get_syscall_result): Support AArch64 using PTRACE_GETREGSET.
(get_syscall_args, get_error): Support AArch64.
* linux/aarch64/ioctlent.h.in: New file.
* linux/aarch64/syscallent.h: New file, based on linux 3.7 version of
asm-generic/unistd.h.

Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
/external/strace/syscall.c
9679296d56e3c0a948b1b4dcce99fd3c9b253a3d 24-Oct-2012 Namhyung Kim <namhyung.kim@lge.com> Add -e trace=memory option

Add a new 'memory' category for tracing memory mapping related syscalls.

Affected syscalls are: break, brk, get_mempolicy, madvise, mbind,
migrate_pages, mincore, mlock, mlockall, mmap, move_pages, mprotect,
mremap, msync, munlock, munlockall, munmap, remap_file_pages, and
set_mempolicy.

* defs.h (TRACE_MEMORY): New macro.
* syscall.c (lookup_class): Handle trace=memory option.
* strace.1: Document it.
* linux/alpha/syscallent.h: Add TM flag to memory mapping related syscalls.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* 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/tile/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.

Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
/external/strace/syscall.c
b742d8c1b8001dd2b8784f5a123cc8eb08f679ca 18-Sep-2012 Dmitry V. Levin <ldv@altlinux.org> Ignore fflush(3) return value

strace used to honor fflush(3) return value in trace_syscall_entering
which resulted to tracees not being PTRACE_SYSCALL'ed which in turn
caused nasty hangups like this one:

$ strace -o'|:' pwd
|:: Broken pipe

There is little strace can do in case of fflush(3) returning EOF, and
hangup is certainly not the best solution for the issue.

* syscall.c (trace_syscall_entering): Ignore fflush(3) return value.
/external/strace/syscall.c
9a71bcdab254e4cd93b8f1e93c659644eb70ea9b 18-Sep-2012 Dmitry V. Levin <ldv@altlinux.org> Use perror_msg instead of perror

* signal.c (sys_sigreturn): Use perror_msg instead of perror.
* strace.c (tprintf, tprints, detach, startup_attach): Likewise.
* syscall.c (get_scno): Likewise.
* util.c (umoven, umovestr): Likewise.
/external/strace/syscall.c
085e42886052190d3e515ca865546b527f59cdd1 17-Apr-2012 H.J. Lu <hongjiu.lu@intel.com> x32: add ia32 support

* Makefile.am (EXTRA_DIST): Add linux/x32/errnoent1.h,
linux/x32/ioctlent1.h, linux/x32/signalent1.h and
linux/x32/syscallent1.h.
* configure.ac: Remove AC_GNU_SOURCE, obsoleted by
AC_USE_SYSTEM_EXTENSIONS.
* defs.h (SUPPORTED_PERSONALITIES): Set to 2 for X32.
(PERSONALITY1_WORDSIZE): Set to 4 for X32.
* file.c (stat64): New struct for X32.
(sys_lseek32): New function for X32.
(stat64): Undef.
(sys_fstat64): Likewise.
(sys_stat64): Likewise.
(realprintstat64): New function for X32.
(sys_fstat64): Likewise.
(sys_stat64): Likewise.
* mem.c (sys_old_mmap): New function for X32.
* pathtrace.c (pathtrace_match): Also check sys_old_mmap for X32.
* syscall.c (update_personality): Add X32 support.
(get_scno): Support currpers == 1 for X32.
* linux/syscall.h (sys_lseek32): New function prototype for X32.
* linux/x32/errnoent1.h: New file.
* linux/x32/ioctlent1.h: Likewise.
* linux/x32/signalent1.h: Likewise.
* linux/x32/syscallent1.h: Likewise.
/external/strace/syscall.c
35be58119e3727a694d8c9f9b83f372401fcc4c0 16-Apr-2012 H.J. Lu <hongjiu.lu@intel.com> Add x32 support to strace

X32 support is added to Linux kernel 3.4. In a nutshell, x32 is x86-64 with
32bit pointers. At system call level, x32 is also identical to x86-64,
as shown by many changes like "defined(X86_64) || defined(X32)". The
main differerence bewteen x32 and x86-64 is off_t in x32 is long long
instead of long.

This patch adds x32 support to strace. Tested on Linux/x32.

* configure.ac: Support X32.
* defs.h: Set SUPPORTED_PERSONALITIES to 3 for X86_64,
Set PERSONALITY2_WORDSIZE to 4 for X86_64.
Add tcb::ext_arg for X32.
* file.c (stat): New for X32.
(sys_lseek): Use 64-bit version for X32.
(printstat64): Check current_personality != 1 for X86_64.
* ipc.c (indirect_ipccall): Check current_personality == 1
for X86_64.
* mem.c (sys_mmap64): Also use tcp->u_arg for X32. Print NULL
for zero address. Call printllval for offset for X32.
* pathtrace.c (pathtrace_match): Don't check sys_old_mmap for
X32.
* process.c (ARG_FLAGS): Defined for X32.
(ARG_STACK): Likewise.
(ARG_PTID): Likewise.
(change_syscall): Handle X32.
(struct_user_offsets): Support X32.
(sys_arch_prctl): Likewise.
* signal.c: Include <asm/sigcontext.h> for X32.
(SA_RESTORER): Also define for X32.
* syscall.c (update_personality): Support X32 for X86_64.
(is_restart_error): Likewise.
(syscall_fixup_on_sysenter): Likewise.
(get_syscall_args): Likewise.
(get_syscall_result): Likewise.
(get_error): Likewise.
(__X32_SYSCALL_BIT): Define if not defined.
(__X32_SYSCALL_MASK): Likewise.
(get_scno): Check DS register value for X32. Use
__X32_SYSCALL_MASK on X32 system calls.
* util.c (printllval): Use ext_arg for X32.
(printcall): Support X32.
(change_syscall): Likewise.
(arg0_offset): Likewise.
(arg1_offset): Likewise.
* Makefile.am (EXTRA_DIST): Add linux/x32/errnoent.h,
linux/x32/ioctlent.h.in, linux/x32/signalent.h,
linux/x32/syscallent.h, linux/x86_64/errnoent2.h,
linux/x86_64/ioctlent2.h, linux/x86_64/signalent2.h and
linux/x86_64/syscallent2.h.
* linux/x32/errnoent.h: New.
* linux/x32/ioctlent.h.in: Likewise.
* linux/x32/signalent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/errnoent2.h: Likewise.
* linux/x86_64/ioctlent2.h: Likewise.
* linux/x86_64/signalent2.h: Likewise.
* linux/x86_64/syscallent2.h: Likewise.

Signed-off-by: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
dd0130b963151e37cffc8b593bebe3e3de58dfd4 16-Apr-2012 H.J. Lu <hongjiu.lu@intel.com> Restore tcb::u_lrval; fix lseek on MIPS-n32

Linux kernel v3.4 adds x32 support. Both x32 and n32 use 64bit offset
for lseek parameter and return value. We need u_lrval to handle it
properly. Also we shouldn't check HAVE_LONG_LONG_OFF_T for n32 lseek.
This patch fixes it properly and prepares lseek for x32.

* defs.h (tcb): Restore tcb::u_lrval field, RVAL_Lfoo constants.
Set RVAL_MASK to 7.
* file.c (sys_lseek): Print 64bit offset and return RVAL_LUDECIMAL
for n32.
* syscall.c (get_error): Set u_lrval for MIPS-n32.
(trace_syscall_exiting): Handle RVAL_Lfoo return value types.

Signed-off-by: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
4372cc956b7ff1b7e1398d2247e5ac87c4788455 26-Mar-2012 Dmitry V. Levin <ldv@altlinux.org> qual_syscall: fix potential NULL dereference

Fix regression introduced by commit
c1371ebc400fe9578908beca87f2bf407daf1506

* syscall.c (qual_syscall): Handle null sys_name.

Reported-by: Fr. Br. George <george@altlinux.org>
/external/strace/syscall.c
ccee169ab6aa4ae7515198dadcef5dd2286ede4b 25-Mar-2012 Dmitry V. Levin <ldv@altlinux.org> Robustify parsing of numbers from strings

* defs.h (string_to_uint): New prototype.
* util.c (string_to_uint): New function.
* strace.c (error_opt_arg): New function.
(process_opt_p_list): Use string_to_uint instead of atoi.
Terminate in case of invalid process id.
(init): Use string_to_uint instead of atoi.
Use error_opt_arg in case of invalid option argument.
* syscall.c (qual_syscall, qual_signal, qual_desc): Use string_to_uint
instead of atoi.
/external/strace/syscall.c
e4cc7c58dda80d502e5c66c0c91f7df191d540a8 23-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Simple optimizations

Why open-coding isdigit is a good idea?

Before: call __ctype_b_loc
movzbl (%ebx),%edx
mov (%eax),%eax
testb $0x8,0x1(%eax,%edx,2)
je lbl

After: movzbl (%eax),%edx
sub $0x30,%edx
cmp $0x9,%dl
ja lbl

text data bss dec hex filename
236869 704 18944 256517 3ea05 strace.before
236719 700 18944 256363 3e96b strace

* defs.h: Alias sigemptyset to __sigemptyset on glibc.
* syscall.c (qual_syscall): Open-code isdigit.
(qual_desc): Likewise.
(qual_signal): Open-code isdigit. Remove string copying
which was done for no apparent reason.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
a44f9696e45f5bb51c6ec37c0ef95dc2cdfd4c8a 21-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Replace reprinting decision logic

After this change, we no longer need to decide when we need
to set TCB_REPRINT, and when we don't: it's never needed :)

Well, almost. That pesky pid-changing execve needs special treatment.
If not it, it'd be possible to nuke TCB_REPRINT...

While at it, fix a case of mishandled -C.

* strace.c (printleader): Do not set TCB_REPRINT.
(trace): Set TCB_REPRINT only for execve with changing pid.
Fix mishandling of -C.
* syscall.c (trace_syscall_entering): Do not clear TCB_REPRINT.
(trace_syscall_exiting): Replace reprinting decision logic.
Remove call to printargs(): it is known to just return 0 here.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
907735aec82dd8d863b77839ce69508711703b4b 21-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Eliminate redundant checks of res variable

* syscall.c (trace_syscall_entering): Eliminate redundant checks of res variable.
(trace_syscall_exiting): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
46dc8b22067b1dd1d7d570265861223c85ca079e 21-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Rename POWERPC-specific static variable result to ppc_result

* syscall.c: Rename POWERPC-specific static variable result to ppc_result.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
bb6bb5c17992bbfdff902a4729296d0ddb4aa54a 20-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Remove redundant checks in syscall entry/exit, rename badly named function

* syscall.c (syscall_enter): Rename to get_syscall_args.
Document its return values.
(trace_syscall_entering): Don't check get_syscall_args() return
value for 0, it never returns that.
(syscall_fixup_on_sysexit): Make it return void.
(trace_syscall_exiting): Fix up syscall_fixup_on_sysexit()
call site accordingly.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
b7a6dae9fb15cd9f71d72861097c6c0e8608e88e 20-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Trivial tweaks. No logic changes

* process.c (sys_ptrace): Remove unneeded line wrapping.
* syscall.c (trace_syscall_entering): Use tprints() instead of tprintf().

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
9fd4f96d2a2527ac7ca90c156bfc11ce10118684 19-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Optimize code if we have only one personality

On i386:
text data bss dec hex filename
238025 672 18980 257677 3ee8d strace.before
237389 704 18944 257037 3ec0d strace

* defs.h: Define PERSONALITY0_WORDSIZE as sizeof(long) if not defined.
Introduce new define, current_wordsize as
(personality_wordsize[current_personality]).
Make set_personality() no-op, current_personality constant zero,
current_wordsize as PERSONALITY0_WORDSIZE if we have only one personality.
* count.c (call_summary): Use current_wordsize instead of
personality_wordsize[current_personality].
* desc.c (printflock): Likewise.
* file.c (sys_utime): Likewise.
* io.c (tprint_iov): Likewise.
* process.c (printargv): Likewise.
* resource.c (decode_rlimit): Likewise.
* signal.c (sys_kill): Likewise.
(sys_rt_sigaction): Likewise.
* time.c (sprinttv): Likewise.
(sprint_timespec): Likewise.
(printitv_bitness): Likewise.
(tprint_timex): Likewise.
(printsigevent): Likewise.
* util.c (dumpiov): Likewise.
(umoven): Likewise.
(umovestr): Likewise.
* syscall.c: Initialize sysent to sysent0 etc.
Make current_personality, personality_wordsize[], set_personality()
conditional on SUPPORTED_PERSONALITIES > 1.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
146b944d4a968c2922f4220d33219ed3534f50d0 18-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Make internal_fork and internal_exec static

text data bss dec hex filename
237917 672 18980 257569 3ee21 strace
237845 672 18980 257497 3edd9 strace_new

* defs.h: Remove declarations of internal_fork and internal_exec.
* process.c: Remove definitions of internal_fork and internal_exec.
* syscall.c: Move them here.
(internal_syscall): Return void instead of int. We were always
returning zero, and callers weren't checking it anyway.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
f50e7141d5b5aedafa220d851a8b6afe753d679a 18-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Remove code which is not used on Linux

Compile tested in qemu on armv4l,armv4tl,armv5l,armv6l,i686,
mipsel,mips,x86_64

* syscall.c: Remove code which handles RVAL_Lfoo constants.
* defs.h: Remove struct tcb::u_lrval member - it is never set.
Remove RVAL_Lfoo constants which signify return of "long" result -
they are never used.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
3da9693b81db07da14e3e3364f81a6f4d4c26597 17-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Remove unused constants. No code changes

* syscall.c: Remove unused ENOIOCTLCMD constant. Fix indentation.
* util.c: Remove unused CLONE_STOPPED constant.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
a6d91ded3f2d5401e09a9c2fa442aabfbfe593a8 16-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Tidy up includes and copyright notices, fix indentation

The files not mentioned in changelog below had only
copyright notices fixes and indentation fixes.

* defs.h: Include <stdint.h> and <inttypes.h>.
* file.c: Do not include <inttypes.h>.
Move struct kernel_dirent declaration below top include block.
* block.c: Do not include <stdint.h> and <inttypes.h>.
* quota.c: Likewise.
* desc.c: Likewise.
* signal.c: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
648c22c4b39c489a2409821aaee807357faf60f8 15-Mar-2012 Dmitry V. Levin <ldv@altlinux.org> Remove unused code

* syscall.c (subcall_style, decode_subcall): Remove.
[SYS_socket_subcall] (decode_socket_subcall): New function, based on
decode_subcall in deref_style.
[SYS_ipc_subcall] (decode_ipc_subcall): New function, based on
decode_subcall in shift_style.
(trace_syscall_entering): Use decode_socket_subcall and
decode_ipc_subcall instead of decode_subcall.
/external/strace/syscall.c
3362e89f66acde52605c654d904b2aebceb92297 15-Mar-2012 Mike Frysinger <vapier@gentoo.org> improve ifdef check with decode_subcall

Use the same ifdef logic around the call sites of decode_subcall()
to protect the definition of the func itself. This fixes warnings
for targets like hppa which don't use this func.

* syscall.c (decode_subcall): Wrap in SYS_socket_subcall and
SYS_ipc_subcall define checks.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
/external/strace/syscall.c
bcde70adbcff01af4a0675d2fd9d9522807d573e 15-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Remove extra include directives. No code changes.

* defs.h: Include <signal.h> unconditionally.
Other files were doing it unconditionally, so no harm done.
* bjm.c: Remove system includes which are already included by defs.h.
* pathtrace.c: Likewise.
* process.c: Likewise.
* signal.c: Likewise.
* strace.c: Likewise.
* stream.c: Likewise.
* syscall.c: Likewise.
* system.c: Likewise.
* util.c: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
a50d2a87a1a8df4471bbd93f2ce9ef0541b1124b 15-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Tidy up order of includes; make bool variables explicit.

Bool variables are more compact in data and (on x86) on code too:

text data bss dec hex filename
237950 676 19044 257670 3ee86 strace.before
237838 676 19012 257526 3edf6 strace

* defs.h: Group library includes at the top of the file.
Rename dtime to Tflag, debug to debug_flag.
Change debug_flag,Tflag,qflag,not_failing_only,show_fd_path,tracing_paths
variable declarations from int to bool.
* strace.c: Change corresponding definitions. Do the same for static
variables iflag,rflag,print_pid_pfx.
Rename dtime to Tflag, debug to debug_flag.
* syscall.c: Rename dtime to Tflag, debug to debug_flag.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
c96fdfae971b73f63de8dfb814c2148f88fc4086 15-Mar-2012 Mike Frysinger <vapier@gentoo.org> ppc64: drop unused pid variable

* syscall.c (get_scno) [POWERPC64]: Delete unused pid variable.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
/external/strace/syscall.c
7de265d88a78a27d58c2c728424e5bb8379ef351 13-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Fix logging for "strace -o FILE -ff test/threaded_execve" test case

Our logic which was deciding whether to print "<unfinished ...>"
thingy wasn't working properly for -ff case.

* defs.h: Group log generation-related declarations together.
Add a large comment which explains how it works.
Add declaration of line_ended() function.
* strace.c (line_ended): New function which sets up internal data
to indicate that previous line was finished.
(printleader): Change logic to fix log generation in -ff mode.
(newoutf): Make check for -ff mode consistent with other places.
(droptcb): Print "<detached ...>" if last line for this tcp wasn't finished.
(cleanup): Remove code to print "<unfinished ...>", printleader()
or detach() will do it instead.
(trace): Remove code to print "<unfinished ...>".
Add code which finishes threaded execve's incomplete line
with " <pid changed to PID ...>" message. Replace printing_tcp = NULL
followed by fflush() by line_ended() call.
* process.c (sys_exit): Call line_ended() to indicate that we finished priting.
* syscall.c (trace_syscall_exiting): Set printing_tcp to current tcp.
Call line_ended() to indicate that we finished priting.
Remove call to fflush(), it is done by line_ended() now.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
4c65c44478f1591d96cda425d78451334fe1d401 08-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Trivial tweaks to error messages

* strace.c (test_ptrace_setoptions_followfork): Use kill_save_errno
instead of kill.
(trace): Use perror_msg instead of perror.
* count.c (set_sortby): Use error_msg_and_die instead of fprintf.
* syscall.c (qualify): Likewise.
* util.c (ptrace_restart): Expand error message.
(umoven): Likewise.
(umovestr): Likewise.
(upeek): Use perror_msg instead of sprintf + perror.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
72879c6a35cd5afa7f58ee7bc32e4dcd8e65bd9a 27-Feb-2012 Denys Vlasenko <vda.linux@googlemail.com> Alias a few more syscall printing functions

text data bss dec hex filename
237384 672 19044 257100 3ec4c strace.before
236448 672 19044 256164 3e8a4 strace

* defs.h: Declare new functions printargs_lu(), printargs_ld()
which simply print syscall all args as unsigned or signed longs.
* desc.c (sys_epoll_create): Call printargs_ld() instead of open-coding it.
* linux/syscall.h: Remove declarations of the following functions:
sys_alarm, sys_getresgid, sys_getsid, sys_nice, sys_setgid, sys_setpgid,
sys_setpgrp, sys_setregid, sys_setresgid.
* process.c (sys_setgid): Delete this function: now aliased to sys_setuid().
(sys_getresgid): Delete this function: now aliased to sys_getresuid().
(sys_setregid): Delete this function: now aliased to sys_setreuid().
(sys_setresgid): Delete this function: now aliased to sys_setresuid().
(sys_setpgrp): Delete this function: now aliased to printargs_lu().
(sys_getsid): Likewise.
(sys_setpgid): Likewise.
(sys_alarm): Likewise.
(sys_getpgrp): Delete this function: was unused - was already shadowed
by a define in linux/dummy.h.
(sys_setsid): Likewise.
(sys_getpgid): Likewise.
* resource.c (sys_nice): Delete this function: now aliased to printargs_ld().
* linux/dummy.h: Define new aliases (see above for the list).
* syscall.c (printargs_lu): New function.
(printargs_ld): New function.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
e83e157021177930b64ec4aa4983bbe13b39e91b 25-Feb-2012 Dmitry V. Levin <ldv@altlinux.org> Compress blank lines

Suppress repeated empty lines left after automated code removal.
This change was made by filtering every source code file through
"cat -s".
/external/strace/syscall.c
523635f4da8c963f96d9a41cad9fe55ab131aece 25-Feb-2012 Denys Vlasenko <vda.linux@googlemail.com> Reindent preprocessor directives in syscall.c; fix style.

* syscall.c: Fix indentation of preprocessor directives broken by
automatic removal of non-Linux code. Fix style to use consistent
defined(FOO) instead of defined (FOO).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
8470374cba7df0e70653d95c4f336a4082c68d82 25-Feb-2012 Denys Vlasenko <vda.linux@googlemail.com> Cleanup after non-Linux code removal.

Conditions such as defined(LINUX) are always true now,
defined(FREEBSD) etc are always false.
When if directive has them as subexpressions, it can be simplified.
Another trivial changes here are fixes for directive indentation.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
ed720fda5d515f1359fcd3242223e553d1216789 25-Feb-2012 Denys Vlasenko <vda.linux@googlemail.com> Automated removal of non-Linux code

This change is generated by running every source through the following command:

unifdef -DLINUX -Dlinux -USUNOS4 -USVR4 -UUNIXWARE -UFREEBSD
-USUNOS4_KERNEL_ARCH_KLUDGE -UHAVE_MP_PROCFS
-UHAVE_POLLABLE_PROCFS -UHAVE_PR_SYSCALL -UUSE_PROCFS file.c

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
44824b9d4b05ba81d722f586b6e2803e7d18ca7b 20-Feb-2012 Dmitry V. Levin <ldv@altlinux.org> Eliminate native_scno and known_scno

* defs.h (known_scno): Remove.
(sysent): Remove native_scno field.
* process.c [IA64]: Replace known_scno(tcp) with tcp->scno.
(internal_fork) [USE_PROCFS || !LINUX]: Likewise.
* syscall.c: Do not define NR_SYSCALL_BASE.
(known_scno): Remove.
(syscall_fixup_on_sysenter) [USE_PROCFS]: Replace known_scno(tcp)
with tcp->scno.
(trace_syscall_entering) [SVR4 || FREEBSD || SUNOS4]: Likewise.
(syscall_fixup_on_sysexit) [SUNOS4]: Likewise.
/external/strace/syscall.c
b5e88d43a80dad1c7af987d40edef14f69cff8ed 20-Feb-2012 Dmitry V. Levin <ldv@altlinux.org> Do not use SYS_ipc and SYS_socketcall

* linux/dummy.h (sys_ipc, sys_socketcall): Remove redirections to
printargs.
* linux/ia64/syscallent.h: Likewise.
* linux/i386/syscallent.h: Remove native_scno initialization for "ipc"
and "socketcall".
* linux/syscall.h (sys_ipc, sys_socketcall): New prototypes.
(SYS_ipc, SYS_socketcall): Remove no longer used constants.
[IA64]: Remove undefining of ipc and socket SYS_* constants.
[SPARC || SPARC64]: Remove unused ipc SYS_* constants.
* ipc.c (sys_ipc): New function.
* sock.c (sys_socketcall): Likewise.
* syscall.c (trace_syscall_entering): Use sys_func to check for ipc and
socket subcalls.
/external/strace/syscall.c
309edeb2e1907d662330ec1b14290ab609e4d112 04-Feb-2012 Dmitry V. Levin <ldv@altlinux.org> Remove unused sys_pread64 and sys_pwrite64 parsers on Linux

* io.c [HAVE_LONG_LONG_OFF_T]: Remove sys_pread64 and sys_pwrite64
aliases.
(sys_pread64, sys_pwrite64): Define these functions only on
[SVR4 && _LFS64_LARGEFILE] platform.
* linux/mips/syscallent.h: Use sys_pread and sys_pwrite to handle
appropriate syscalls.
* linux/syscall.h (sys_pread64, sys_pwrite64): Remove.
* syscall.c (dumpio): Check sys_pread64 and sys_pwrite64 only on
[SVR4 && _LFS64_LARGEFILE] platform.
/external/strace/syscall.c
ea051f75331ee4c7a44d5449a2d136288314879a 28-Jan-2012 Denys Vlasenko <vda.linux@googlemail.com> Fix nanosleep decoding: second argument was not shown after success

* time.c (sys_nanosleep): Fix bug - inverted is_restart_error() check.
* syscall.c (is_restart_error): Remove redundant check.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
000b601439d249a4afa2ceb6096850a702612d1e 28-Jan-2012 Denys Vlasenko <vda.linux@googlemail.com> Fix a case of broken output if last seen syscall was exit

* defs.h: Rename tcp_last to printing_tcp. Explain what it means.
Remove printtrailer() function.
* process.c (sys_exit): Convert printtrailer() call to "printing_tcp = NULL".
* strace.c: Add new variable printing_tcp.
(cleanup): Convert printtrailer() call to "printing_tcp = NULL".
(trace): Likewise.
(trace): Fix checks for incomplete line - it was working wrongly if last syscall was exit.
(printleader): Set printing_tcp.
(printtrailer): Remove this function.
* syscall.c: Remove tcp_last variable.
(trace_syscall_entering): Don't set printing_tcp, printleader call now does it.
(trace_syscall_exiting): Convert printtrailer() call to "printing_tcp = NULL".

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/syscall.c
e73a89d99921f7b9dc3f1350a4eb97c7fdc6032a 18-Jan-2012 Denys Vlasenko <dvlasenk@redhat.com> Change x86_64_regs struct type from pt_regs to user_regs_struct

* syscall.c: Change x86_64_regs struct type from
pt_regs to user_regs_struct, and explain the change in comment.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
024cad9a25bd11abc05525ab58b33cb570e29464 17-Jan-2012 Dmitry V. Levin <ldv@altlinux.org> Fix struct pt_regs declaration on i386 and x86-64

* defs.h [I386] (i386_regs): Replace definition with declaration.
[X86_64] (x86_64_regs): Remove.
* syscall.c [X86_64] (x86_64_regs): Make static.
/external/strace/syscall.c
fe585656f8d0c6ac7298df22fce0d9ee0935e264 12-Jan-2012 Denys Vlasenko <dvlasenk@redhat.com> Make ERESTARTxyz messages more descriptive

There is widespread confusion about exact meaning
of ERESTARTxyz codes. Before this change, we were showing
all four of them the same: as "(To be restarted)".

This change prints better explanations for these codes,
and contains verbose comments which explain *why* we display
codes that way - or else someone confused
is bound to come later and mangle them again.
New messages are:

ERESTARTSYS (To be restarted if SA_RESTART is set)
ERESTARTNOINTR (To be restarted)
ERESTARTNOHAND (Interrupted by signal)
ERESTART_RESTARTBLOCK (Interrupted by signal)

* syscall.c (trace_syscall_exiting): Make ERESTARTxyz messages
more descriptive.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
b11322fd3c8d291061d69e40e28004b97b91b15d 10-Jan-2012 Denys Vlasenko <dvlasenk@redhat.com> Display mask on enter to sigreturn, not on exit

sys_sigreturn() performs ugly manipulations in order to show
signal mask which is restored by this syscall: on syscall entry,
fetches it from the stack, saves it in tcp->u_arg[]
(where it used to overflow this array - fixed sometime ago),
then retrieves the mask and displays it on syscall exit.

Apparently, the motivation is to make it slightly more obvious
to user that signal mask is restored only when this syscall returns.
IMO, this hardly justifies the necessary hacks. It is much easier
to display the mask at the point when we fetch it - on syscall entry.

While at it, I made it so that we do display returned value/errno.
I see no point in hiding it and showing uninformative "= ?" instead.

Example of pause() being interrupted by ALRM which has installed handler
which re-arms ALRM:

Before the patch:

rt_sigsuspend([INT]) = ? ERESTARTNOHAND (To be restarted)
--- {si_signo=SIGALRM, si_code=SI_KERNEL} (Alarm clock) ---
alarm(1) = 0
sigreturn() = ? (mask now [INT])

After:

rt_sigsuspend([INT]) = ? ERESTARTNOHAND (To be restarted)
--- {si_signo=SIGALRM, si_code=SI_KERNEL} (Alarm clock) ---
alarm(1) = 0
sigreturn() (mask [INT]) = -1 EINTR (Interrupted system call)

* defs.h: Declare struct pt_regs i386_regs and struct pt_regs x86_64_regs.
* syscall.c: Remove "static" keywork from these structures' definitions.
* signal.c (sys_sigreturn): Display mask on enter, not on exit.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
a5a839a920da9d54c4174ebc82b29d7718839029 23-Dec-2011 Dmitry V. Levin <ldv@altlinux.org> Enhance personality switching

On syscall entry, save current personality in the tcb structure
along with scno.
On syscall exit, restore current personality from the tcb structure.
* defs.h (struct tcb) [SUPPORTED_PERSONALITIES > 1]: Add currpers
field.
* strace.c (alloc_tcb) [SUPPORTED_PERSONALITIES > 1]: Initialize
tcp->currpers.
* syscall.c (update_personality) [SUPPORTED_PERSONALITIES > 1]: New
function.
(get_scno, trace_syscall_exiting): Use it.

Reported-by: Michael A Fetterman <mafetter@nvidia.com>
/external/strace/syscall.c
60fe8c139c6f2febefe595781812ddf0864a6ab8 01-Sep-2011 Denys Vlasenko <dvlasenk@redhat.com> Use tprints with literal strings, it may be faster than tprintf

* bjm.c: Replace tprintf("str") with tprints("str").
* block.c: Likewise.
* desc.c: Likewise.
* file.c: Likewise.
* io.c: Likewise.
* ipc.c: Likewise.
* mem.c: Likewise.
* net.c: Likewise.
* proc.c: Likewise.
* process.c: Likewise.
* quota.c: Likewise.
* resource.c: Likewise.
* scsi.c: Likewise.
* signal.c: Likewise.
* sock.c: Likewise.
* strace.c: Likewise.
* stream.c: Likewise.
* syscall.c: Likewise.
* system.c: Likewise.
* term.c: Likewise.
* time.c: Likewise.
* util.c: Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
5940e6593911dcace424c668a1c0934c71fccb9e 01-Sep-2011 Denys Vlasenko <dvlasenk@redhat.com> Fix "format not a string literal" warning caused by tprintf(str)

* defs.h: Declare tprints().
* strace.c: Define tprints().
(tabto): Use tprints(str), since tprintf(str) was throwing a warning.
* desc.c: Use tprints(str) instead of tprintf("%s", str).
* file.c: Likewise.
* io.c: Likewise.
* net.c: Likewise.
* process.c: Likewise.
* signal.c: Likewise.
* syscall.c: Likewise.
* util.c: Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
1d46ba57a8ab16b353b531f2bbefe2ad7f354ca9 31-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Make out-of-memory handling more uniform

This fixes one real bug in dumpstr().

* defs.h: Declare die_out_of_memory().
* strace.c (die_out_of_memory): New function.
(strace_popen): If allocation fails, call die_out_of_memory().
(main): Likewise.
(expand_tcbtab): Likewise.
(rebuild_pollv): Likewise.
* count.c (count_syscall): Likewise.
(call_summary_pers): Likewise.
* desc.c (decode_select): Likewise.
* file.c (sys_getdents): Likewise.
(sys_getdents64): Likewise.
(sys_getdirentries): Likewise.
* pathtrace.c (pathtrace_match): Likewise.
* syscall.c (qualify): Likewise.
* util.c (printstr): Likewise.
(dumpiov): Likewise.
(dumpstr): Likewise.
(fixvfork): Likewise.
* mem.c (sys_mincore): Don't check free() parameter for NULL.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
b5b2589231847905229d78588316e708cbd03af1 30-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Small optimization on AVR32

* syscall.c (syscall_enter): Optimize tcp->u_arg[i] setting
from regs.FOO for AVR32.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
eb0e3e8f501b8519594d57caf2632581b3031c50 30-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> On X86_64 and I386, use PTRACE_GETREGS to fetch all registers

Before this change, registers were read with PTRACE_PEEKUSER
ptrace operation, one per register. This is slower than
fetching them all in one ptrace operation.

* defs.h: include asm/ptrace.h on X86_64 and I386.
* syscall.c: New static variables i386_regs and x86_64_regs.
Remove static eax/rax variables.
(get_scno): Fetch all registers with single PTRACE_GETREGS operation.
(get_syscall_result): Likewise.
(syscall_fixup_on_sysenter): Use PTRACE_GETREGS results in i386/x86_64_regs.
(syscall_enter): Set tcp->u_arg[i] from PTRACE_GETREGS results.
(get_error): Set tcp->u_rval, tcp->u_error from PTRACE_GETREGS results.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
8b4454cba79445651050ea84bb411e5265d4651e 25-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Rename syscall_fixup to syscall_fixup_on_sysenter

* defs.h: Tweak comment.
* syscall.c: Rename syscall_fixup to syscall_fixup_on_sysenter.
(trace_syscall_entering): Use new finction name.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
f20bff6a7397cae272b8bee76a31c4163d8a8a43 25-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Make syscall result reading more consistent among different arches

* syscall.c: Eliminate static flags variable for POWERPC.
(syscall_fixup): Don't fetch syscall results. Affected arches:
POWERPC, BFIN, HPPA.
(syscall_fixup_on_sysexit): Move syscall results fetching code
for this function to get_syscall_result. Affected arches:
S390X, POWERPC, BFIN, M68K, HPPA, CRIS, MICROBLAZE.
(get_syscall_result): Add syscall results fetching.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
ece9879797bd507e87238274e3b2931380ad6b42 25-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Simplify syscall_fixup[_on_sysexit]

* syscall.c (syscall_fixup): Remove checks for entering(tcp).
Remove code which executes if exiting(tcp).
(syscall_fixup_on_sysexit): Remove code which executes
if entering(tcp). Remove checks for exiting(tcp).

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
20c41fd91dfa0057e9f3de4bde51620c138e7706 25-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Split syscall_fixup into enter/exit pair of functions

* syscall.c: Create syscall_fixup_on_sysexit() which is a copy of
syscall_fixup().
(trace_syscall_exiting): Call syscall_fixup_on_sysexit() instead of
syscall_fixup().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
102ec4935440ff52a7fa3566154a84cc2473f16a 25-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Optimize tabto()

tabto is used in many lines of strace output.
On glibc, tprintf("%*s", col - curcol, "") is noticeably slow
compared to tprintf(" "). Use the latter.
Observed ~15% reduction of time spent in userspace.

* defs.h: Drop extern declaration of acolumn. Make tabto()
take no parameters.
* process.c (sys_exit): Call tabto() with no parameters.
* syscall.c (trace_syscall_exiting): Call tabto() with no parameters.
* strace.c: Make acolumn static, add static char *acolumn_spaces.
(main): Allocate acolumn_spaces as a string of spaces.
(printleader): Call tabto() with no parameters.
(tabto): Use simpler method to print lots of spaces.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
fabaa91ab6df17ad7367c2768a13a5d622840656 25-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> * syscall.c (sys_indir): Use %ld for printing long, not %u.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
cb6f056004a10d5c3ed0341366e3ddeb53cac5e6 25-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Opotimize "scno >= 0 && scno < nsyscalls" check

gcc can't figure out on its own that this check can be done with
single compare, and does two compares. We can help it by casting
scno to unsigned long: ((unsigned long)(scno) < nsyscalls)

* defs.h: New macro SCNO_IN_RANGE(long_var).
* count.c (count_syscall): Use SCNO_IN_RANGE() instead of open-coded check.
* syscall.c (getrval2): Use SCNO_IN_RANGE() instead of open-coded check.
This fixes a bug: missing check for scno < 0 and scno > nsyscalls
instead of scno >= nsyscalls.
(get_scno): Use SCNO_IN_RANGE() instead of open-coded check.
This fixes a bug: scno > nsyscalls instead of scno >= nsyscalls.
(known_scno): Use SCNO_IN_RANGE() instead of open-coded check.
(internal_syscall): Likewise.
(syscall_enter): Likewise.
(trace_syscall_entering): Likewise.
(get_error): Likewise.
(trace_syscall_exiting): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
1a5b5a7aff28a5c8bdafc6104508f553f50977a4 25-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Remove scno_good logic in syscall exit

* syscall.c (trace_syscall_exiting): Remove scno_good logic,
it can't trigger in syscall exit.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
684fb1ae3caa2586ed8119d8468ed3f42a9e4a40 25-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Remove redundant assignments

* syscall.c (get_error): Remove redundant "u_error = 0" and redundant
and unclear comments.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
a614692fb082294ae3d3c7f6c1ed26b355d6c4bf 24-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Reorder functions in syscall.c. No code changes.

Old order (basically "in no particular order"):
dumpio
decode_subcall
internal_syscall
get_scno
get_syscall_result
known_scno
syscall_fixup
is_negated_errno
get_error
syscall_enter
trace_syscall_entering
trace_syscall_exiting
trace_syscall
printargs
getrval2
sys_indir
is_restart_error

New order:
various utility functions:
decode_subcall
printargs
getrval2
sys_indir
is_restart_error
syscall enter handling functions:
get_scno
known_scno
syscall_fixup (also used in syscall exit code)
internal_syscall (also used in syscall exit code)
syscall_enter
trace_syscall_entering
syscall exit handling functions:
get_syscall_result
is_negated_errno
get_error
dumpio
trace_syscall_exiting
main syscall enter/exit function:
trace_syscall

* syscall.c: Reorder functions so that related ones are closer
in the source.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
06602d99b72564e77600fc7c94e9ce8b78ec7085 24-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Rename some functions, delete unused one. No code changes

* defs.h: Rename get_scno_on_sysenter() to get_scno();
delete force_result() declaration.
* strace.c (proc_open): Rename get_scno_on_sysenter() to get_scno().
* syscall.c: Rename get_scno_on_sysenter() to get_scno().
Rename get_scno_on_sysexit() to get_syscall_result().
Delete unused force_result().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
2ce12ed31c2b46260b8fd140bfe8d6c30bc0eb29 24-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Unify per-architecture post-execve SIGTRAP check.

Move post-execve SIGTRAP check from get_scno_on_sysenter
(multitude of places on many architectures) to a single location
in trace_syscall_entering. This loosens the logic for some arches,
since many of them had additional checks such as scno == 0.
However, on non-ancient Linux kernels we should never have post-execve
SIGTRAP in the first place, by virtue of using PTRACE_O_TRACEEXEC.

* syscall.c (get_scno_on_sysenter): Remove tcp->flags & TCB_WAITEXECVE checks.
(trace_syscall_entering): Do tcp->flags & TCB_WAITEXECVE check here.
(get_scno_on_sysexit): Tweak comment.
(syscall_fixup): Likewise.
(trace_syscall_exiting): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
18beb98fadbe43c3947cbdcc90d4f72d3a720b78 24-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Speed up x86 by avoiding EAX read on syscall entry

on x86, EAX read on syscall entry is not necessary if we know
that post-execve SIGTRAP is disabled by PTRACE_O_TRACEEXEC ptrace option.
This patch (a) moves EAX retrieval from syscall_fixup
to get_scno_on_sysexit, and (b) perform EAX retrieval in syscall_fixup
only if we are in syscall entry and PTRACE_O_TRACEEXEC option is not on.

* syscall.c (get_scno_on_sysexit): On I386 and X86_64, read eax/rax
which contain syscall return value.
(syscall_fixup): On I386 and X86_64, read eax/rax only on syscall enter
and only if PTRACE_O_TRACEEXEC is not in effect.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
77a7459536f38dd35364c24719ce5ca5cd6b76bc 24-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Do not read syscall no in get_scno_on_sysexit

* syscall.c (get_scno_on_sysexit): Remove scno retrieval code, since
we don't save it anyway. This is the first real logic change
which should make strace faster: for example, on x64 ORIG_EAX
is no longer read in each syscall exit.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
8cd1acd46f20b9a8a17c3353141de00bc877c0f1 24-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Simplify get_scno_on_sysenter/sysexit

* syscall.c (get_scno_on_sysenter): Remove "if (exiting(tcp))" code,
make "if (entering(tcp))" code unconditional.
(get_scno_on_sysexit): Remove "if (entering(tcp))" code,
make "if (exiting(tcp))" code unconditional.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
9a36ae5e886794865623b0d3d4f0d10bf541f32d 24-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> get_scno is an unholy mess, make it less horrible

Currently, get_scno does *much* more than "get syscall no".
It checks for post-execve SIGTRAP. It checks for changes
in personality. It retrieves params on entry and registers on exit.
Worse still, it is different in different architectures: for example,
for AVR32 regs are fetched in get_scno(), while for e.g. I386
it is done in syscall_enter().

Another problem is that get_scno() is called on both syscall entry and
syscall exit, which is stupid: we don't need to know scno on syscall
exit, it is already known from last syscall entry and stored in
tcp->scno! In essence, get_scno() does two completely different things
on syscall entry and on exit, they are just mixed into one bottle, like
shampoo and conditioner.

The following patches will try to improve this situation.

This change duplicates get_scno into identical get_scno_on_sysenter,
get_scno_on_sysexit functions. Call them in syscall enter and syscall
exit, correspondingly.

* defs.h: Rename get_scno to get_scno_on_sysenter; declare it only
if USE_PROCFS.
* strace.c (proc_open): Call get_scno_on_sysenter instead of get_scno.
* syscall.c (get_scno): Split into two (so far identical) functions
get_scno_on_sysenter and get_scno_on_sysexit.
(trace_syscall_entering): Call get_scno_on_sysenter instead of get_scno.
(trace_syscall_exiting): Call get_scno_on_sysexit instead of get_scno.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
5f731c4e1b67390bbddb3e868d36e1790f0a7aec 23-Aug-2011 Dmitry V. Levin <ldv@altlinux.org> Reduce code redundancy in syscall_enter()

* syscall.c [LINUX] (syscall_enter): Move tcp->u_nargs initialization
from arch-specific ifdefs to common code. Always cache tcp->u_nargs in
a local variable and use it in for() loops.
[IA64, AVR32] Rewrite tcp->u_arg[] initialization using a loop.
/external/strace/syscall.c
4b887a5a9a9892f064b238c8672fb89f42c8d5e0 23-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Cache tcp->u_nargs in a local variable for for() loops

Loops of the form "for (i = 0; i < tcp->u_nargs; i++) ..."
need to fetch tcp->u_nargs from memory on every iteration
if "..." part has a function call (gcc doesn't know that
tcp->u_nargs won't change). This can be sped up
by putting tcp->u_nargs in a local variable, which might
go into a CPU register.

* syscall.c (decode_subcall): Cache tcp->u_nargs in a local variable
as for() loop limit value.
(syscall_enter): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
afc64037e22cc7cafadba766286e32550d9e8feb 23-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Drop checks for sysent[i].nargs == -1

* defs.h: Declare nsyscalls, nerrnos, nioctlents, nsignals as unsigned.
* syscall.c: Define nsyscalls, nerrnos, nioctlents, nsignals as unsigned.
(decode_subcall): Drop checks for sysent[i].nargs == -1.
(syscall_enter): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
ac1ce77a23b4f4eecb6768f118259499308fce1c 23-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Stop using nargs == -1 in syscallent tables

Usage -1 as argument count in syscallent tables
necessitates the check for it, a-la:
if (sysent[tcp->scno].nargs != -1)
tcp->u_nargs = sysent[tcp->scno].nargs;
else
tcp->u_nargs = MAX_ARGS;
which is stupid: we waste cycles checking something which
is constant and known at compile time.

* defs.h: Make struct sysent::nargs unsigned.
* freebsd/i386/syscallent.h: Replace nargs of -1 with MA.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* svr4/syscallent.h: Likewise.
* freebsd/syscalls.pl: Likewise in generator script.
* syscallent.sh: Likewise in generator script.
* syscall.c: Add define MA MAX_ARGS / undef MA around includes
of syscallent[N].h.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
ed4f4f02f1b1c3a0902f74969948c4c1b777ff4a 22-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Move trace_syscall_exiting below trace_syscall_entering. No code changes.

Syscall enter happens before syscall exit. Having functions
in opposite order in the source is confusing.

* syscall.c: Move trace_syscall_exiting below trace_syscall_entering.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
3b73881a0dc6b0e084e0f78e70904123fa305d8b 22-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Fix -z display.

Before this patch, the following:
open("qwerty", O_RDONLY) = -1 ENOENT
write(2, "wc: qwerty: No such file or dire"..., 38) = 38
was shown totally wrongly with -z:
open("qwerty", O_RDONLY) = 38
(yes, that's right, write syscall is lost!)
Now it is shown "less wrongly" as:
open("qwerty", O_RDONLY <unfinished ...>
write(2, "wc: qwerty: No such file or dire"..., 38) = 38

* syscall.c (trace_syscall_exiting): Use common TCB_INSYSCALL clearing
via "goto ret". This fixes totally broken display of -z, but even now
it is not working as intended. Add a comment about that.
(trace_syscall_entering): Use common TCB_INSYSCALL setting
via "goto ret".

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
b88f96129f8ebc064d490c8c161bcbc925d938c8 21-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Straighten up confused comments/messages about post-execve SIGTRAP handling

* defs.h: Explain TCB_INSYSCALL and TCB_WAITEXECVE bits in detail.
* strace.c (choose_pfd): Use entering/exiting macros instead of direct check
for TCB_INSYSCALL.
* syscall.c (get_scno): Use entering/exiting macros instead of direct check
for TCB_INSYSCALL. Fix comments about post-execve SIGTRAP.
(syscall_fixup): Use entering/exiting instead of direct check
for TCB_INSYSCALL. Add a comment what "not a syscall entry" message
usually means. Change wrong "stray syscall exit" messages into
"not a syscall entry" ones.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
c95a88f124895042345473fad58daa30da9e1565 21-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> count_syscall() always returns 0, optimize it

* defs.h (count_syscall): Change return type from int to void.
* count.c (count_syscall): Change return type from int to void.
* syscall.c (trace_syscall_exiting): Change code around call
to count_syscall accordingly.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
a7949748d14a21aa9698311413f2b84342d14e0e 21-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Conditionally optimize out unused code

* syscall.c (internal_syscall): Call internal_exec only if
SUNOS4 || (LINUX && TCB_WAITEXECVE).
* process.c (internal_exec): Define this function only if
SUNOS4 || (LINUX && TCB_WAITEXECVE).
(printwaitn): Don't check wordsize if SUPPORTED_PERSONALITIES == 1.
* signal.c (sys_kill): Likewise.
* syscall.c (is_negated_errno): Likewise.
(trace_syscall_exiting): Fold a tprintf into tprintfs which follow it.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
5d64581e106f47c474707001f924ee15ef22830b 20-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Improve code readability by avoiding assignments inside if()

* desc.c (decode_select): Move assignment out of if() condition.
* file.c (sprinttime): Likewise.
(sys_getdirentries): Likewise.
* io.c (sys_ioctl): Likewise.
* strace.c (test_ptrace_setoptions_followfork): Likewise.
(main): Likewise.
(proc_open): Likewise.
(detach): Likewise.
(proc_poll): Likewise.
(trace): Likewise.
* syscall.c (qualify): Likewise.
(sys_indir): Likewise.
* test/procpollable.c (main): Likewise.
* test/sfd.c (main): Likewise.
* time.c (printtv_bitness): Likewise.
(sprinttv): Likewise.
(print_timespec): Likewise.
(void sprint_timespec): Likewise.
(printitv_bitness): Likewise.
* util.c (dumpstr): Likewise.
(umovestr): Likewise.
(fixvfork): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
39fca628019cbfa01835482ac8559e21fde7f03c 20-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Small optimization in signal and ioctl tables

Trivial shuffling of data tables puts them all in one file,
allowing gcc to see their sizes and eliminate variables
which store these sizes.

Surprisingly, in C mode gcc does not optimize out static const int
variables. Help it by using enums instead.

* defs.h: Stop exporting ioctlent{0,1,2}, nioctlents{0,1,2},
signalent{0,1,2}, nsignals{0,1,2}.
* ioctl.c: Remove definitions of ioctlent{,0,1,2} and nioctlents{,0,1,2}.
* signal.c: Remove definitions of signalent{,0,1,2} and nsignals{,0,1,2}.
* syscall.c: Move above definitions to this file. Make them static const
or enums if suitable.
/external/strace/syscall.c
5c774b2be4c64f24c8473d7bdf2ad23b8bc314cc 20-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Don't return int from set_personality(), no one checks it.

* defs.h (set_personality): Change return type to void.
* syscall.c (set_personality): Change return type to void.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
deec74eb5296a220caabeb5f12abacd9770d10a2 20-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Make needlessly static data local

* syscall.c (get_scno): For POWERPC64 and X86-64, variable currpers
is declared static. But its old data is never used. Convert it
to ordinary local variable.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
7c9ba8b55e4cb198f2280353785491a77b05af2c 19-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Optimize get_scno function

* syscall.c (get_scno): Make gpr_offset[] array static const.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
041b3ee42e7c6338f482320bcc649aff254ae892 18-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Cosmetic fixes, no code changes

* defs.h: Add/reformat comments.
* signal.c: Remove wrong comment. Add warning directive
when we detect that NSIG is undefined. Add comment about
NSIG on ARM. Fix typo in comment.
(signame): Reformat code a bit without changes to logic.
Shorten static buffer.
(sys_rt_sigprocmask): Remove stray empty line.
* syscall.c: Add warning directive when we detect that
NSIG is undefined. Add comment about NSIG on ARM.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
19cdada5b499b978ffd9c3367b4ef34ad6f8bf2b 17-Aug-2011 Denys Vlasenko <dvlasenk@redhat.com> Do not detach when we think tracee is going to die.

Current code plays some ungodly tricks, trying to not detach
thread group leader until all threads exit.

Also, it detaches from a tracee when signal delivery is detected
which will cause tracee to exit.
This operation is racy (not to mention the determination
whether signal is set to SIG_DFL is a horrible hack):
after we determined that this signal is indeed fatal
but before we detach and let process die,
*other thread* may set a handler to this signal, and
we will leak the process, falsely displaying it as killed!

I need to look in the past to figure out why we even do it.
First guess is that it's a workaround for old kernel bugs:
kernel used to deliver exit notifications to the tracer,
not to real parent. These workarounds are ancient
(internal_exit is from 1995).

The patch deletes the hacks. We no longer need tcp->nclone_threads,
TCB_EXITING and TCB_GROUP_EXITING. We also lose a few rather
ugly functions.

I also added a new message: "+++ exited with EXITCODE +++"
which shows exact moment strace got exit notification.
It is analogous to existing "+++ killed by SIG +++" message.

* defs.h: Delete struct tcb::nclone_threads field,
TCB_EXITING and TCB_GROUP_EXITING constants,
declarations of sigishandled() and internal_exit().
* process.c (internal_exit): Delete this function.
(handle_new_child): Don't ++tcp->nclone_threads.
* signal.c (parse_sigset_t): Delete this function.
(sigishandled): Delete this function.
* strace.c (startup_attach): Don't tcbtab[tcbi]->nclone_threads++.
(droptcb): Don't delay dropping if tcp->nclone_threads > 0,
don't drop parent if its nclone_threads reached 0:
just drop (only) this tcb unconditionally.
(detach): don't drop parent.
(handle_group_exit): Delete this function.
(handle_ptrace_event): Instead of handle_group_exit, just drop tcb;
do not panic if we see WIFEXITED from an attached pid;
print "+++ exited with EXITCODE +++" for every WIFEXITED pid.
* syscall.c (internal_syscall): Do not treat sys_exit specially -
don't call internal_exit on it.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
0b6c73c88014d0a50b7afb1fb4d9bc8acca363ea 23-Jun-2011 Denys Vlasenko <dvlasenk@redhat.com> Optimize arrays of register indexes in syscall_enter

* syscall.c (syscall_enter) [BFIN]: Make register no array "static const".
[SH]: Make register no array "const", pre-multiply it by 4.
[SH64]: Make register no array "const".
[X86_64]: Make register no array "const", pre-multiply it by 8.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
f5d099c27047eaa94fa80c02d92b09d1c0d2c063 23-Jun-2011 Denys Vlasenko <dvlasenk@redhat.com> Deindent syscall_enter by removing unnecessary braces. No code changes.

syscall_enter has many long (>80 columns) lines.
It is aggravated by the fact that it has a lot of {} blocks
which are not necessary (the code is the same without them).
This patch removes {}s and deindents affected lines.
While at it, it indents ifdefs so that nesting is easier to track,
and adds a few spaces in the expressions, such as
"tcp->u_nargs*sizeof..." -> "tcp->u_nargs * sizeof...".
There is no actual changes to the code here.

* syscall.c (syscall_enter): Remove unnecessary {} blocks.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
7b609d5ba0852e6c56ba311350ebd4412361777b 22-Jun-2011 Denys Vlasenko <dvlasenk@redhat.com> Whitespace cleanups. No code changes.

* count.c: Place opening curly brace after if (),
not on the next line. Almost all strace code alredy
uses this style.
* desc.c: Likewise.
* file.c: Likewise.
* net.c: Likewise.
* pathtrace.c: Likewise.
* process.c: Likewise.
* quota.c: Likewise.
* signal.c: Likewise.
* strace.c: Likewise.
* syscall.c: Likewise.
* time.c: Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
0df9ed47af7a9385a2fbe6ba688ed4fc24ab0c00 18-Jun-2011 Denys Vlasenko <dvlasenk@redhat.com> Do not suspend waitpid.

strace used to suspend waitpid until there is a child
for waitpid'ing process to collect status from.
Apparently, it was done because in some very old kernels
(circa 2002 or even earlier) there were ptrace bugs which
were making waitpid in real parent to not see children.
This kernel bug is fixed long ago. This change removes the workaround.
test/wait_must_be_interruptible.c is a test program which
illustrates why without this change strace changes
programs's behavior.

* defs.h: Delete waitpid and nclone_waiting members from from struct tcb.
Remove declaration of internal_wait().
* process.c (internal_wait): Remove this function.
* strace.c (alloc_tcb): Do not set tcp->nclone_waiting.
(resume): Remove this function.
(resume_from_tcp): Remove this function.
(detach): Do not call resume_from_tcp().
(handle_group_exit): Do not call resume_from_tcp().
* syscall.c (internal_syscall): Do not call internal_wait().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
fcda7a5f4fcfbedb5493bbfc1b37e53c6b3a575c 13-Jun-2011 Dmitry V. Levin <ldv@altlinux.org> Introduce ARRAY_SIZE() macro

* defs.h (ARRAY_SIZE): New macro.
* ioctl.c: Use it.
* pathtrace.c (pathmatch, storepath): Likewise.
* process.c (printpriv): Likewise.
* signal.c: Likewise.
* syscall.c: Likewise.
/external/strace/syscall.c
4660fe610c2b3707b15b170728a981440e1b54d4 09-Jun-2011 Denys Vlasenko <dvlasenk@redhat.com> Do not call umoven to fetch parameters if we have zero params

* syscall.c [I386] (syscall_enter): Do not call umoven
to fetch zero bytes. This is just an optimization.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
b63256e69bf3f1a74aadb0e14556490bc8f4ef95 07-Jun-2011 Denys Vlasenko <dvlasenk@redhat.com> Whitespace cleanups. no code changes.

* bjm.c: Fix tabulation (such as extra spaces before tabs),
convert punctuation where it deviates from prevalent form
elsewhere in strace code, convert sizeof and offsetof where
it deviates from from prevalent form, remove space between
function/macro/array names and (parameters) or [index],
add space between "if" and (condition), correct non-standard
or wrong indentaion.
* defs.h: Likewise
* desc.c: Likewise
* file.c: Likewise
* ipc.c: Likewise
* linux/arm/syscallent.h: Likewise
* linux/avr32/syscallent.h: Likewise
* linux/hppa/syscallent.h: Likewise
* linux/i386/syscallent.h: Likewise
* linux/ioctlsort.c: Likewise
* linux/m68k/syscallent.h: Likewise
* linux/microblaze/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/tile/syscallent.h: Likewise
* linux/x86_64/syscallent.h: Likewise
* mem.c: Likewise
* net.c: Likewise
* pathtrace.c: Likewise
* process.c: Likewise
* signal.c: Likewise
* sock.c: Likewise
* strace.c: Likewise
* stream.c: Likewise
* sunos4/syscall.h: Likewise
* sunos4/syscallent.h: Likewise
* svr4/syscall.h: Likewise
* svr4/syscallent.h: Likewise
* syscall.c: Likewise
* system.c: Likewise
* test/childthread.c: Likewise
* test/leaderkill.c: Likewise
* test/skodic.c: Likewise
* time.c: Likewise
* util.c: Likewise

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
1201426dd43f5b4e12dfe520e2a9c5027d33dc11 30-May-2011 Denys Vlasenko <dvlasenk@redhat.com> "Modernize" all old-style function parameter declarations

* bjm.c: Convert all remaining old-style C function definitions
to a "modern" form. This does not change any actual code.
* io.c: Likewise
* ioctl.c: Likewise
* net.c: Likewise
* proc.c: Likewise
* process.c: Likewise
* signal.c: Likewise
* sock.c: Likewise
* strace.c: Likewise
* stream.c: Likewise
* syscall.c: Likewise
* system.c: Likewise
* time.c: Likewise
* util.c: Likewise

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/syscall.c
8a08277d13d0378c2ff3ce851534c3bf7e31defa 07-Apr-2011 Grant Edwards <grant.b.edwards@gmail.com> Add ability to print file descriptor paths and filter by those paths

* pathtrace.c: New file, implements matching syscall arguments to
user-specified file paths.
* Makefile.am (strace_SOURCES): Add pathtrace.c.
* defs.h (TCB_FILTERED, filtered): New defines.
(getfdpath, pathtrace_select, pathtrace_match, show_fd_path,
tracing_paths): New declarations.
* strace.c (show_fd_path, tracing_paths): New global variables.
(usage, main): Implement handling of -y and -P options.
* strace.1: Add descriptions of -y and -P options.
* syscall.c (trace_syscall_entering): Add path matching logic to the
print/noprint decision and set the TCB_FILTERED bit appropriately.
(trace_syscall_exiting): Use filtered() macro that checks the
TCB_FILTERED bit to determine print/noprint status.
* util.c (printfd): Use getfdpath().
/external/strace/syscall.c
9fdbee6dea6543a1a4a4183403b6e9c436abcb04 19-Feb-2011 Dmitry V. Levin <ldv@altlinux.org> 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).
/external/strace/syscall.c
bd13645efb3094267ce95920b6941cfcac757036 19-Feb-2011 Dmitry V. Levin <ldv@altlinux.org> Optimize known_scno()

* syscall.c (known_scno): Do not check for native_scno field on
platforms that support only one personality.
/external/strace/syscall.c
65c1a81f6ad628240445ba24d888d25b2fd69c1e 09-Feb-2011 Dmitry V. Levin <ldv@altlinux.org> Fix biarch support in IO dumping

* syscall.c (dumpio): Switch on tcp->sys_func instead of tcp->scno
for more reliable results.
/external/strace/syscall.c
50a218d4ac83e6adf6f44785037dd25bd8037921 18-Jan-2011 Dmitry V. Levin <ldv@altlinux.org> 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>.
/external/strace/syscall.c
bdafa1a90569fb791af6abdffca109fee044d94e 03-Dec-2010 Dmitry V. Levin <ldv@altlinux.org> Output diagnostics to stderr

* syscall.c (get_scno): Output information about changes in
personality mode to stderr. Reported by Pádraig Brady.
/external/strace/syscall.c
35d0572a124c60a2b35987d23886172ed40d76c1 15-Sep-2010 Dmitry V. Levin <ldv@altlinux.org> Pass less information to qualify_one and qual_*

* syscall.c (qualify_one, qual_syscall, qual_signal, qual_fault,
qual_desc): Take just a bitflag argument instead of pointer to the whole
qual_options structure.
(struct qual_options): Update prototype of "qualify" field.
(qualify): Update use of qualify_one and qual_options->qualify.
/external/strace/syscall.c
0ef43b8189b036fd958dcc1b861013f32ea596f5 15-Sep-2010 Wang Chao <wang.chao@cn.fujitsu.com> Fix -e option with only one value in qualifier statement

Fix regression introduced by commit v4.5.20-19-g30145dd:
if -e option is used with only one value in qualifier statement,
e.g. 'strace -e trace=open ls', syscall information would not be
printed properly.

* syscall.c (qualify): Remove faulty optimization.

Signed-off-by: Wang Chao <wang.chao@cn.fujitsu.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/syscall.c
30145dda9d7ff70df1d5ad750a183572c73e8963 07-Sep-2010 Dmitry V. Levin <ldv@altlinux.org> Fix const-correctness issues uncovered by gcc -Wwrite-strings

* defs.h (struct xlat): Add const qualifier to the field of
type "char *".
(set_sortby, qualify, printnum, printnum_int): Add const qualifier to
arguments of type "char *".
* count.c (set_sortby): Add const qualifier to the argument and
automatic variable of type "char *".
* desc.c (decode_select): Add const qualifier to automatic variables of
type "char *".
* ioctlsort.c (struct ioctlent): Add const qualifier to fields of
type "char *".
(main): Add const qualifier to argv.
* process.c (printargv): Add const qualifier to the argument and
automatic variable of type "char *".
(printargc) Add const qualifier to argument of type "char *".
* signal.c (sprintsigmask, parse_sigset_t): Add const qualifier to
arguments of type "char *".
* strace.c (progname): Add const qualifier.
(detach): Add const qualifier to automatic variable of type "char *".
* stream.c (struct strbuf): Add const qualifier to the field of
type "char *".
* syscall.c (struct qual_options): Add const qualifier to fields of
type "char *".
(qual_syscall, qual_fault, qual_desc, lookup_class): Add const qualifier
to arguments of type "char *".
(qual_signal): Add const qualifier to the argument of type "char *",
avoid modification of constant argument.
(qualify): Likewise.
* util.c (printflags): Add const qualifier to automatic variable of
type "char *".
(printnum, printnum_int): Add const qualifier to arguments of
type "char *".
/external/strace/syscall.c
939caba68e93a51e537f29c3bd778dea1f081157 06-Jul-2010 Edgar E. Iglesias <edgar.iglesias@gmail.com> Add support for the MicroBlaze architecture

* configure.ac: Recognize MicroBlaze.
* linux/microblaze/syscallent.h: New file.
* Makefile.am (EXTRA_DIST): Add linux/microblaze/syscallent.h
* process.c (change_syscall, struct_user_offsets): Add MicroBlaze
support.
* signal.c (sys_sigreturn): Likewise.
* syscall.c (internal_syscall, get_scno, syscall_fixup, get_error,
syscall_enter): Likewise.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
/external/strace/syscall.c
d69fa497f4729373618fb7b506a2362422487ab1 12-Jul-2010 Andreas Schwab <schwab@linux-m68k.org> Add biarch support for powerpc64

* acinclude.m4 (AC_LITTLE_ENDIAN_LONG_LONG): Use int instead of
long.
* configure.ac [$host_cpu = powerpc*]: Also define POWERPC64 if
$host_cpu = powerpc64.
* defs.h (SUPPORTED_PERSONALITIES, PERSONALITY0_WORDSIZE)
(PERSONALITY1_WORDSIZE) [POWERPC64]: Define.
* file.c: (struct stat_powerpc32, printstat_powerpc32) [POWERPC64]:
Define.
(printstat) [LINUX && POWERPC64]: Use printstat_powerpc32 in
32-bit personality.
(sys_newfstatat) [POWERPC64]: Handle personalities.
* signal.c (sys_sigreturn) [POWERPC64]: Likewise.
* util.c (printllval) [POWERPC64]: Likewise.
(printcall) [POWERPC64]: Use wider format for IP prefix.
* syscall.c (get_scno) [POWERPC64]: Check for 64/32 bit mode.
* linux/powerpc/errnoent1.h: New file.
* linux/powerpc/ioctlent1.h: New file.
* linux/powerpc/signalent1.h: New file.
* linux/powerpc/syscallent1.h: New file.
/external/strace/syscall.c
246888d23999d2ce5301bd9f814ed5c09a6889b8 05-Jun-2010 Andreas Schwab <schwab@linux-m68k.org> M68K: Fix fetching syscall arguments

* syscall.c (syscall_enter) [M68K]: Properly handle more than five
syscall arguments.
/external/strace/syscall.c
ffca9e30d6228532e84adc2cfe18f0ea72d199c5 28-May-2010 Andreas Schwab <schwab@linux-m68k.org> Fix warning when compiling for m68k

* syscall.c (d0): Define as long.
/external/strace/syscall.c
7d7c963d793f37c232fb29dfa7240ecfce9a3e14 29-Mar-2010 Dmitry V. Levin <ldv@altlinux.org> Split trace_syscall() for better readability

* syscall.c (trace_syscall): Split into trace_syscall_exiting() and
trace_syscall_entering().
/external/strace/syscall.c
e3a7ef5a2a3ac31bfa0d3f9ce65981e51700073e 28-Mar-2010 Dmitry V. Levin <ldv@altlinux.org> Implement -C option to combine regular and -c output

* defs.h (cflag_t): New enum.
* strace.1: Document -C option.
* strace.c (cflag): Update type.
(main): Handle -C option.
(trace): Update use of cflag.
* count.c (count_syscall): Move clearing of TCB_INSYSCALL to ...
* syscall.c (trace_syscall): ... here. Update use of cflag.
Based on patch by Adrien Kunysz.
/external/strace/syscall.c
200370419bb3540e50e9333a3359af4ca681d3bf 09-Feb-2010 David Daney <ddaney@caviumnetworks.com> Fix MIPS N32/N64 compile error

* syscall.c [LINUX_MIPSN32 || LINUX_MIPSN64] (syscall_enter): Pass
tcp->pid to ptrace().
/external/strace/syscall.c
c8c6698ef7cde83a496b273672a51ec2a8f14fb3 28-Dec-2009 Chris Metcalf <cmetcalf@tilera.com> 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>
/external/strace/syscall.c
e5e60858063f214fcd7860f50f8bcb46f951f9ab 31-Dec-2009 Dmitry V. Levin <ldv@altlinux.org> 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.
/external/strace/syscall.c
257e15737d8f0550d9ab01c039047d37bc823cbd 26-Dec-2009 Dmitry V. Levin <ldv@altlinux.org> 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().
/external/strace/syscall.c
8566c500253f3bef38ace7d6031f76fe5d21f7e0 12-Oct-2009 Mike Frysinger <vapier@gentoo.org> 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>
/external/strace/syscall.c
c1a5b7e8c42086635d09ce8adc7f8b3dd018c999 08-Oct-2009 Mike Frysinger <vapier@gentoo.org> 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>
/external/strace/syscall.c
eeb9ce3895f1ca0920d50696ef8b48124cef9da6 05-Oct-2009 Edgar E. Iglesias <edgar.iglesias@gmail.com> 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>
/external/strace/syscall.c
414fe7d4d284e22d7855c5367f17dbc0714738d9 08-Jul-2009 Dmitry V. Levin <ldv@altlinux.org> 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>
/external/strace/syscall.c
eb9e2e8904ce85a6c7390be25bb873c6db88c4d3 03-Jun-2009 Roland McGrath <roland@redhat.com> Revert unapproved commits.
/external/strace/syscall.c
5ae2b7c601dadf79a4345e1ee21053947b9e4add 27-Feb-2009 Denys Vlasenko <dvlasenk@redhat.com> 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.
/external/strace/syscall.c
ea0e6e80260d2b1b7ad40282012b0e47869bcddf 25-Feb-2009 Denys Vlasenko <dvlasenk@redhat.com> 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.
/external/strace/syscall.c
4dedd561d61562fe66f1a0b673ad33ac6a1e3c71 24-Feb-2009 Denys Vlasenko <dvlasenk@redhat.com> 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.
/external/strace/syscall.c
84e20af5a6f3d6e02c24579b60a282053ef01e0e 10-Feb-2009 Denys Vlasenko <dvlasenk@redhat.com> 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.
/external/strace/syscall.c
fb03667fad9cca59460e739e2f8d69f304ff7a33 23-Jan-2009 Denys Vlasenko <dvlasenk@redhat.com> syscall.c (get_scno): Fix warnings about unused 'pid' variable
/external/strace/syscall.c
1d5b113f8c013b11afa10de8393e770b29c648fd 17-Jan-2009 Denys Vlasenko <dvlasenk@redhat.com> * defs.h: Update a comment. No code changes.
* strace.c (handle_stopped_tcbs): Discard all execve stops
and clear TCB_WAITEXECVE bit.
* syscall.c (get_scno): Add the code to not mistakenly
treat ptrace stop as execve stop (execve stops can be blocked
by traced program).
Fixes RH#477775 "strace hangs if the target process blocks SIGTRAP".
/external/strace/syscall.c
ef2fbf856cf775981b52278c80ce2a74a44019f4 06-Jan-2009 Denys Vlasenko <dvlasenk@redhat.com> Output format fixes, improving the situation after recent
change which added better handling of processes suddenly
disappearing. Now we often do not finish last line
before exiting in those cases.
The only change affecting something other than output
is change in umovestr where we were calling
abort() on ptrace error.

* strace.c (trace): If trace_syscall() failed with ESRCH,
finish current output line with " <unfinished ...>".
(mp_ioctl): While we are at it, fix gross style mismatch
in this function definition. No code chages.
* syscall.c (trace_syscall): If decode fails on syscall exit,
finish current output line with "= ? <unavailable>".
* util.c (umoven): Do not complain if error is ESRCH.
(umovestr): Do not complain and do not abort() if error is ESRCH.
* defs.h: Remove unused tcp parameter from printtrailer().
* process.c: Adjust printtrailer() calls accordingly.
* strace.c: Adjust printtrailer() calls accordingly.
* syscall.c: Adjust printtrailer() calls accordingly.
/external/strace/syscall.c
8236f254b797057396c6ec41b616a0ea3fc4a8a1 02-Jan-2009 Denys Vlasenko <dvlasenk@redhat.com> * syscall.c: more cosmetics. fixed a few localized style discrepancies.
The only actual code change is a trivial one where
a char *array[] made const and static.
/external/strace/syscall.c
bc161ecae6dc18cef8739e6c066eb91ba8bf2634 02-Jan-2009 Denys Vlasenko <dvlasenk@redhat.com> * defs.h, syscall.c: explain why x86 does not need TCB_WAITEXECVE trick,
and what syscall_fixup() is expected to do. Comments only, no code changes.
/external/strace/syscall.c
adedb510197209e7077310f9e9f67e3d51fb8617 30-Dec-2008 Denys Vlasenko <dvlasenk@redhat.com> Fixing many instances of broken indentation with spaces instead of tabs.
No code changes.
/external/strace/syscall.c
8ba1cd7d122b5323f9a1ac8be494ddbc1352d5cd 30-Dec-2008 Denys Vlasenko <dvlasenk@redhat.com> Patch by Kirill A. Shutemov:
Fix some warnings on ARM build.
* defs.h: include <sys/ptrace.h> on arm too.
* syscall.c: EABI arm does not need decode_subcall(), ifdef it out.
/external/strace/syscall.c
732d1bf4d4aaff68eff1c41d8900264637a57dfe 17-Dec-2008 Denys Vlasenko <dvlasenk@redhat.com> Make strace somewhat resilient against process disappearing
under its claws. Prime example is sudden SIGKILL.
Fixes RH#472053
/external/strace/syscall.c
932fc7d4fc1a29e8b8bcea5685db3f6c2e212e36 16-Dec-2008 Denys Vlasenko <dvlasenk@redhat.com> This patch does not change any logic.

It merely passes tcp pointer to upeek instead of pid.
This is needed if one wants to check or change
some tcp fields.

I have patches which require this. I can imagine someone else
eventually needing to look at tcp for completely orthogonal reasons.
/external/strace/syscall.c
87ea1f4fe68c6110a96a76f8601b3e204200082d 10-Nov-2008 Dmitry V. Levin <ldv@altlinux.org> 2008-10-23 Mike Frysinger <vapier@gentoo.org>

Port strace to the Blackfin architecture.
* configure.ac: Add bfin to supported architectures.
* process.c: Skip u_fpvalid/u_fpstate for Blackfin architecture.
(change_syscall): Support Blackfin architecture.
* syscall.c: Declare r0 for Blackfin architecture.
(get_scno): Decode Blackfin syscall number.
(syscall_fixup): Extract Blackfin return value.
(get_error): Decode Blackfin return value.
(force_result): Poke Blackfin return value.
(syscall_enter): Extract Blackfin syscall arguments.
* defs.h: Define TCB_WAITEXECVE for Blackfin architecture.
* linux/syscall.h (sys_sram_alloc): Declare for Blackfin
architecture.
* system.c (sys_sram_alloc): Decode Blackfin sram_alloc() syscall.
* util.c (getpc): Handle PC on Blackfin architecture.
(printcall): Likewise.
* linux/bfin/ioctlent.h, linux/bfin/syscallent.h: New Blackfin
headers.
* Makefile.am (EXTRA_DIST): Add linux/bfin/ioctlent.h and
linux/bfin/syscallent.h.
/external/strace/syscall.c
21a75347451b5178a0eb85a48042b8db0e45b318 03-Sep-2008 Dmitry V. Levin <ldv@altlinux.org> 2008-04-19 Dmitry V. Levin <ldv@altlinux.org>

* desc.c (sys_fcntl): Do not initialize auxstr for failed syscall.
* process.c (sys_fork, sys_rfork) [USE_PROCFS]: Likewise.
* signal.c (sys_signal): Likewise.
* stream.c (internal_stream_ioctl): Likewise.
* time.c (sys_adjtimex): Likewise.
* syscall.c (trace_syscall): If RVAL_STR is set, then
print auxstr for failed syscall as well.
/external/strace/syscall.c
2e55ff4562e87f8361f0c1db5a42ee6e9ac0cc56 03-Sep-2008 Dmitry V. Levin <ldv@altlinux.org> 2008-04-19 Dmitry V. Levin <ldv@altlinux.org>

* syscall.c (is_restart_error): New function.
* defs.h (is_restart_error): Declare it.

* linux/dummy.h (sys_nanosleep): Uncouple from sys_adjtime().
* time.c (sys_nanosleep): New function, based on is_restart_error().
/external/strace/syscall.c
d5bd7e681b2297b24bfd1b82eb4baea1bf6795fb 25-Aug-2008 Roland McGrath <roland@redhat.com> 2008-08-24 Roland McGrath <roland@redhat.com>

* syscall.c (trace_syscall): Conditionalize on [SYS_socket_subcall]
and [SYS_ipc_subcall] individually.
/external/strace/syscall.c
1f942710a57860eeabfa03e62b8ac151022d1be3 06-Aug-2008 Jan Kratochvil <jan.kratochvil@redhat.com> 2008-08-06 Jan Kratochvil <jan.kratochvil@redhat.com>

Fix compiler warnings.
* signal.c (sys_signal): Cast to SIG_* to the matching type LONG.
* strace.c (trace): Variables PSR and PC are now signed.
* syscall.c (syscall_enter): Variable RBS_END is now signed long.
Remove/add the RBS_END casts appropriately.
* util.c [IA64] (arg_setup): Variable BSP is now signed long.
Remove/add the BSP casts appropriately.
<ia32>: Initialize *STATE.
/external/strace/syscall.c
c1e4592381000f7da363418d8f58bc02b44451d7 28-May-2008 Roland McGrath <roland@redhat.com> 2008-05-27 Roland McGrath <roland@redhat.com>

* syscall.c [LINUX] (is_negated_errno): New function.
(get_error) [LINUX]: Use it for all such cases.
Fixes RH#447587.
/external/strace/syscall.c
5670331bf1ffb36fa815ddb817064e7f08dd2d97 20-May-2008 Roland McGrath <roland@redhat.com> 2008-01-25 Bruna Moreira <bruna.moreira@indt.org>

* defs.h [ARM]: Define SUPPORTED_PERSONALITIES to 2.
* syscall.c (get_scno) [ARM]: Add support for architecture specific
syscalls.
* linux/arm/syscallent.h: Update network syscalls list.
* linux/arm/syscallent1.h: New file. Add new architecture specific
syscalls.
* linux/arm/errnoent1.h: New file.
* linux/arm/ioctlent1.h: New file.
* linux/arm/signalent1.h: New file.
Fixes Debian#441000.
/external/strace/syscall.c
542c2c6fe2b93ae73221dd5c5c8ed95a73b676e4 20-May-2008 Roland McGrath <roland@redhat.com> 2007-08-26 Daniel Jacobowitz <dan@codesourcery.com>

* defs.h [MIPS]: Include <sgidefs.h>.
(MAX_QUALS): Update for MIPS.
(LINUX_MIPSO32, LINUX_MIPSN32, LINUX_MIPSN64, LINUX_MIPS64): Define.
(struct tcb): Add ext_arg for MIPS N32.
(TCB_WAITEXECVE): Define for MIPS.
(ALIGN64): Use LINUX_MIPSO32.
* file.c (sys_lseek): Use ext_arg for MIPS N32.
(sys_readahead, sys_fadvise64_64): Likewise.
* io.c (sys_pread64, sys_pwrite64): Likewise.
* mem.c (print_mmap): Take OFFSET argument.
(sys_old_mmap): Update call to print_mmap.
(sys_mmap): Use ext_arg for MIPS N32.
* process.c (struct_user_offsets): Add MIPS registers.
* signal.c (sys_sigreturn): Handle MIPS N32 and MIPS N64. Correct
MIPS O32 call to sprintsigmask.
* syscall.c (internal_syscall): Handle MIPS N32. Check for
TCB_WAITEXECVE on MIPS.
(force_result): Add a comment about MIPS N32.
(syscall_enter): Handle MIPS N32 and MIPS N64.
* linux/syscall.h (sys_pread64, sys_pwrite64): Declare.
* linux/mips/syscallent.h: Include "dummy.h". Handle alternate
MIPS ABIs.
/external/strace/syscall.c
5e48c54ddf9c1e7e431701b3a1d920611495e2fa 20-May-2008 Roland McGrath <roland@redhat.com> 2008-05-08 David S. Miller <davem@davemloft.net>

* syscall.c (socket_map, sparc_socket_decode): Delete.
(trace_syscall): Use common socketcall and ipc subcall
support on sparc.
* linux/sparc/syscall.h (sys_semtimedop): Declare.
(SYS_socket_subcall, SYS_sub_socket, SYS_sub_bind,
SYS_sub_connect, SYS_sub_listen, SYS_sub_accept,
SYS_sub_getsockname, SYS_sub_getpeername,
SYS_sub_socketpair, SYS_sub_send, SYS_sub_recv,
SYS_sub_sendto, SYS_sub_recvfrom, SYS_sub_shutdown,
SYS_sub_setsockopt, SYS_sub_getsockopt, SYS_sub_sendmsg,
SYS_sub_recvmsg, SYS_socket_nsubcalls, SYS_ipc_subcall,
SYS_sub_semop, SYS_sub_semget, SYS_sub_semctl,
SYS_sub_semtimedop, SYS_sub_msgsnd, SYS_sub_msgrcv,
SYS_sub_msgget, SYS_sub_msgctl, SYS_sub_shmat,
SYS_sub_shmdt, SYS_sub_shmget, SYS_sub_shmctl,
SYS_ipc_nsubcalls): Define
* linux/sparc/syscallent.h: Add socketcall and ipc entries.
/external/strace/syscall.c
9bc6340d21cb20d2c775863598068c1a29460eba 01-Nov-2007 Roland McGrath <roland@redhat.com> 2007-11-01 Roland McGrath <roland@redhat.com>

* syscall.c (get_scno) [ARM]: Check TCB_WAITEXECVE.
Reported by Bernhard Fischer <rep.dot.nop@gmail.com>.
/external/strace/syscall.c
c18c703b4873f9510b7820edf5ff239c83e34d69 22-Aug-2007 Dmitry V. Levin <ldv@altlinux.org> 2007-08-20 Dmitry V. Levin <ldv@altlinux.org>

* syscall.c (qual_syscall, qualify): Fix nsyscalls and MAX_QUALS misuse.
Reported by Xiaoning Ding.
/external/strace/syscall.c
7d61ff1dbf7226ed35a35c12b8b642bd5fc9a0a9 21-Dec-2006 Dmitry V. Levin <ldv@altlinux.org> 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.
/external/strace/syscall.c
b2f869997a41b633918707ebc090a3028abc855a 21-Dec-2006 Dmitry V. Levin <ldv@altlinux.org> 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.
/external/strace/syscall.c
3abe8b20f6d303f0b2b772b3fbcde424697653a2 20-Dec-2006 Dmitry V. Levin <ldv@altlinux.org> 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.
/external/strace/syscall.c
b9fe011cdfb0a3014e68a6e82007b6c2703a340b 13-Dec-2006 Dmitry V. Levin <ldv@altlinux.org> 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.
/external/strace/syscall.c
f691bd2a4f0a915f998e4127b108869b57db4213 25-Apr-2006 Roland McGrath <roland@redhat.com> 2006-03-30 Daniel Jacobowitz <dan@codesourcery.com>

* process.c (change_syscall): Add ARM support.
* syscall.c (get_scno): Handle ARM EABI.
Fixes Debian#360152.
/external/strace/syscall.c
4b2dccaf943adf4ff2b6e15c1f51a59652f8da36 12-Jan-2006 Roland McGrath <roland@redhat.com> 2006-01-12 Roland McGrath <roland@redhat.com>

* defs.h [LINUXSPARC] (PERSONALITY0_WORDSIZE, PERSONALITY1_WORDSIZE):
New macros.
[SPARC64] (PERSONALITY2_WORDSIZE): New macro.
[X86_64] (PERSONALITY0_WORDSIZE, PERSONALITY1_WORDSIZE): New macros.
* syscall.c (PERSONALITY0_WORDSIZE): New macro if undefined.
(personality_wordsize): New variable.
(decode_subcall): Use it for size of argument words.
Fixes RH#174354.
/external/strace/syscall.c
138c6a334fd9949d6147c63ada02cf55472e02c0 12-Jan-2006 Roland McGrath <roland@redhat.com> 2005-11-17 Dmitry V. Levin <ldv@altlinux.org>

Implement qual_flags support for each personality.
* strace.c (main): Move qualify calls after set_personality call.
* syscall.c (qual_flags0): New variable..
[SUPPORTED_PERSONALITIES >= 2] (qual_flags1): New variable.
[SUPPORTED_PERSONALITIES >= 3] (qual_flags2): New variable.
(qual_flags): Change variable definition from array to pointer.
(set_personality): Initialize qual_flags variable.
(qualify_one): Add "pers" argument to specify personality.
[SUPPORTED_PERSONALITIES >= 2]: Set qual_flags1 if requested.
[SUPPORTED_PERSONALITIES >= 3]: Set qual_flags2 if requested.
(qual_syscall): Pass personality to qualify_one.
[SUPPORTED_PERSONALITIES >= 2]: Look for syscall also in sysent1
table.
[SUPPORTED_PERSONALITIES >= 3]: Look for syscall also in sysent2
table.
(qual_signal): Pass personality to qualify_one.
(qual_desc): Likewise.
(qualify): Use qualify_one instead of manual qual_flags
manipulations.
[SUPPORTED_PERSONALITIES >= 2]: Look for syscall also in sysent1
table.
[SUPPORTED_PERSONALITIES >= 3]: Look for syscall also in sysent2
table.
* defs.h: Update qual_flags declaration.
Fixes RH#173986.
/external/strace/syscall.c
48a035fb6f4300c0d2f9341eaf63f1d95c5ba2ae 12-Jan-2006 Roland McGrath <roland@redhat.com> 2005-11-14 Dmitry V. Levin <ldv@altlinux.org>

* syscall.c (qual_syscall): Handle numeric syscall specification.
Fixes RH#174798.
* syscall.c (qual_signal, qual_options): Remove redundant argument
check.
/external/strace/syscall.c
2fe7b13b2f893f7647408af98576affe2b9b123d 05-Jul-2005 Roland McGrath <roland@redhat.com> 2005-06-08 Dmitry V. Levin <ldv@altlinux.org>

Introduce "-e trace=desc".
* defs.h (TRACE_DESC): New flag.
* syscall.c: Define TD macro before include of syscallent files
and undefine it afterwards.
(lookup_class): Recognize "desc" keyword.
* strace.1: Document "-e trace=desc".
* freebsd/i386/syscallent.h: Mark those syscalls which take a
file descriptor as an argument or return a file descriptor with
TD flag.
* 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/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent2.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* sunos4/syscallent.h: Likewise.
* svr4/syscallent.h: Likewise.
Fixes RH#159400.
/external/strace/syscall.c
a4d4853f679014799a6608cc8114e6ce7f37ae89 08-Jun-2005 Roland McGrath <roland@redhat.com> 2005-06-08 Dmitry V. Levin <ldv@altlinux.org>

Minor namespace cleanup.
* defs.h (string_quote): Remove declaration.
* file.c (openmodessol) [LINUXSPARC]: Make static.
(fileflags): Likewise.
(aclcmds, aclipc) [HAVE_SYS_ACL_H]: Likewise.
(direnttypes) [FREEBSD || LINUX]: Likewise.
(xattrflags): Likewise.
* process.c (unalignctl_string): Make static.
(setarg): Disable.
* syscall.c (subcalls_table): Make static.
(socket_map) [!(LINUX && (ALPHA || MIPS))]: Likewise.
(sparc_socket_decode): Make static, define for [SPARC || SPARC64] only.
(decode_subcall): Make static.
(syscall_fixup): Likewise.
(get_error): Likewise.
(syscall_enter): Likewise.
* util.c (tv_tv): Disable.
(getpc): Likewise.
(string_quote): Make static.
Fixes RH#159688.
/external/strace/syscall.c
173527948f2e0521a69e9d569dbf12a810bbe788 08-Jun-2005 Roland McGrath <roland@redhat.com> 2005-06-06 Roland McGrath <roland@redhat.com>

* linux/syscall.h (SYS_socket, SYS_bind, SYS_connect, SYS_listen)
(SYS_accept, SYS_getsockname, SYS_getpeername, SYS_socketpair)
(SYS_send, SYS_recv, SYS_sendto, SYS_recvfrom, SYS_shutdown)
(SYS_setsockopt, SYS_getsockopt, SYS_sendmsg, SYS_recvmsg)
(SYS_getsockname, SYS_semop, SYS_semgsub_et, SYS_semget, SYS_semctl)
(SYS_semtimedop, SYS_msgsnd, SYS_msgrcv, SYS_msgget)
(SYS_msgctl, SYS_shmat, SYS_shmdt, SYS_shmget)
(SYS_shmctl): Macros renamed to SYS_sub_*.
* syscall.c (dumpio): Match SYS_sub_* if defined instead of SYS_*.
* defs.h (struct sysent): New member `native_scno'.
(known_scno): Declare new function.
* linux/syscallent.h: Add new final field to interesting syscalls.
* syscall.c (known_scno): New function.
(dumpio, internal_syscall, syscall_fixup, trace_syscall): Use it.
* process.c (internal_fork, internal_exit): Likewise.
[IA64] (ARG_STACKSIZE, ARG_PTID, ARG_CTID, ARG_TLS): Likewise.
* strace.c (proc_open): Likewise.
* util.c [LINUX] (setbpt): Likewise.
* linux/syscall.h: Remove [!defined(X86_64)] from conditional
for defining SYS_socket_subcall et al.
* linux/syscallent.h: Likewise for #error check.
* syscall.c (trace_syscall): Likewise for SYS_{socketcall,ipc} cases.
Fixes RH#158934.
/external/strace/syscall.c
920e6bb712d63512356857d198c073a3683fcb5f 15-Mar-2005 Roland McGrath <roland@redhat.com> 2005-02-28 Andreas Schwab <schwab@suse.de>

* syscall.c (getrval2): Move #ifdef IA64 inside #ifdef LINUX.
/external/strace/syscall.c
b77d0934b3fa9df0a5b3046f7fd187687bdb712f 02-Feb-2005 Roland McGrath <roland@redhat.com> 2004-12-20 Dmitry V. Levin <ldv@altlinux.org>

* syscall.c (call_summary): Fix potential NULL dereference.
Fixes RH#143369.
/external/strace/syscall.c
fe6b352f8d5367521685c7ea52016c544fd9d2fe 02-Feb-2005 Roland McGrath <roland@redhat.com> 2004-12-19 Dmitry V. Levin <ldv@altlinux.org>

* syscall.c (qual_signal): Check bounds for numeric signal names.
Fix parser of symbolic signal names.
Fix return code, as required by qualify() function.
* syscall.c (qual_desc): Check bounds for descriptor number.
* syscall.c (qual_syscall): Correct return code, to be consistent
with qualify() and other qual_* functions.
Fixes RH#143362.
/external/strace/syscall.c
76421df9b279973ef4f8c6a70142b349bfc39807 02-Feb-2005 Roland McGrath <roland@redhat.com> 2005-02-01 Roland McGrath <roland@redhat.com>

* syscall.c (qual_signal): Fix inverted return value and bogus
argument to qualify_one in the named case.
/external/strace/syscall.c
5a9c6ade8963d4839c76d88aa8845e992014f86c 02-Feb-2005 Roland McGrath <roland@redhat.com> 2005-02-01 Roland McGrath <roland@redhat.com>

* syscall.c (syscall_enter) [X86_64]: Fix 32-bit argument register map
not to double the middle entry!
/external/strace/syscall.c
e10e62a03c62c06e07c4312ba9afe633194e2d13 04-Sep-2004 Roland McGrath <roland@redhat.com> 2004-09-03 Roland McGrath <roland@redhat.com>

* syscall.c (qual_options): Add const to defn.
Update all uses.
(call_count, error_count, tv_count): Variables removed.
(struct call_counts, counts): New type and variable.
Update all users of the old three to use the new array of structs.
(trace_syscall): Allocate counts on first use.
(sorted_count): Variable removed.
(call_summary): Allocate locally.
/external/strace/syscall.c
ee36ce19e03e08f4b692570090ee58b72d2f0f50 04-Sep-2004 Roland McGrath <roland@redhat.com> 2004-09-03 Roland McGrath <roland@redhat.com>

* syscall.c (sysent0, sysent1, sysent2, sysent): Add const to defn.
(nsyscalls0, nsyscalls1, nsyscalls2): Likewise.
(errnoent0, errnoent1, errnoent2, errnoent): Likewise.
(nerrnos0, nerrnos1, nerrnos2): Likewise.
* signal.c (signalent0, signalent1, signalent2): Likewise.
(nsignals0, nsignals1, nsignals2): Likewise.
(signame): LIkewise.
* ioctl.c (ioctlent0, ioctlent1, ioctlent2): Likewise.
(nioctlents0, nioctlents1, nioctlents2): Likewise.
(ioctl_lookup, ioctl_next_match): Likewise.
* defs.h: Update decls.
* io.c (sys_ioctl): Update users.
/external/strace/syscall.c
c74c0b732b66139d59e616210718950f2853f3aa 01-Sep-2004 Roland McGrath <roland@redhat.com> 2004-09-01 Roland McGrath <roland@redhat.com>

* process.c (internal_wait): Take second arg giving index of flags
argument.
* defs.h: Update prototype.
* syscall.c (internal_syscall): Update caller.
Also use internal_wait for SYS_waitid.
* process.c (sys_waitid): Define for [LINUX] as well.
Don't tweak TCB_SUSPENDED--internal_wait does that.
(waitid_types): Conditionalize use of nonstandard P_* macros.
/external/strace/syscall.c
aa510629c74a8af3c229ac15a2405f45912d9f47 31-Aug-2004 Roland McGrath <roland@redhat.com> 2004-08-31 Roland McGrath <roland@redhat.com>

* syscall.c (dumpio): Match pread and pwrite system calls too.
Fixes Debian bug #239947.
/external/strace/syscall.c
6d1a65c759c6c650e47ce5045a26380a4acbdffa 12-Jul-2004 Roland McGrath <roland@redhat.com> 2004-07-07 David S. Miller <davem@nuts.davemloft.net>

* linux/sparc/syscallent.h: Sync with reality.
* linux/sparc/syscall.h (sys_sendfile64, sys_futex, sys_gettid,
sys_sched_setaffinity, sys_sched_getaffinity, sys_setxattr,
sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr,
sys_fgetxattr, sys_listxattr, sys_llistxattr, sys_flistxattr,
sys_removexattr, sys_lremovexattr, sys_fremovexattr,
sys_remap_file_pages, sys_readahead, sys_tgkill, sys_statfs64,
sys_fstatfs64, sys_clock_settime, sys_clock_gettime,
sys_clock_getres, sys_clock_nanosleep, sys_timer_create,
sys_timer_settime, sys_timer_gettime): New declarations.
* linux/sparc64/dummy2.h, linux/sparc64/syscallent2.h,
linux/sparc64/syscall.h, linux/sparc64/errnoent.h,
linux/sparc64/errnoent1.h, linux/sparc64/errnoent2.h,
linux/sparc64/ioctlent.h, linux/sparc64/ioctlent1.h,
linux/sparc64/ioctlent2.h, linux/sparc64/signalent.h,
linux/sparc64/signalent.h, linux/sparc64/signalent.h,
linux/sparc64/signalent1.h, linux/sparc64/signalent2.h,
linux/sparc64/syscall1.h, linux/sparc64/syscallent.h,
linux/sparc64/syscallent1.h: New files.
* defs.h (LINUXSPARC): Define also when SPARC64.
(LINUX && SPARC64): Set SUPPORTED_PERSONALITIES to 3.
Ignore SIGTRAP after execve by defining TCB_WAITEXECVE.
Define possibly missing __NR_exit_group. Declare getrval2.
* configure.ac (sparc64): New architecture case.
* config.h.in (SPARC64): New define.
* file.c (stat_sparc64): New structure.
(printstat_sparc64): New output routine for that.
(printstat): Call it, if personality is 2.
(printstat64): Likewise.
* util.c: Conditionalize ptrace defines on LINUXSPARC
not LINUX && SPARC.
(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
to PTRACE_FOOREGS64 so that more sparc code can be shared
between 64-bit and 32-bit.
(_hack_syscall5): Correct trap number when SPARC64.
(PTRACE_WRITE{TEXT,DATA}): Add SPARC64 to ifdef guard.
(getpc): Handle SPARC64 && LINUX.
(printcall): Likewise.
(arg fetching/setting): Use same code for SPARC64 LINUX
as for SPARC.
(setbpt): Handle SPARC64 && LINUX.
(clearbpt): Likewise.
* signal.c: Conditionalize ptrace defines on SPARC and
SPARC64.
(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
to PTRACE_FOOREGS64 so that more sparc code can be shared
between 64-bit and 32-bit.
(m_siginfo): Use same definition on SPARC64 as SPARC.
(sys_sigreturn): Handle LINUX && SPARC64.
* syscall.c: Conditionalize ptrace defines on SPARC and
SPARC64.
(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
to PTRACE_FOOREGS64 so that more sparc code can be shared
between 64-bit and 32-bit.
(getscno): Use same static state on SPARC64 as SPARC,
and add SPARC64 handling.
(get_error): Handle LINUX && SPARC64.
(force_result): Likewise.
(syscall_enter): Likewise.
(trace_syscall): Handle sys_socketcall and sys_ipc on SPARC64
just like SPARC.
(getrval2): Handle LINUX && SPARC64.
* process.c: Conditionalize ptrace defines on SPARC and
SPARC64.
(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
to PTRACE_FOOREGS64 so that more sparc code can be shared
between 64-bit and 32-bit.
(change_syscall): Handle LINUX && SPARC64.
(struct_user_offsets): Ifdef out those which do not exist
on SPARC64.
* net.c (sys_pipe): Handle LINUX && SPARC64.
* ioctl.c: Fix initializer typo for nioctlents2, was
nioctlents1 by accident.
/external/strace/syscall.c
998fac70497f071897c79571ced1486ae3c260d8 23-Jun-2004 Roland McGrath <roland@redhat.com> 2004-06-22 Roland McGrath <roland@redhat.com>

* syscall.c (syscall_fixup) [LINUX && X86_64]: For 32-bit process,
sign extend the low 32 bits of RAX to 64 bits.
* syscall.c (force_result): [LINUX && X86_64]: Fix RAX*4 -> RAX*8.
/external/strace/syscall.c
d62b6711b4d9cfff3b578fd208175f2aa1ae1430 02-Mar-2004 Roland McGrath <roland@redhat.com> 2004-03-01 Roland McGrath <roland@redhat.com>

* strace.c (main): Avoid potential buffer overruns from ludicrous
arguments or PATH values.
* syscall.c (qual_signal): Bail out for too-long string.
/external/strace/syscall.c
ce9f0740d3b6e9910f25712771961bdb4bb4eaa2 01-Mar-2004 Roland McGrath <roland@redhat.com> 2004-03-01 Roland McGrath <roland@redhat.com>

* configure.ac: Check for `struct pt_all_user_regs'
and `struct ia64_fpreg' in <sys/ptrace.h>.
* util.c, process.c, syscall.c: Work around conflicts between
<sys/ptrace.h> and <linux/ptrace.h> for defining those types.
/external/strace/syscall.c
b4ce17690f176b972a8cb5cbdd1005bbd4aecf15 01-Mar-2004 Roland McGrath <roland@redhat.com> 2004-02-26 Andreas Schwab <schwab@suse.de>

* defs.h [LINUX && IA64]: Declare getrval2 also on IA64.
* net.c (sys_pipe) [LINUX && IA64]: For IA64 use the two return values.
* syscall.c (getrval2) [LINUX && IA64]: Implement for IA64.
/external/strace/syscall.c
08267b8d6703c23332e39b1296e10e327196acb3 20-Feb-2004 Roland McGrath <roland@redhat.com> 2003-12-31 David Mosberger <davidm@hpl.hp.com>

* process.c (internal_exit): For ia64, also recognize IA-32 252
as exit_group().
(change_syscall): For IA64, also support changing IA-32 syscalls.
* syscall.c (internal_syscall): For IA64, also recognize IA-32
syscall 252 (exit_group) as an internal_exit() syscall.
* util.c (SYS_fork): For IA64, define them to the IA-32 syscall
number.
(SYS_vfork): Likewise.
(arg_setup): For IA64 version, also support IA-32 syscalls.
(get_arg0): Likewise.
(get_arg1): Likewise.
(set_arg0): Likewise.
(set_arg1): Likewise.
/external/strace/syscall.c
182aa38bb22283612dbed7cfa82f972529ee196e 20-Feb-2004 Roland McGrath <roland@redhat.com> 2004-01-13 Roland McGrath <roland@redhat.com>

* syscall.c (force_result) [LINUX] [S390 || S390X]: Remove bogus upeek
call.
/external/strace/syscall.c
190f8dd7b15ae1798750dad5db94c729f6e171c7 13-Jan-2004 Roland McGrath <roland@redhat.com> 2003-12-14 Anton Blanchard <anton@samba.org>

* syscall.c (get_error) [POWERPC]: Cast result to unsigned long for
ppc64, we were misreporting syscalls that really succeeded as having
failed.
/external/strace/syscall.c
ee9c5b5d6321bc7e9c7d0553716d9d4fe09f1061 01-Nov-2003 Roland McGrath <roland@redhat.com> 2003-11-01 Roland McGrath <roland@redhat.com>

* syscall.c (trace_syscall) [LINUX]: Calculate ONE_TICK once using
setitimer rather than hard-coding a value based on HZ.
/external/strace/syscall.c
bb4833f1ae49b6dc1b1a24ac6d2546f4d7f5e936 22-Oct-2003 Roland McGrath <roland@redhat.com> 2003-10-21 Roland McGrath <roland@redhat.com>

* syscall.c: Revert last change, was broken.
/external/strace/syscall.c
a9da8cd179bb8cd374164d674828df9aa441402e 25-Sep-2003 Roland McGrath <roland@redhat.com> 2003-09-24 Roland McGrath <roland@redhat.com>

* syscall.c (get_scno) [LINUX] [S390 || S390X]: Bail out of
instruction decoding branch if TCB_INSYSCALL is clear.
Reported by <jochen@penguin-breeder.org>.
/external/strace/syscall.c
9c555e71d22a9aa3baf02a49a989ee184a7b09be 09-Jul-2003 Roland McGrath <roland@redhat.com> 2003-07-05 Richard Henderson <rth@twiddle.net>

* process.c (sys_clone): Order arguments for alpha the same as x86_64.
* syscall.c (ERESTART_RESTARTBLOCK): New.
(trace_syscall): Print it.
* linux/alpha/syscallent.h (osf_syscall): Name properly.
(osf_set_program_attributes): Fix typo.
(osf_nfssvc): Likewise.
(osf_sigsendset): Likewise.
(getdents64, gettid, readahead, tkill, setxattr, lsetxattr, fsetxattr,
getxattr, lgetxattr, fgetxattr, listxattr, llistxattr, flistxattr,
removexattr, lremovexattr, fremovexattr, futex, sched_setaffinity,
sched_getaffinity, tuxcall, io_setup, io_destroy, io_getevents,
io_submit, io_cancel, exit_group, lookup_dcookie, epoll_create,
epoll_ctl, epoll_wait, remap_file_pages, set_tid_address,
restart_syscall, fadvise, timer_create, timer_settime, timer_gettime,
timer_getoverrun, timer_delete, clock_settime, clock_gettime,
clock_getres, clock_nanosleep, semtimedop): New.
/external/strace/syscall.c
f5a477788ed49d3c15e2080c03d30d4beaeefee3 27-Jun-2003 Roland McGrath <roland@redhat.com> 2003-06-26 Roland McGrath <roland@redhat.com>

* configure.ac: SHMEDIA -> SH64
* defs.h: Likewise.
* mem.c: Likewise.
* process.c: Likewise.
* sock.c: Likewise.
* syscall.c: Likewise.
* util.c: Likewise.
* linux/shmedia/syscallent.h: Moved to ...
* linux/sh64/syscallent.h: ... here.
/external/strace/syscall.c
7c051d2e4c748e1dd2ba9841ad1520ccce296ea4 27-Jun-2003 Roland McGrath <roland@redhat.com> 2003-06-26 Roland McGrath <roland@redhat.com>

* syscall.c (force_result) [LINUX] [ARM]: Fix variable usage.
From: Joshua Neal <tinara@netpipeline.net>.
/external/strace/syscall.c
2f924cafae418c582858f3e5de45df277026dd00 27-Jun-2003 Roland McGrath <roland@redhat.com> 2003-06-26 Roland McGrath <roland@redhat.com>

* syscall.c (get_scno) [S390 || S390X]: Fix old vs new mode detection.
From Michael Holzheu <HOLZHEU@de.ibm.com>.
/external/strace/syscall.c
0f87c4972f20f102149e3ec84073c0e9d53e146d 04-Jun-2003 Roland McGrath <roland@redhat.com> 2003-06-03 Roland McGrath <roland@redhat.com>

Linux/ARM improvements from Russell King <rmk@arm.linux.org.uk>:
* defs.h [LINUX] (TCB_WAITEXECVE): Define for [ARM] too.
* process.c (struct_user_offsets) [LINUX] [ARM]: Add ARM registers.
* signal.c [LINUX] (sys_sigreturn) [ARM]: New case.
* syscall.c (get_scno, syscall_fixup) [LINUX] [ARM]: Case rewritten.
(get_error) [LINUX] [ARM]: Update.
(syscall_enter) [LINUX] [ARM]: New case.
* util.c (printcall) [LINUX] [ARM]: New case.
/external/strace/syscall.c
e1e584b8fa0d97caad461f82a5427cd37d6327f3 02-Jun-2003 Roland McGrath <roland@redhat.com> 2003-06-02 Roland McGrath <roland@redhat.com>

* configure.ac, defs.h, mem.c, process.c, sock.c, syscall.c, util.c:
Merged in SHmedia port from Stephen Thomas <stephen.thomas@superh.com>.
/external/strace/syscall.c
2b61902ee98ec63603abd8b0c84b0c9d4fa70c48 10-Apr-2003 Roland McGrath <roland@redhat.com> 2003-04-10 Roland McGrath <roland@redhat.com>

* syscall.c (qual_desc): Return zero after parsing number.
From Rob Leslie <rob@mars.org>, fixes Debian bug #188379.
/external/strace/syscall.c
6b1d43ef29a23e5e0aba381f70e2f64e9cface30 31-Mar-2003 Roland McGrath <roland@redhat.com> 2003-02-26 Stuart Menefy <stuart.menefy@st.com>

Various fixes for SuperH [SH]:
* mem.c (sys_old_mmap): mmap() parameters passed in registers
* net.c (sys_pipe), syscall.c (getrval2): pipe() results returned
in registers
* process.c (change_syscall): Fixed register which holds system
call number
* util.c (arg0_offset, arg1_offset): provide definition
* Makefile.am: Added new files in linux/sh
* linux/sh/syscallent.h: New file.
* linux/sh/errnoent.h: New file.
* linux/sh/ioctlent.h: New file.
* linux/sh/signalent.h: New file.
/external/strace/syscall.c
ba95476dd48d5d1b250fdf2ab23af569f805a805 05-Mar-2003 Roland McGrath <roland@redhat.com> 2003-03-04 Roland McGrath <roland@redhat.com>

* syscall.c (get_scno) [IA64]: Do TCB_WAITEXECVE check only when
TCB_INSYSCALL is clear, like other platforms do.
/external/strace/syscall.c
f3a0e1bb56176d1f41aa92be3c7128f0ad1b1543 20-Feb-2003 Roland McGrath <roland@redhat.com> 2003-02-19 Roland McGrath <roland@redhat.com>

FreeBSD rfork support changes from Russ Cox <rsc@plan9.bell-labs.com>:
* syscall.c (internal_syscall): Handle SYS_rfork with internal_fork.
* process.c (internal_fork) [SYS_rfork]: Bail if RFPROC flag not set.
/external/strace/syscall.c
96dc5148ff0d74a44853431f4eb6b6143de3f71c 20-Jan-2003 Roland McGrath <roland@redhat.com> 2003-01-20 Roland McGrath <roland@redhat.com>

* defs.h [LINUX] [S390 || S390X] (TCB_WAITEXECVE): Define it.
* syscall.c (get_scno, syscall_fixup) [LINUX] [S390 || S390X]: Handle
TCB_WAITEXECVE state with special kludges.
/external/strace/syscall.c
eb285359906700f46b22cf4f9911695034313736 14-Jan-2003 Roland McGrath <roland@redhat.com> 2003-01-14 Roland McGrath <roland@redhat.com>

* configure.ac: Match powerpc* (includes powerpc64), and don't match
ppc (never comes out of config.sub).
* process.c (sys_ptrace): Use #lx format for address argument.
[POWERPC]: Use sizeof(unsigned long) in place of 4 for multipliers.
* process.c [POWERPC]: Likewise.
* signal.c (sys_sigreturn) [POWERPC]: Likewise.
* syscall.c (get_scno) [POWERPC]: Likewise.
* util.c [POWERPC]: Likewise.
(printnum): Use long for NUM.
From Anton Blanchard <anton@samba.org>.
/external/strace/syscall.c
d38809b8bd82bbebad7da330398c07bf1a7d215e 10-Jan-2003 Roland McGrath <roland@redhat.com> 2003-01-09 Roland McGrath <roland@redhat.com>

* syscall.c (force_result) [S390 || S390X]: Fix typo.
/external/strace/syscall.c
923f75011953091f1e0c5b734f7ff98f71f9791b 09-Jan-2003 Roland McGrath <roland@redhat.com> 2003-01-08 Roland McGrath <roland@redhat.com>

Support for new Linux 2.5 thread features.
* defs.h [LINUX]: Define __NR_exit_group if not defined.
(struct tcb): New members nclone_threads, nclone_detached,
and nclone_waiting.
(TCB_CLONE_DETACHED, TCB_CLONE_THREAD, TCB_GROUP_EXITING): New macros.
(waiting_parent): Macro removed.
(pid2tcb): Declare it.
* process.c (internal_clone) [TCB_CLONE_THREAD]: Reparent the new
child to our parent if we are a CLONE_THREAD child ourselves.
Maintain TCB_CLONE_THREAD and TCB_CLONE_DETACHED flags and counts.
(internal_wait) [TCB_CLONE_THREAD]: Factor out detached children when
determining if we have any. If TCB_CLONE_THREAD is set, check
parent's children instead of our own, and bump nclone_waiting count.
(internal_exit) [__NR_exit_group]: Set the TCB_GROUP_EXITING flag if
the syscall was exit_group.
* syscall.c (internal_syscall): Use internal_exit for exit_group.
* strace.c (pid2tcb): No longer static.
(alloctcb) [TCB_CLONE_THREAD]: Initialize new fields.
(droptcb) [TCB_CLONE_THREAD]: Maintain new fields.
If we have thread children, set TCB_EXITING and don't clear the TCB.
(resume) [TCB_CLONE_THREAD]: Decrement parent's nclone_waiting.
(detach) [TCB_CLONE_THREAD]: When calling resume, check all thread
children of our parent that might be waiting for us too.
[TCB_GROUP_EXITING] (handle_group_exit): New function.
(trace) [TCB_GROUP_EXITING]: Use that in place of detach or droptcb.
/external/strace/syscall.c
9797cebddbb0b2ce2ed19ed31ffdbd25d1f860da 30-Dec-2002 Roland McGrath <roland@redhat.com> 2002-12-30 Roland McGrath <roland@redhat.com>

* syscall.c (qualify_one): New function.
(qual_options): Replace lookup field with qualify, update initializer.
(qualify): Update caller.
(qual_signal, qual_fault, qual_desc): Rewritten from lookup_*.
(qual_syscall): Rewritten lookup_syscall, match name more than once.
Fixes RH#70579, bites IA64 -efoo when foo exists on IA32.
/external/strace/syscall.c
b69f81b8e552ab9ecdc5605887458adb0cb9542a 22-Dec-2002 Roland McGrath <roland@redhat.com> 2002-12-21 Roland McGrath <roland@redhat.com>

* syscall.c (force_result): New function.
* process.c (internal_wait): Handle ECHILD exit from wait call with
WNOHANG flag set; force the return value to 0 in the inferior when it
has live children we are tracing.
/external/strace/syscall.c
761b5d790f0b75f5589825c6885562374c7432a3 16-Dec-2002 Roland McGrath <roland@redhat.com> 2002-12-15 Roland McGrath <roland@redhat.com>

* syscall.c (syscall_enter) [LINUX && POWERPC]: Define PT_ORIG_R3 if
not defined, since <asm/ptrace.h> defines it only #ifdef __KERNEL__.
* process.c: Likewise.
* syscall.c (trace_syscall): Use strerror, not sys_errlist/sys_nerr.
* syscall.c (get_scno): Move static `currpers' inside #ifdef X86_64.
(trace_syscall): Fix return without value.
/external/strace/syscall.c
882eda809cc23387fe5072a53d7b19a8393c5b32 11-Nov-2002 Michal Ludvig <mludvig@suse.cz> 2002-11-09 Heiko Carstens <heiko.carstens@de.ibm.com>

Bugfix for s390/s390x:
* syscall.c: Fixed scno derivation for s390/s390x.
/external/strace/syscall.c
17f8fb3484e94976882f65b7a3aaffc6f24cd75d 06-Nov-2002 Michal Ludvig <mludvig@suse.cz> Added switch for printing only succeeding syscalls.
/external/strace/syscall.c
10a88d09ebe283d0dd2ba5deccfe50dc20ea5821 07-Oct-2002 Michal Ludvig <mludvig@suse.cz> 2002-10-07 Michal Ludvig <mludvig@suse.cz>

Merged s390x port by Heiko Carstens <Heiko.Carstens@de.ibm.com>
and bugfixes to s390 by D.J. Barrow.
/external/strace/syscall.c
0e035502d28ef981636abde3139247e6fb2bfcce 23-Sep-2002 Michal Ludvig <mludvig@suse.cz> 2002-09-23 Michal Ludvig <mludvig@suse.cz>
Merged x86-64 port by Andi Kleen <ak@suse.de>
and Michal Ludvig <mludvig@suse.cz>
* Makefile.in: New target 'headers'. Failure ignored.
* acconfig.h: New defines for x86-64.
* configure.in: Ditto.
* defs.h: Ditto.
* file.c: Ditto.
* signal.c: Ditto.
* process.c: Added support for x86-64.
* util.c: Ditto.
* syscall.c: Ditto + added automatic personality switching.
* linux/syscall.h: Ditto.
* linux/x86_64: New directory.
* linux/x86_64/Makefile.in: New file.
* linux/x86_64/gentab.pl: Ditto.
* linux/x86_64/i386-headers.diff: Ditto.
* linux/x86_64/makeheaders.sh: Ditto.
* linux/x86_64/syscallent.h: Ditto.
* mem.c (print_mmap): Always print arg[4] as int.
/external/strace/syscall.c
53b320f61f9c5f4278db227ed21db5a1937d58c3 23-Sep-2002 Michal Ludvig <mludvig@suse.cz> 2002-09-23 Michal Ludvig <mludvig@suse.cz>
* configure.in: Fix regular expressions.
* linux/syscall.h: Added missing braces in prototype of
sys_getdents64().
* file.c: Use '#ifdef LINUX' instead of '#ifdef linux'.
(struct fileflags): Made extern to inhibit compiation warnings.
(sys_getdents64): Merged LINUX and SVR4 part.
* syscall.c(get_scno): Split multiline string into two distinct
strings.
/external/strace/syscall.c
ccef63782c10d9ce9da77ef7530861a3d14b1300 01-May-2002 Wichert Akkerman <wichert@deephackmode.org> Merge patch from Greg Banks for Linux/SuperH support
/external/strace/syscall.c
4527dae3b8c2041831d55193f7aa6cae70ea4704 31-Mar-2002 Wichert Akkerman <wichert@deephackmode.org> check for negative u_errors
/external/strace/syscall.c
7b3346be42d6a1f539e95d385ee498f8b3c529f8 10-Oct-2001 Wichert Akkerman <wichert@deephackmode.org> Import lots of ia64 related changes from David Mosberger
/external/strace/syscall.c
1d08dcf46dd4b2cfe3e27723c05b0aec9955c591 10-Jul-2001 John Hughes <john@Calva.COM> Merge iov fixes from Richard Kettlewell
/external/strace/syscall.c
4e36a8151bccaba338bf8513a367d287d193f524 18-Apr-2001 John Hughes <john@Calva.COM> Handle fork1/forkall on uw, handle rfork1,rforkall,rexecve and ssisys on uw non-stop-clusters
/external/strace/syscall.c
00a82eed2b1b7989a8659390c23b8a87425f235d 28-Mar-2001 Wichert Akkerman <wichert@deephackmode.org> several Linux/sparc fixes
/external/strace/syscall.c
c1652e2095fcd9ac62cf2669ef6aec5fd0052851 27-Mar-2001 Wichert Akkerman <wichert@deephackmode.org> Add Linux/hppa port, patch from Richard Hirst
/external/strace/syscall.c
61eeb55be47ab952bc1c01682670066cf7a79e99 06-Mar-2001 John Hughes <john@Calva.COM> Fix for freebsd 4.1
/external/strace/syscall.c
bdf48f55f264a9cd2eb1b3cac8f1f87c1acad008 06-Mar-2001 John Hughes <john@Calva.COM> Merge Harald B�hme's solaris patches
/external/strace/syscall.c
252997128dcb73565fc95d6a22b60079c11005c6 06-Mar-2001 John Hughes <john@Calva.COM> Use pr_syscall on UW
/external/strace/syscall.c
bf79f2e16b090ffe59cd1e1820935680a2da7b78 01-Sep-2000 Wichert Akkerman <wichert@deephackmode.org> Add FreeBSD support
/external/strace/syscall.c
16a03d2e97415afe6cf34172a0aea97a95a0b160 10-Aug-2000 Wichert Akkerman <wichert@deephackmode.org> test/clone.c: minor fixup
Another bunch of patches from John Hughes merged:
signal.c:
+ SVR4 printcontext(): sigset_t != sigset_t*
+ getcontext returns a value, so print on exit of syscall
+ add UC_FP to ucontext_flags for OS writers that can't spell
+ sys_signal(): special case SIG_{ERR,DFL,IGN}
+ decode_subcall(): only do subcall range checking when needed
bunch of UnixWare updates
aclocal.m4, acconfig.h, configure.in: add test for long long type
/external/strace/syscall.c
5ae21ead9f83597452f9a0517e8a51fa4823f921 01-May-2000 Wichert Akkerman <wichert@deephackmode.org> The `too much stuff, just check the ChangeLog' update
/external/strace/syscall.c
c792698a99b640e7d256e8692c992bd967f0c5b2 11-Apr-2000 Wichert Akkerman <wichert@deephackmode.org> README-linux: updated to note that strace might not compile
with development kernels
bjm.c: sys_query_module: check if malloc succeeds
system.c: sys_cap[gs]et(): check if malloc succeeds, only malloc once
linux/syscallent.h: updated for 2.3.99pre3
linux/alpha/syscallent.h: updated for 2.3.99pre3, add all osf syscalls
even though Linux doesn't implement them
syscall.c: add global variables for MIPS registers as well
syscall.c: move global variables to before get_scno since that uses them
util.c: oops, misspelled defined
process.c: fix ptrace calls in change_syscall
mem.c: decode sys_madvise
Merge patch from Topi Miettinen <Topi.Miettinen@nic.fi>
+ add support for quotactl, fdatasync, mlock, mlockall, munlockall & acct
+ small fix for RLIMIT_* and RUSAGE_BOTH
+ enhace support for capget and capset
/external/strace/syscall.c
faf722234dc8af97776f94fdda7e100fb60650a2 20-Feb-2000 Wichert Akkerman <wichert@deephackmode.org> test/vfork.c: new file to test vfork traces
test/.cvsignore: new file
defs.h: Up maximum number of traced processed to 64
strace.c: Disable some debugging code from davidm
implement setarg for more architectures
implement change_syscall
/external/strace/syscall.c
2ee6e45f36566e8735b35ffad40bfcc626a25a98 18-Feb-2000 Wichert Akkerman <wichert@deephackmode.org> Fixup isdigit calls
/external/strace/syscall.c
12f75d1a388cd2eaf1edb7b73daea243210c4ea0 14-Feb-2000 Wichert Akkerman <wichert@deephackmode.org> S390 updates
/external/strace/syscall.c
8b1b40cd8b49151374d0ac2a5b1a4b459f9e0ae5 03-Feb-2000 Wichert Akkerman <wichert@deephackmode.org> Merge Trillian patches (Linux ia64)
/external/strace/syscall.c
4dc3b141be2e109170fb515b98723545474ac701 01-Feb-2000 Pavel Machek <pavel@ucw.cz> Split trace_syscall into few functions to make code readable.
/external/strace/syscall.c
d8ae7e332a15c12a488efa40136fa07f7dafa34b 01-Feb-2000 Pavel Machek <pavel@ucw.cz> Cleaned up __NR_SYSCALL_BASE: less number of #ifdef's in main code is
always good.
/external/strace/syscall.c
7a0b649aeace5c1e1efe4a1d7b1ae6e3a87e0d44 23-Dec-1999 Wichert Akkerman <wichert@deephackmode.org> Begin work on supporting clone
/external/strace/syscall.c
4dc8a2aec63e4fb5ee2688544c4de323ed5de3ef 23-Dec-1999 Wichert Akkerman <wichert@deephackmode.org> Bunch of stuff
/external/strace/syscall.c
f90da01fd19a7779d6ed9ad66605367ae43bb2fd 31-Oct-1999 Wichert Akkerman <wichert@deephackmode.org> Add Linux MIPS support
/external/strace/syscall.c
15dea97f8a05b2b67f5752137fe93e3cc20db6ec 06-Oct-1999 Wichert Akkerman <wichert@deephackmode.org> Compilation updates
/external/strace/syscall.c
9ce1a63eb20b069607c06f9645ac5a17b418a5f3 30-Aug-1999 Wichert Akkerman <wichert@deephackmode.org> Catching up on my mail-backlog, see ChangeLog for details
/external/strace/syscall.c
b046b38593b6bca6b6c49ac1fcc09dd5cd4c94b2 14-Jul-1999 Wichert Akkerman <wichert@deephackmode.org> Update sys/reg.h usage in syscall.c as well
/external/strace/syscall.c
2b483ba988f29e4715db8ee80b7a5ebc77e5027d 24-Jun-1999 Wichert Akkerman <wichert@deephackmode.org> Fix conditions for including sys/reg.h and linux/ptrace.h
/external/strace/syscall.c
e6f876c49de4a5f535e476804e4627f8e0ecb869 22-Jun-1999 Wichert Akkerman <wichert@deephackmode.org> Linux/powerpc and SunOS fixes
/external/strace/syscall.c
8829a55dc2b13a00be7402f4bf644178a12e9f74 11-Jun-1999 Wichert Akkerman <wichert@deephackmode.org> Various fixes, see ChangeLog for details
/external/strace/syscall.c
dacfb6ebd630641d851b6df94c3b4587969a6cfb 03-Jun-1999 Wichert Akkerman <wichert@deephackmode.org> Add sparc patches from Jakub Jelinek
/external/strace/syscall.c
8783c011ea6b511c52c7813132d29751c0746f5f 29-May-1999 Ulrich Drepper <drepper@redhat.com> Don't include linux/ptrace.h for glibc.
/external/strace/syscall.c
b859bea10a0945681ecc66a1aa06ae4cc5845af8 19-Apr-1999 Wichert Akkerman <wichert@deephackmode.org> Change number of personalities for Linux sparc to 2
Minor other fixes
/external/strace/syscall.c
ce780fc9e6067b15b65ca2904c698c77503bf635 30-Mar-1999 Nate Sammons <nate@users.sourceforge.net> Add new function `signame', which returns name (SIGXXX) of numeric
signal, and replace lookups in signalent[] with calls to it.
/external/strace/syscall.c
9047076564d0a097897f165a1311f35f8a2b116b 17-Mar-1999 Wichert Akkerman <wichert@deephackmode.org> sys/reg apparently only exists on i386 and m68k, so fix the test in
a couple of files
/external/strace/syscall.c
76baf7c9f6dd61a15524ad43c1b690c252cf5b7c 19-Feb-1999 Wichert Akkerman <wichert@deephackmode.org> Initial revision
/external/strace/syscall.c