f32126ba790dd4e61d43a2140b24f02426297bb6 |
|
31-Dec-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Move gcc compat macros to gcc_compat.h * defs.h: Include "gcc_compat.h". (GNUC_PREREQ, ATTRIBUTE_NORETURN, ATTRIBUTE_FORMAT, ATTRIBUTE_ALIGNED, ATTRIBUTE_PACKED, ATTRIBUTE_MALLOC, ATTRIBUTE_NOINLINE, ATTRIBUTE_ALLOC_SIZE): Move ... * gcc_compat.h: ... here. * Makefile.am (strace_SOURCES): Add gcc_compat.h.
/external/strace/defs.h
|
34683e3926d8c2daa368afb805da422ee7043396 |
|
15-Dec-2015 |
Szabolcs Nagy <nsz@port70.net> |
Fix SYS_FUNC and SEN macros for musl The syscall_name argument was subject to macro expansion because it was passed down to other macros before it was prefixed. musl libc defines lfs64 names as macros (e.g. fstat64 as fstat) so SYS_FUNC(fstat64) was expanded to sys_fstat. This change adds the prefix before the name is passed to other macros, i.e. the argument of SYS_FUNC_NAME is already prefixed with sys_. * defs.h (SYS_FUNC): Add sys_ prefix to SYS_FUNC_NAME's argument. (SYS_FUNC_NAME): Do not add sys_ prefix to MPERS_FUNC_NAME's argument. * linux/ia64/syscallent.h (SYS_FUNC_NAME): Do not add sys_ prefix to MPERS_FUNC_NAME's argument. * syscall.c (SEN_NAME): Remove. (SEN): Replace SEN_NAME call with its definition. Add sys_ prefix to SYS_FUNC_NAME's argument.
/external/strace/defs.h
|
da126fbd77d3ead8f2866ffadd0d2a751f8e4755 |
|
14-Dec-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Replace HAVE_LITTLE_ENDIAN_LONG_LONG with WORDS_BIGENDIAN * defs.h: Use WORDS_BIGENDIAN instead of HAVE_LITTLE_ENDIAN_LONG_LONG. * configure.ac (AC_LITTLE_ENDIAN_LONG_LONG): Remove. * m4/long_long.m4: Remove.
/external/strace/defs.h
|
c37173f76de6163d746266f78a8485f576ddb6a8 |
|
09-Dec-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
aarch64: swap 64-bit and 32-bit personalities Let native 64-bit personality be personality 0, and 32-bit personality be personality 1, to follow the traditional layout used for other architectures. * defs.h [AARCH64]: Swap PERSONALITY0_WORDSIZE and PERSONALITY1_WORDSIZE, remove DEFAULT_PERSONALITY. [AARCH64 && HAVE_M32_MPERS]: Rename PERSONALITY1_* to PERSONALITY0_*. * file.c [AARCH64 || defined X86_64 || defined X32]: Define STAT32_PERSONALITY for AARCH64 as well. * syscall.c (update_personality) [AARCH64]: Adjust PERSONALITY_NAMES. * linux/aarch64/errnoent1.h: Adjust comment. * linux/aarch64/get_error.c (get_error): Adjust tcp->currpers check. * linux/aarch64/get_syscall_args.c (get_syscall_args): Likewise. * linux/arm/arch_sigreturn.c (arch_sigreturn) [AARCH64]: Likewise. * linux/aarch64/get_scno.c (arch_get_scno): Adjust update_personality invocations. * linux/aarch64/ioctls_arch0.h: Swap with ... * linux/aarch64/ioctls_arch1.h: ... this file. * linux/aarch64/ioctls_inc0.h: Swap with ... * linux/aarch64/ioctls_inc1.h: ... this file. * linux/aarch64/syscallent.h: Swap with ... * linux/aarch64/syscallent1.h: ... this file.
/external/strace/defs.h
|
8b6046a052255fe71fac200f0f7b3b76419dc16d |
|
04-Dec-2015 |
Gabriel Laskar <gabriel@lse.epita.fr> |
ioctl: allow to stop decoding number For some ioctls, like from drm, the identification of the correct ioctl is done by custom code. Specifying IOCTL_NUMBER_STOP_LOOKUP on return of ioctl_decode_command_number() disables further calls to ioctl_lookup(). * defs.h (IOCTL_NUMBER_UNKNOWN, IOCTL_NUMBER_HANDLED, IOCTL_NUMBER_STOP_LOOKUP): Add macros representing ioctl number state decoding. * ioctl.c (SYS_FUNC(ioctl)): Skip ioctl_lookup() when ioctl_decode_command_number() returns a value with IOCTL_NUMBER_STOP_LOOKUP flag is set. Suggested-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/defs.h
|
a2fdfe96d517b2187b6707c09cde3d1ffcf3ee9c |
|
26-Nov-2015 |
Elvira Khabirova <lineprinter0@gmail.com> |
Refer to -h on incorrect usage * defs.h (error_msg_and_help): New prototype. * strace.c (error_msg_and_help): New function. (error_opt_arg, init): Use it. (usage): Remove unnecessary arguments. * count.c: Use the new function.
/external/strace/defs.h
|
5cb45b25a37390afab4a62220ce148a2c135e595 |
|
20-Nov-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
mpers: skip xlat struct definitions in mpers mode Avoid duplicate definitions of xlat structures in files compiled in mpers mode. Each xlat file defines the corresponding xlat struct with either global or local visibility using the following rules: - if xlat struct declaration is available in defs.h, a global definition is provided in regular mode, and nothing is provided in mpers mode; - otherwise, if xlat file is included by a mpers source file, a global definition is provided in regular mode (unless no mpers mode is supported on this architecture, in that case, a local definition is provided instead), and a declaration is provided in mpers mode; - otherwise, a local definition is provided in regular mode, and an error message is printed in mpers mode. Fallback definitions of constants provided by xlat files remain available in all modes. * bootstrap: Invoke generate_mpers_am.sh before xlat/gen.sh. * defs.h (adjtimex_modes, adjtimex_status, sigev_value): Remove. * generate_mpers_am.sh: Generate mpers_xlat.h. * Makefile.am (EXTRA_DIST): Add mpers_xlat.h. * print_sigevent.c: Include "xlat/sigev_value.h" unconditionally. * print_timex.c: Include "xlat/adjtimex_modes.h" and "xlat/adjtimex_status.h" unconditionally. * xlat/gen.sh (cond_xlat): Move printing of fallback definitions ... (cond_def): ... here. (gen_header): Check also mpers_xlat.h for global declarations of xlat structures. Process input file twice, first time print directives only, second time print everything. Wrap struct xlat into #ifdef IN_MPERS ... #else ... #endif. * xlat/getrandom_flags.in: Cleanup.
/external/strace/defs.h
|
a367db8e5b0e1d852af1c3d358c9f7204077fd73 |
|
19-Nov-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Mpersify parsers of readdir and getdents syscalls * defs.h (dirent_types): New xlat prototype. * dirent.c: Stop including "xlat/direnttypes.h". (kernel_dirent): New typedef. Mpersify it. (print_old_dirent): Use it instead of old_dirent_t. (SYS_FUNC(getdents)): Use it instead of struct kernel_dirent. Rename direnttypes to dirent_types. (SYS_FUNC(getdents64)): Move ... * dirent64.c: ... here. Rename direnttypes to dirent_types. Include "xlat/dirent_types.h". * Makefile.am (strace_SOURCES): Add dirent64.c. * xlat/direnttypes.in: Rename to xlat/dirent_types.in.
/external/strace/defs.h
|
4cb5ccca247ca1560ce711e35c430805034e4c6b |
|
18-Sep-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Convert another parser of struct timeval to new mpers infrastructure * print_time.c (sprint_timeval): New mpers printer. [ALPHA] (sprint_timeval32): New function. * defs.h [ALPHA] (sprint_timeval32): New prototype. (bitness_t, TIMEVAL_TEXT_BUFSIZE, printtv_bitness, sprinttv): Remove. * desc.c (decode_select): Replace bitness parameter with two printers. Use them instead of printtv_bitness and sprinttv. (sys_oldselect, sys_select): Pass print_timeval and sprint_timeval to decode_select. [ALPHA] (sys_osf_select): Pass print_timeval32 and sprint_timeval32 to decode_select. (pselect6): Pass print_timespec and sprint_timespec to decode_select. * time.c (UTIME_NOW, UTIME_OMIT, current_time_t_is_compat, struct timeval32, printtv_bitness, do_sprinttv, sprinttv): Remove.
/external/strace/defs.h
|
2950de36314b5ea88a3741e24f948113358f7ce2 |
|
18-Sep-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Convert another parser of struct timespec to new mpers infrastructure * print_time.c (sprint_timespec): New mpers printer. * defs.h (TIMESPEC_TEXT_BUFSIZE): Update. (sprint_timespec): Remove. * time.c (sprint_timespec): Remove. * net.c (sys_recvmmsg): Update callers. * poll.c (decode_poll_exiting): Likewise.
/external/strace/defs.h
|
f1e3a320458be22ef7e308f44d0a7b80887da36b |
|
18-Sep-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Convert parser of struct timeval to new mpers infrastructure * defs.h (printtv, printtv_special): Remove. [ALPHA] (print_timeval32, print_timeval32_pair): New prototypes. * print_time.c (print_timeval): New mpers printer. [ALPHA] (print_timeval32, print_timeval32_pair): New functions. * time.c (sys_gettimeofday, sys_settimeofday): Use print_timeval instead of printtv. [ALPHA] (sys_osf_gettimeofday, sys_osf_settimeofday): Use print_timeval32 instead of printtv_bitness. * utimes.c [ALPHA] (sys_osf_utimes): Use print_timeval32_pair instead of printtv_bitness.
/external/strace/defs.h
|
5938526c818336357b97caa8fd89d58a12987b02 |
|
18-Sep-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Convert parser of struct timespec to new mpers infrastructure * defs.h (print_timespec): Remove. * print_time.c (print_timespec): New mpers printer. * futex.c (sys_futex): Use print_timespec instead of printtv. * ipc_sem.c (sys_semtimedop): Likewise. * mq.c (sys_mq_timedsend, sys_mq_timedreceive): Likewise. * time.c (clock_settime, clock_gettime, clock_nanosleep): Likewise. (print_timespec): Remove.
/external/strace/defs.h
|
9af94a2f486064a62cce5439fd417a992e591eae |
|
18-Sep-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Add is_erestart helper function * defs.h (is_erestart): New prototype. * syscall.c (is_erestart): New function. * time.c (sys_nanosleep): Use is_erestart, temporarily_clear_syserror, and restore_cleared_syserror.
/external/strace/defs.h
|
3858b93ad9d2d3990f6724585e14675e663a1b5d |
|
18-Sep-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Add helper functions to clear/restore syserror * defs.h (temporarily_clear_syserror, restore_cleared_syserror): New prototypes. * syscall.c (saved_u_error): New variable. (temporarily_clear_syserror, restore_cleared_syserror): New functions. * aio.c (sys_io_getevents): Use temporarily_clear_syserror and restore_cleared_syserror. * mq.c (sys_mq_timedreceive): Likewise. * signal.c (sys_rt_sigtimedwait): Likewise.
/external/strace/defs.h
|
322be803420d5ebc312cf26e1a2c2eb7ac21c0e0 |
|
17-Sep-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Convert parser of struct itimerval to new mpers infrastructure * defs.h [ALPHA] (print_itimerval32): New prototype. * print_time.c (print_itimerval): New mpers printer. [ALPHA] (timeval32_t): New typedef. [ALPHA] (print_timeval32_t, print_itimerval32): New functions. * time.c (sys_getitimer, sys_setitimer): Use print_itimerval instead of printitv. [ALPHA] (sys_osf_getitimer, sys_osf_setitimer): Use print_itimerval32 instead of printitv_bitness. (tprint_timeval32, tprint_timeval, printitv_bitness, printitv): Remove.
/external/strace/defs.h
|
dad1eef568375be367868a2e3c4783251dbb7627 |
|
16-Sep-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Convert parser of struct timex to new mpers infrastructure * defs.h (adjtimex_modes, adjtimex_status): New xlat prototypes. * print_timex.c (struct_timex): New typedef. Mpersify it. [IN_MPERS]: Do not include "xlat/adjtimex_modes.h" and "xlat/adjtimex_status.h". [SUPPORTED_PERSONALITIES > 1]: Remove. (tprint_timeval): Remove. (tprint_timex): Rename to print_timex. Mpersify it. * time.c (do_adjtimex): Rename tprint_timex to print_timex. * tests/adjtimex.c: New file. * tests/adjtimex.test: New test. * tests/Makefile.am (check_PROGRAMS): Add adjtimex. (TESTS): Add adjtimex.test. * tests/.gitignore: Add adjtimex.
/external/strace/defs.h
|
6f950cc49907c0357aeaa66a9ef32970733f14ae |
|
16-Sep-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Convert parser of struct sigevent to new mpers infrastructure * defs.h (sigev_value): New prototype. (printsigevent): Remove. * print_sigevent.c (struct_sigevent): New typedef. Mpersify it. [IN_MPERS]: Do not include "xlat/sigev_value.h". (printsigevent32): Remove. (printsigevent): Rename to print_sigevent. Mpersify it. * mq.c (sys_mq_notify): Rename printsigevent to print_sigevent. * time.c (sys_timer_create): Likewise.
/external/strace/defs.h
|
e2fb0bb2cfdf3a8c9374dd9dea5848f212fbfec3 |
|
15-Sep-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Simplify use of mpers printers * native_defs.h: New file. * syscall.c: Include it. * mpers_type.h [!IN_MPERS] (MPERS_DEFS): Change to "native_defs.h". * defs.h (MPERS_PRINTER_NAME): Remove. [SUPPORTED_PERSONALITIES > 1] (MPERS_PRINTER_NAME, printers): Move ... * Makefile.am (printers.h): ... here. Add macro definitions for mpers printers. (m%_defs.h): Add redefinition of MPERS_PRINTER_NAME and inclusion of "$(mpers_PREFIX)printer_decls.h". (strace_SOURCES): Add native_defs.h. * README-mpers: Update instructions for using mpers printers. * ipc_msg.c (tprint_msgsnd, tprint_msgrcv): Call tprint_msgbuf directly. * mq.c (sys_mq_open, mq_getsetattr): Call printmqattr directly. * process.c (sys_ptrace): Call printsiginfo_at directly. * signal.c (print_sigqueueinfo, sys_rt_sigtimedwait): Likewise. * resource.c (sys_getrusage): Call printrusage directly. * utimes.c (sys_utimensat): Call print_timespec_utime_pair directly. (sys_utimes, sys_futimesat): Call print_timeval_pair directly. * wait.c (printwaitn): Call printrusage directly. (sys_waitid): Call printrusage and printsiginfo_at directly.
/external/strace/defs.h
|
b172a94d0263f163d33e0f2a0395267719916576 |
|
15-Sep-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Add a new helper function umove_ulong_array_or_printaddr * defs.h (umove_ulong_array_or_printaddr): New prototype. * util.c (umove_ulong_array_or_printaddr): New function. * desc.c (sys_pselect6): Use it instead of open-coding a proxy struct parser for different personalities. * io.c (tprint_iov_upto): Use it instead of open-coding a struct iovec parser for different personalities. * kexec.c (print_kexec_segments): Use it instead of open-coding a struct kexec_segment parser for different personalities. (print_seg): Pass arguments using an array.
/external/strace/defs.h
|
09a1a5a2caeb6277e1cd9c697064ee1f0b3e7589 |
|
15-Sep-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Rename umove_long_or_printaddr to umove_ulong_or_printaddr Rename the recently added function to reflect what kind of data type it actually deals with: unsigned long int, without sign extension. * defs.h (umove_long_or_printaddr): Rename to umove_ulong_or_printaddr, chage 3rd argument to unsigned long *. * util.c (umove_long_or_printaddr): Likewise. * aio.c (sys_io_submit): Update callers.
/external/strace/defs.h
|
a1fa83d8e1d6edf4ac4702013eac3793d81085e3 |
|
15-Sep-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
aarch64, ppc64, sparc64, tile: hook up mpers printers * defs.h [AARCH64 && HAVE_M32_MPERS]: Define PERSONALITY0_INCLUDE_FUNCS, PERSONALITY0_INCLUDE_PRINTERS_DECLS, and PERSONALITY0_INCLUDE_PRINTERS_DEFS. [POWERPC64 && HAVE_M32_MPERS]: Define PERSONALITY1_INCLUDE_FUNCS, PERSONALITY1_INCLUDE_PRINTERS_DECLS, and PERSONALITY1_INCLUDE_PRINTERS_DEFS. [SPARC64 && HAVE_M32_MPERS]: Likewise. [TILE && HAVE_M32_MPERS]: Likewise.
/external/strace/defs.h
|
6fb8c6feb9075fc96bd67a84ba61a0fdab6c80d8 |
|
18-Jul-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Mpersify parsers of getrusage, waitpid, wait4, and waitid syscalls Fix multiple personalities support in parsers of getrusage, waitpid, wait4, and waitid syscalls by converting printrusage into a mpersified printer. * defs.h (printrusage): Remove. * printrusage.c (rusage_t): New typedef. Mpersify it. (printrusage): Use it instead of struct rusage. Wrap function name into MPERS_PRINTER_DECL. * resource.c (sys_getrusage): Use mpersified printrusage. * wait.c (printwaitn, sys_waitid): Likewise.
/external/strace/defs.h
|
a0b62498fd9a1fb05018e102b08c72eb510fdc4c |
|
04-Aug-2015 |
Elvira Khabirova <lineprinter0@gmail.com> |
Mpersify printsiginfo_at printer Fix multiple personalities support in parsers of ptrace, rt_sigqueueinfo, rt_tgsigqueueinfo, rt_sigtimedwait and waitid syscalls by converting printsiginfo_at into a mpersified printer. * printsiginfo.c (siginfo_t): Mpersify. (printsiginfo_at): Wrap function name into MPERS_PRINTER_DECL. * defs.h (printsiginfo_at): Remove. * signal.c (print_sigqueueinfo, sys_rt_sigtimedwait): Use mpersified printsiginfo_at. * process.c (sys_ptrace): Likewise. * wait.c (sys_waitid): Likewise.
/external/strace/defs.h
|
092942206c3c6c9978a96e6589b97cc4029b6d89 |
|
04-Aug-2015 |
Elvira Khabirova <lineprinter0@gmail.com> |
Add mpers support Add a subsystem for semi-automatical definition of how parsers should work with personality-dependent (mpers) types of tracee's data. Create auxiliary libraries containing mpers syscall parsers and printer functions, one library for each possible nonnative target personality. Currently some parsers do not handle differences in definitions of data types between personalities, namely LP64 and ILP32. When this is the case, long integers, pointers, and all compound types containing long and pointer members may be printed incorrectly, because of differences in sizes, offsets and alignments. Since in most cases these are the only differences in desired behaviour of parsers and printers for different personalities, a correct way would be to compile one source code into multiple parsers, differing only in definitions of mpers types. To get a definition of a given type for nonnative personality a very basic .c file containing a declaration of a variable of this type is being compiled for this personality (using -m32 or -mx32 compiler flag). Information about the type is then being extracted from this binary's DWARF debug info with an awk script and put into a corresponding header file. Resulting headers are being used to compile mpers variations of syscall parsers and printer functions. In addition to syscall parsers, there can occur a need to create mpers printing functions, which then can be called from many places in the code (for example, printsiginfo_at). Such functions (printers) are marked in a special manner. For each possible nonnative target personality a library is being created, containing mpers variations of syscall parsers and printers. Only syscall parsers from files marked in a special manner and specially marked functions from such files are being recompiled and included in these libraries. generate_mpers_am.sh is called by bootstrap to find the files from strace_SOURCES which include MPERS_DEFS. During compilation, these files are being inspected for inclusions of DEF_MPERS_TYPE, and nonnative variations of each included type are being generated by an awk script. Mpers parser names are being modified during inclusions of syscallent headers for nonnative personalities. Pointers to printers are being stored in structs struct_printers, and a master pointer printers is being updated on every set_personality. * README-mpers: New README explaining how to use mpers support. * empty.h: New empty file. * generate_mpers_am.sh: New file. * mpers.awk: Likewise. * mpers.sh: Likewise. * mpers_test.sh: Likewise. * mpers_type.h: Likewise. * Makefile.am (strace_SOURCES): Add empty.h and mpers_type.h. (strace_CPPFLAGS, strace_LDFLAGS, strace_LDADD): Move to the beginning of the file. (strace_LDADD, noinst_LIBRARIES): Add libmpers-%.a. (EXTRA_DIST): Add mpers.awk, mpers.sh, mpers_test.sh. (BUILT_SOURCES, CLEANFILES): Add new generated files: native_printer_decls.h, native_printer_defs.h, printers.h, [HAVE_M32_MPERS] $(mpers_m32_targets), and [HAVE_MX32_MPERS] $(mpers_mx32_targets). (mpers_NAME, mpers_PREFIX, mpers_DEFS, mpers_INCLUDES, mpers_CPPFLAGS, mpers_sh_opts, libmpers_CPPFLAGS, libmpers_m[x]32_a_SOURCES, libmpers_m[x]32_a_CPPFLAGS, mpers_m[x]32_targets): New variables. (mpers-m[x]32.stamp, m[x]32_defs.h, m[x]32_funcs.h, printers.h, %_printer_decls.h, %_printer_defs.h, clean-local, native_printer_decls.h, native_printer_defs.h, $mpers_m[x]32_targets): New targets. * bootstrap: Add generate_mpers_am.sh. * configure.ac: Add AC_PROG_RANLIB. * m4/mpers.m4: Add HAVE_MPERS variable. Add $st_cv_mpers checks. * defs.h: Include mpers_type.h. Include printers.h, native_printer_decls.h, define MPERS_PRINTER_NAME. Redefine SYS_FUNC_NAME. Define MPERS_PRINTER_DECL. [HAVE_M32_MPERS]: define PERSONALITY1_INCLUDE_FUNCS, PERSONALITY1_INCLUDE_PRINTERS_DECLS, PERSONALITY1_INCLUDE_PRINTERS_DEFS for X86_64, X32. [HAVE_MX32_MPERS]: define PERSONALITY2_INCLUDE_FUNCS, PERSONALITY2_INCLUDE_PRINTERS_DECLS, PERSONALITY2_INCLUDE_PRINTERS_DEFS for X86_64. Add fallback definitions of PERSONALITY1_INCLUDE_FUNCS, PERSONALITY2_INCLUDE_FUNCS, PERSONALITY0_INCLUDE_PRINTERS_DECLS, PERSONALITY0_INCLUDE_PRINTERS_DEFS, PERSONALITY1_INCLUDE_PRINTERS_DECLS, PERSONALITY1_INCLUDE_PRINTERS_DEFS, PERSONALITY2_INCLUDE_PRINTERS_DECLS, PERSONALITY2_INCLUDE_PRINTERS_DEFS. * syscall.c: Include PERSONALITY1_INCLUDE_FUNCS, PERSONALITY2_INCLUDE_FUNCS, PERSONALITY0_INCLUDE_PRINTERS_DECLS, PERSONALITY0_INCLUDE_PRINTERS_DEFS, PERSONALITY1_INCLUDE_PRINTERS_DECLS, PERSONALITY1_INCLUDE_PRINTERS_DEFS, PERSONALITY2_INCLUDE_PRINTERS_DECLS, PERSONALITY2_INCLUDE_PRINTERS_DEFS. (printers): New struct. Update it when needed. * .gitignore: Add libmpers-m32.a, libmpers-mx32.a, m32_defs.h, m32_funcs.h, m32_printer_decls.h, m32_printer_defs.h, mpers-m32, mpers-m32.stamp, mpers-mx32, mpers-mx32.stamp, mpers.am, mx32_defs.h, mx32_funcs.h, mx32_printer_decls.h, mx32_printer_defs.h, native_printer_decls.h, native_printer_defs.h, and printers.h.
/external/strace/defs.h
|
13c217339397de1986210a2d418ffe027c0c2969 |
|
26-Aug-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Fix multiple personalities support in parser of io_submit syscall Introduce a new helper function to fetch tracee's long integers and use it to fix multiple personalities support in io_submit parser. * defs.h (umove_long_or_printaddr): New prototype. * util.c (umove_long_or_printaddr): New function. * aio.c (sys_io_submit): Use it to fetch tracee's pointers. * tests/aio.c: New file. * tests/aio.test: New test. * tests/Makefile.am (check_PROGRAMS): Add aio. (TESTS): Add aio.test. * tests/.gitignore: Add aio.
/external/strace/defs.h
|
54646b8e057443f0b76afe9a231eae63afbf5d5a |
|
19-Aug-2015 |
Mike Frysinger <vapier@gentoo.org> |
decode extend getsockopt/setsockopt options Currently the code assumes the set of valid options between getsockopt and setsockopt are exactly the same and thus maintains one list. The kernel unfortunately does not do this -- it allows for different opts between the get and set functions. See the {g,s}et_opt{min,max} fields in the various netfilter subcores. To support this, extend the printxval function to take multiple sets of xlats as varargs. Then we add the new get/set lists, and pass them down in the net code when decoding things. A simple example is iptables; before: getsockopt(4, SOL_IP, 0x40 /* IP_??? */, ...) = 0 getsockopt(4, SOL_IP, 0x41 /* IP_??? */, ...) = 0 after: getsockopt(4, SOL_IP, IPT_SO_GET_INFO, ...) = 0 getsockopt(4, SOL_IP, IPT_SO_GET_ENTRIES, ...) = 0 If these were setsockopt calls, then 0x40 & 0x41 would be IPT_SO_SET_REPLACE & IPT_SO_SET_ADD_COUNTERS. * configure.ac: Check for netfilter headers. * defs.h (printxvals): New prototype. (printxval): Change to a define. * net.c: Include netfilter headers and new sockopts headers. (print_sockopt_fd_level_name): Add a is_getsockopt argument. Change SOL_IP and SOL_IPV6 decoding to use printxvals, and use is_getsockopt to pass more xlats down. (getsockopt): Call print_sockopt_fd_level_name with is_getsockopt as true. (setsockopt): Call print_sockopt_fd_level_name with is_getsockopt as false. * util.c (printxval): Rename to ... (printxvals): ... this. Rewrite to be varargs based. * xlat/getsockipoptions.in: New xlat list. * xlat/getsockipv6options.in, xlat/setsockipoptions.in, xlat/setsockipv6options.in: Likewise.
/external/strace/defs.h
|
c01ad06002f6c15fd0c8807e38e452bb240a1f92 |
|
19-Aug-2015 |
Elvira Khabirova <lineprinter0@gmail.com> |
ipc.c: split into separate files In preparation for upcoming mpers-related changes, split ipc.c into independent groups of parsers. * ipc_defs.h: New file. * ipc_msg.c: Likewise. * ipc_msgctl.c: Likewise. * ipc_sem.c: Likewise. * ipc_shm.c: Likewise. * ipc_shmctl.c: Likewise. * mq.c: Likewise. * print_mq_attr.c: Likewise. * print_msgbuf.c: Likewise. * ipc.c: Remove. (sys_mq_open, sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr): Move to mq.c. (sys_msgget, tprint_msgsnd, sys_msgsnd, tprint_msgrcv, sys_msgrcv): Move to ipc_msg.c. (sys_msgctl): Move to ipc_msgctl.c. (tprint_sembuf, tprint_sembuf_array, sys_semop, sys_semtimedop, sys_semget, syssemctl): Move to ipc_sem.c. (sys_shmget, sys_shmat, sys_shmdt): Move to ipc_shm.c. (sys_shmctl): Move to ipc_shmctl.c. (printmqattr): Move to print_mq_attr.c. (tprint_msgbuf): Move to print_msgbuf.c. (IPC_64, PRINTCTL): Move to ipc_defs.h. * defs.h (struct xlat resource_flags): New prototype. * Makefile.am (strace_SOURCES): Remove ipc.c. Add ipc_defs.h, mq.c, ipc_msg.c, ipc_msgctl.c, ipc_sem.c, ipc_shm.c, ipc_shmctl.c, print_mq_attr.c, and print_msgbuf.c.
/external/strace/defs.h
|
d77f6693e47084a72669c70bb28ed703269fcc25 |
|
18-Aug-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Make printnum_* functions return boolean status With this change, printnum_* functions return true iff they successfully fetched necessary data from tracee's memory. * defs.h (printnum_short, printnum_int, printnum_int64, printnum_long_int, printpair_int, printpair_int64): Return bool. * util.c (DEF_PRINTNUM, DEF_PRINTPAIR, printnum_long_int): Likewise.
/external/strace/defs.h
|
2479ef0bceaa35ea353fd0ea372cf31d5eb8a216 |
|
18-Aug-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Fix printing tracee's long integers Replace ambiguous printnum_long that used to fetch native long integers from tracee's memory with printnum_ptr, printnum_slong, and printnum_ulong that fetch tracee's pointer, signed long, and unsigned long integers. * defs.h (printnum_long, printpair_long): Remove prototypes. (printnum_int64, printpair_int64): Remove macros, declare functions unconditionally. [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4] (printnum_long_int): New prototype. (printnum_ptr, printnum_slong, printnum_ulong): New macros. * aio.c (sys_io_setup): Use printnum_ulong. * block.c (block_ioctl): Use printnum_slong and printnum_ulong. * get_robust_list.c (sys_get_robust_list): Use printnum_ptr and printnum_ulong. * io.c (print_off_t): Remove. (sys_sendfile): Use printnum_ulong. * ipc.c (sys_semctl): Use printnum_ptr. * prctl.c (sys_prctl): Likewise. * process.c (sys_ptrace): Likewise. * rtc.c (rtc_ioctl): Use printnum_ulong. * util.c (printnum_long, printpair_long): Remove. (printnum_int64, printpair_int64): Define unconditionally. [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4] (printnum_long_int): New function. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Elvira Khabirova <lineprinter0@gmail.com>
/external/strace/defs.h
|
d2eaf67486748263dfe84e735767f3651066a754 |
|
18-Aug-2015 |
Mike Frysinger <vapier@gentoo.org> |
signal: SIGSYS: decode si_syscall & si_arch fields When receiving SIGSYS, the si_syscall & si_arch fields are set to known values, so make sure we decode their values into the symbol settings. This makes stracing seccomp failures much easier. * defs.h (syscall_name): New prototype. * printsiginfo.c: Include linux/audit.h and xlat/audit_arch.h. (print_si_info): Decode si_syscall & si_arch for SIGSYS. * syscall.c (undefined_scno_name): Delete. (syscall_name): New function. (trace_syscall_entering): Change undefined_scno_name to syscall_name. (trace_syscall_exiting): Likewise. * xlat/audit_arch.in: New file.
/external/strace/defs.h
|
dd5f0cef93db377bc7bc0f4abc7c1003d67c2c95 |
|
20-Jul-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Use printnum_int64 instead of print_loff_t * defs.h (print_loff_t): Remove. * io.c (print_loff_t): Remove. (sys_sendfile64, sys_splice): Use printnum_int64 instead of print_loff_t. * mtd.c (mtd_ioctl): Likewise.
/external/strace/defs.h
|
0e946ab2c26f3cb6f27cb99ddf0f5581bef16781 |
|
18-Jul-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
defs.h: do not include <signal.h> * printsiginfo.h: New file. * Makefile.am (strace_SOURCES): Add it. * defs.h: Do not include <signal.h>. (printsiginfo): Remove. * printsiginfo.c: Include <signal.h> and "printsiginfo.h". * strace.c: Likewise. * sigaltstack.c: Include <signal.h>. * signal.c: Likewise. * sigreturn.c: Likewise. * time.c: Likewise.
/external/strace/defs.h
|
28e32df56f4df8de8668c80cc13fd5359d90ed9d |
|
10-Jul-2015 |
Elvira Khabirova <lineprinter0@gmail.com> |
Add unique syscall entry numbers (SENs) * Makefile.am (BUILT_SOURCES, CLEANFILES): Add sen.h. (syscallent_names, syscallent_patterns, syscallent_files): New variables. (sen.h): New rule. * defs.h (struct sysent): Add sen field. * generate_sen.sh: New file. * linux/syscall.h: Include "sen.h". * syscall.c (SEN_NAME): New temporary macro. (SEN): Use it to prepend syscall entry number.
/external/strace/defs.h
|
69127a3a8db1599f4c8b3f69b38c8b8631b3a052 |
|
06-Jul-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Add several generic integer pairs printing functions Add functions to fetch and print pairs of integer types. Note that these printers do not attempt to fetch data in case of exiting(tcp) && syserror(tcp). printnum_* printers will follow as soon as all callers are made ready for this change. * defs.h (printpair_int, printpair_long, printpair_int64): New prototypes. * util.c (DEF_PRINTPAIR): New macro. (printpair_int, printpair_long, printpair_int64): New functions.
/external/strace/defs.h
|
c88163e5bd3673892abfb2e0792d35eca93d087f |
|
06-Jul-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Add two generic integer printing functions Add printnum_short and printnum_int64 in addition to already existing printnum_int and printnum_long. * defs.h (printnum_short, printnum_int64): New prototypes. * util.c (DEF_PRINTNUM): New macro. (printnum_int, printnum_long): Use DEF_PRINTNUM. (printnum_short, printnum_int64): New functions.
/external/strace/defs.h
|
332a32619c5e66bca75fbb28d81dd35e7ebf77fa |
|
06-Jul-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Add address printing functions printaddr is a simple function implementing "print NULL or address" idiom. umoven_or_printaddr is a wrapper around umoven that has the same return value semantics as umoven but also prints the address when the data is not going to be fetched (in case of exiting(tcp) && syserror(tcp)) or cannot be fetched (umoven fails). umove_or_printaddr is a macro wrapper around umoven_or_printaddr that mirrors umove wrapper around umoven. * defs.h (printaddr, umoven_or_printaddr): New prototypes. (umove_or_printaddr): New macro. * util.c (printaddr, umoven_or_printaddr): New functions.
/external/strace/defs.h
|
204c2bc9cb50daf4d3c8b5067a57c071ef55dfc4 |
|
08-Jul-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Implement RVAL_DECODED flag Implement a method for "on entering" parsers to return "done with decoding" information to their callers. If a syscall parser called from trace_syscall_entering returns a value with RVAL_DECODED bit set, record this value in tcp->sys_func_rval and use it in trace_syscall_exiting instead of calling the parser on exiting syscall. If an ioctl parser returned RVAL_DECODED, this would tell SYS_FUNC(ioctl) that the decoding is finished but fallback printing of the ioctl command argument is needed, while e.g. RVAL_DONE+1 would mean that the decoding is finished and no fallback decoding is needed. * defs.h (struct tcb): Add sys_func_rval. (RVAL_DECODED): New macro. * syscall.c (trace_syscall_entering): Initialize tcp->sys_func_rval along with setting TCB_INSYSCALL flag. (trace_syscall_exiting): Use tcp->sys_func_rval instead of calling tcp->s_ent->sys_func when the former has RVAL_DECODED flag set. Reset tcp->sys_func_rval along with clearing TCB_INSYSCALL flag. * ioctl.c (sys_ioctl): Set RVAL_DECODED flag on exiting. Print ioctl argument iff RVAL_DECODED is set and fallback decoding is requested.
/external/strace/defs.h
|
044eef21867521a9d0340015dc673f2f5909e804 |
|
02-Jul-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Move ioctl syscall parser to ioctl.c * io.c (sys_ioctl): Move ... * ioctl.c: ... here. (ioctl_lookup, ioctl_next_match, ioctl_print_code, ioctl_decode, ioctl_decode_command_number): Declare as static. * defs.h (ioctl_lookup, ioctl_next_match, ioctl_print_code, ioctl_decode, ioctl_decode_command_number): Remove.
/external/strace/defs.h
|
d93c4e80b3cf1e04cef218aef32a77be8b7bcd2f |
|
17-Jun-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Consistenly use #ifdef to check for AC_DEFINE'd macros * aio.c (print_common_flags): Use #ifdef in the check for HAVE_STRUCT_IOCB_U_C_FLAGS. * defs.h: Use #ifdef in the check for HAVE_LITTLE_ENDIAN_LONG_LONG. * net.c: Use #ifdef in the check for HAVE_SENDMSG. * syscall.c (dumpio): Likewise. * printstat.h (DO_PRINTSTAT): Use #ifdef in checks for HAVE_STRUCT_STAT_ST_* macros. * util.c: Use #ifdef in checks for HAVE_SYS_XATTR_H.
/external/strace/defs.h
|
3e9d71feaad428f0f8e335f83b86e9f2a16781fb |
|
25-May-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Introduce memory allocation wrappers Introduce wrappers to the following functions that do memory allocation: malloc, calloc, realloc, strdup. This commit is a follow-up to the related discussions in strace-devel ML: http://sourceforge.net/p/strace/mailman/message/33618180/ http://sourceforge.net/p/strace/mailman/message/33733470/ * defs.h (xmalloc, xcalloc, xreallocarray, xstrdup): New prototypes. * xmalloc.c: New file. * Makefile.am (strace_SOURCES): Add it. * count.c (count_syscall, call_summary_pers): Use xcalloc. * desc.c (decode_select): Use xmalloc. * dirent.c (sys_getdents, sys_getdents64): Likewise. * net.c (sys_recvmmsg): Use xstrdup. * pathtrace.c (storepath): Use xreallocarray. (pathtrace_match): Use xmalloc. * strace.c (die_out_of_memory): Move to xmalloc.c. (expand_tcbtab): Use xcalloc and xreallocarray. (startup_child): Use xstrdup. (init): Use xmalloc, xcalloc, and xstrdup. * syscall.c (reallocate_qual): Use xreallocarray. (qualify): Use xstrdup. * unwind.c (unwind_tcb_init): Use xmalloc. (build_mmap_cache): Use xcalloc, xreallocarray, and xstrdup. (get_symbol_name): Use xreallocarray. (stacktrace_walk, queue_put): Use xmalloc. * util.c (printstr): Use xmalloc. * vsprintf.c (strace_vfprintf): Likewise.
/external/strace/defs.h
|
a0bd3749fc6fdf6364c1e269a4c02e8c153eb84b |
|
07-Apr-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Declare syscall parsers using SYS_FUNC macro Introduce SYS_FUNC macro to declare and define all syscall parsers. * Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h. (sys_func.h): New rule. * defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros. * linux/syscall.h: Include "sys_func.h". [NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers. Remove other declarations. * linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs and osf_fstatfs syscall parsers. * *.c: Use SYS_FUNC to define syscall parsers.
/external/strace/defs.h
|
ea1fea69828ded9dfb1980193da64aebf649f3b9 |
|
31-Mar-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
umovestr: read chunks of memory up to pagesize at a time * defs.h (get_pagesize): New prototype. * mem.c (get_pagesize) Make global. * util.c (PAGMASK): Remove. (vm_read_mem): New process_vm_readv proxy function. (umoven, umovestr): Use it. (umovestr): Read chunks up to pagesize at a time.
/external/strace/defs.h
|
5647cf86fc511fc365675826ab4ff56775d1206b |
|
30-Mar-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Use macros for gcc attributes * defs.h (error_msg, perror_msg, error_msg_and_die, perror_msg_and_die, die_out_of_memory, printllval, printnum_int, printnum_long, tprintf): Use ATTRIBUTE_* macros for gcc attributes. * file.c (struct stat64): Likewise. * statfs.c (struct compat_statfs64): Likewise. * strace.c (die, exec_or_die, init): Likewise. * linux/sparc/arch_sigreturn.c: Likewise. * linux/ubi-user.h: Likewise.
/external/strace/defs.h
|
c84d0b8363aeec9f89641c180d97902836fb0b6f |
|
30-Mar-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Introduce macros for gcc attributes Define macros for gcc attributes that are already in use or going to be used soon. * defs.h (GNUC_PREREQ, ATTRIBUTE_NORETURN, ATTRIBUTE_FORMAT, ATTRIBUTE_ALIGNED, ATTRIBUTE_PACKED, ATTRIBUTE_MALLOC, ATTRIBUTE_NOINLINE, ATTRIBUTE_ALLOC_SIZE): New macros.
/external/strace/defs.h
|
537c964fe9ad96b5b4c779af7a53a2b0850ade4e |
|
28-Mar-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
signal.c: move siginfo_t parsers to a separate file * printsiginfo.c: New file. * Makefile.am (strace_SOURCES): Add it. * defs.h (printsiginfo): Change second argument's type from int to bool. * signal.c: Stop defining siginfo_t related constants. Move inclusion of xlat/sig*_codes.h files to printsiginfo.c (printsigsource, printsigval, printsiginfo_at): Move to printsiginfo.c. (printsiginfo): Change second argument's type from int to bool, split, and move to printsiginfo.c.
/external/strace/defs.h
|
df4dd8b5407fe4ded09052e0e74b3cf3958a50a7 |
|
25-Mar-2015 |
Denys Vlasenko <dvlasenk@redhat.com> |
sparc: delete personality 1 Personality 1 for sparc and sparc64 appears to be an old attempt to support stracing Solaris binaries. It stalled after the only syscall, solaris_open, was covered: all other solaris_foo's are printargs. This change deletes personality 1. Now sparc is an one-personality arch, and sparc64 is a two-personality one. For clarity, pure renaming of personality 2 files to personality 1 for sparc64 is performed in the next commit - this prevents a state where syscallent1.h seems to indergo a lot of changes, where in fact in is deleted, and then replaced by syscallent2.h Therefore, tree at this commit will not build. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
8e8d7d219ea6e0d9cf014dc3418d80bf5a74016e |
|
24-Mar-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
mips: fix pipe syscall decoding * linux/mips/arch_getrval2.c: New file. * Makefile.am (EXTRA_DIST): Add it. * defs.h [MIPS] (HAVE_GETRVAL2): Define.
/external/strace/defs.h
|
78ed3f3558942b7c042aeb84ee0f4a2dccf64791 |
|
23-Mar-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
alpha, ia64, sh, sparc, sparc64: fix pipe and pipe2 syscalls decoding Fix pipe syscall decoding on alpha. Fix pipe2 syscall decoding on ia64, sh, sparc, and sparc64. * configure.ac (AC_CHECK_FUNCS): Add pipe2. * defs.h [ALPHA || IA64 || SH || SPARC || SPARC64] (HAVE_GETRVAL2): Define. * net.c (do_pipe): Check HAVE_GETRVAL2 instead of architecture macros. Do not use getrval2 for pipe2 decoding. Print address if umove call fails. * syscall.c (getrval2): Check HAVE_GETRVAL2 instead of architecture macros. Implement for [ALPHA]. * tests/pipe.c: New file. * tests/pipe.expected: New file. * tests/pipe.test: New test. * tests/Makefile.am (check_PROGRAMS): Add pipe. (TESTS): Add pipe.test. (EXTRA_DIST): Add pipe.expected. * tests/.gitignore: Add pipe.
/external/strace/defs.h
|
7e69ed98cdd3c8ee0bba783927bc95b895c60160 |
|
21-Mar-2015 |
Denys Vlasenko <dvlasenk@redhat.com> |
Change last parameter of umoven() from char* to void* Saves tons of casts. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
9dce83b8bd172560283f45ba69a583ced139ab02 |
|
21-Mar-2015 |
Denys Vlasenko <dvlasenk@redhat.com> |
Remove unused struct tcb::inst field It is unused since we dropped support for kernels without PTRACE_SETOPTIONS. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
8497b6222ed8ef606996d0ceb2bae260d82f95e2 |
|
21-Mar-2015 |
Denys Vlasenko <dvlasenk@redhat.com> |
Show the syscall name in "resuming interrupted call" message When signal is received, or if we have attached to a process, current syscall (if process is in one) gets restarted. Some syscalls are restarted via "restart_syscall()" mechanism. On such sycalls, we don't show _which_ syscall gets restarted. IOW: users want to see "resuming interrupted nanosleep" instead of "resuming interrupted call" when they attach to "sleep 999". Kernel does expose this information. The only thing we need is to fetch syscall# on attach, and save it. This patch does this. It adds tcp->s_prev_ent, which is a pointer to struct_sysent of the previous syscall of this tracee. It can be NULL. sys_restart_syscall() is made to use it when the message is generated. To similarly handle restart_syscall() *after signals*, not just on attach, on each syscall exit patch saves exited syscall's data in the same member (tcp->s_prev_ent). Example: $ sleep 3 & strace -p $! Process 8728 attached restart_syscall(<... resuming interrupted nanosleep ...>) = 0 _exit(0) = ? +++ exited with 0 +++ Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
74219ea36f86d934abfb962964047f05e611baba |
|
06-Mar-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Move sigreturn/rt_sigreturn parser to a separate file * sigreturn.c: New file. * Makefile.am (strace_SOURCES): Add it. * defs.h (sprintsigmask_n): New prototype. (tprintsigmask_addr): New macro. * signal.c (sprintsigmask_n): Make global. (tprintsigmask_addr): Remove. (sys_sigreturn): Move to sigreturn.c.
/external/strace/defs.h
|
cc07f669f305c37981b7de115c7236d13272bee4 |
|
26-Feb-2015 |
Mike Frysinger <vapier@gentoo.org> |
ia64: fix up builds after 16bit uid support The ia64 port pulls in the i386 syscall table so it can decode 32bit apps, so we need to enable the 16bit uid parsers for it. * defs.h (NEED_UID16_PARSERS): Define to 1 for IA64. * linux/ia64/syscallent.h: Undefine sys_stime to avoid redefine warnings.
/external/strace/defs.h
|
23ce9e48b54bd8bfec5b8768c85173fe4038ebac |
|
08-Feb-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Remove support for systems without PTRACE_SETOPTIONS Assume that the kernel is v2.5.46 or newer, i.e. PTRACE_SETOPTIONS and PTRACE_O_TRACESYSGOOD|PTRACE_O_TRACEEXEC|PTRACE_O_TRACECLONE are universally available. This change removes all code that implemented post-execve SIGTRAP handling and fork/vfork/clone->CLONE_PTRACE substitution. * defs.h (TCB_BPTSET, TCB_WAITEXECVE): Remove macros. (need_fork_exec_workarounds, setbpt, clearbpt): Remove declarations. * strace.c (need_fork_exec_workarounds, test_ptrace_setoptions_followfork, test_ptrace_setoptions_for_all): Remove. (syscall_trap_sig): Set to (SIGTRAP | 0x80). (ptrace_setoptions): Set to (PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXEC). (detach): Do not test for TCB_BPTSET. (init): Do not call test_ptrace_setoptions_followfork and test_ptrace_setoptions_for_all. Do not test for TCB_BPTSET. * syscall.c (syscall_fixup_on_sysenter, internal_fork, internal_exec, syscall_fixup_for_fork_exec, syscall_fixup_on_sysexit): Remove. (trace_syscall_entering): Do not test for TCB_WAITEXECVE. Do not call syscall_fixup_on_sysenter and syscall_fixup_for_fork_exec. (trace_syscall_exiting): Do not call syscall_fixup_on_sysexit and syscall_fixup_for_fork_exec. [IA64] (ia64_ia32mode): Make static. * linux/ia64/arch_regs.h (ia64_ia32mode): Remove declaration. * util.c: Do not include "syscall.h". (arg_setup, get_arg0, get_arg1, set_arg0, set_arg1, restore_arg0, restore_arg1, arg_finish_change, change_syscall, setbpt, clearbpt): Remove. * tests/ptrace_setoptions.test: Remove. * tests/Makefile.am (TESTS): Remove it.
/external/strace/defs.h
|
4f750b9ad1bb870337395355047ac2f89f340feb |
|
20-Feb-2015 |
Etienne Gemsa <etienne.gemsa@lse.epita.fr> |
Add decoding for evdev ioctls This patch introduces decoding for evdev ioctls. For EVIOCSFF the five first members are decoded, the union is not. The code was compiled and tested on x86_64 with Linux 3.13. * evdev.c: New file. * Makefile.am (strace_SOURCES): Add it. * defs.h (evdev_ioctl): New prototype. * ioctl.c (ioctl_decode): Call evdev_ioctl for 'E' ioctl commands. * xlat/evdev_autorepeat.in: New file. * xlat/evdev_ff_status.in: New file. * xlat/evdev_ff_types.in: New file. * xlat/evdev_keycode.in: New file. * xlat/evdev_leds.in: New file. * xlat/evdev_misc.in: New file. * xlat/evdev_mtslots.in: New file. * xlat/evdev_prop.in: New file. * xlat/evdev_relative_axes.in: New file. * xlat/evdev_snd.in: New file. * xlat/evdev_switch.in: New file. * xlat/evdev_sync.in: New file. Signed-off-by: Etienne Gemsa <etienne.gemsa@lse.epita.fr> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/defs.h
|
f523f103cc35fa399688839a91004c2f618e8dd6 |
|
17-Feb-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Declare all format printers with printf format attribute * defs.h (printllval, printnum_int, printnum_long): Mark with format(printf) attribute. * sock.c (sock_ioctl): Fix format string.
/external/strace/defs.h
|
1c603a9e076f12ed50521637b218f40111d56e1f |
|
17-Feb-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Rename printnum to printnum_long to avoid confusion * defs.h (printnum): Rename to printnum_long. * util.c (printnum): Likewise. * process.c (sys_ptrace): Likewise. * time.c (sys_time): Likewise.
/external/strace/defs.h
|
047365efde4edf5983bfdb03942ff399fceeeb03 |
|
15-Feb-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
mips: move ABI check to configure.ac * configure.ac [MIPS]: Check for MIPS ABI. * defs.h [MIPS]: Remove MIPS ABI check. * ioctlsort.c: Likewise.
/external/strace/defs.h
|
9a176c9290f1622098ce41a0fe7e5a2ee30feb2e |
|
13-Feb-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
get_regs: define for all architectures * defs.h (get_regs_error): Remove. (clear_regs): Update prototype, declare unconditionally. (get_regs): Declare unconditionally. * syscall.c (clear_regs): New function. (get_regs): Define unconditionally. (get_regs_error): Define unconditionally, change scope to static.
/external/strace/defs.h
|
5503dd28c6cab61af949f592e8bfcdaf1380cfef |
|
13-Feb-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Move regs-related macros and declarations from defs.h to regs.h * regs.h: New file. * Makefile.am (strace_SOURCES): Add it. * linux/arch_regs.h: New file. * linux/alpha/arch_regs.h: Likewise. * linux/arm/arch_regs.h: Likewise. * linux/hppa/arch_regs.h: Likewise. * linux/i386/arch_regs.h: Likewise. * linux/ia64/arch_regs.h: Likewise. * linux/mips/arch_regs.h: Likewise. * linux/powerpc/arch_regs.h: Likewise. * linux/sh64/arch_regs.h: Likewise. * linux/sparc/arch_regs.h: Likewise. * linux/sparc64/arch_regs.h: Likewise. * linux/tile/arch_regs.h: Likewise. * linux/x86_64/arch_regs.h: Likewise. * Makefile.am (EXTRA_DIST): Add them. * defs.h: Remove definitions of PTRACE_*, REG_*, PT_*, U_REG_*, and ARM_* macros. Remove declarations of struct pt_regs variables. [SPARC]: Do not include <asm/psr.h>. [SPARC64]: Do not include <asm/psrcompat.h>. * bjm.c: Do not include <sys/user.h>. * process.c: Include "regs.h". Do not include <sys/user.h> and <sys/reg.h>. [IA64]: Do not include <asm/ptrace_offsets.h> and <asm/rse.h>. * util.c: Likewise. * syscall.c: Likewise. [AARCH64]: Define struct arm_pt_regs and ARM_* macros. [SPARC]: Include <asm/psr.h>. [SPARC64]: Include <asm/psrcompat.h>. * signal.c: Include "regs.h". Do not include <sys/user.h> and <sys/reg.h>. [IA64]: Do not include <asm/ptrace_offsets.h>. * strace.c [IA64]: Do not include <asm/ptrace_offsets.h>.
/external/strace/defs.h
|
fadf379b8e3618585cecad447867af27930ac5e3 |
|
13-Feb-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Move all ptrace-related macros and declarations from defs.h to ptrace.h * ptrace.h: New file. * Makefile.am (strace_SOURCES): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/ptrace.h and sys/ptrace.h. * defs.h: Do not include <sys/ptrace.h> and <asm/ptrace.h>. Remove definitions of PTRACE_* macros. * process.c: Remove <linux/ptrace.h> workarounds, include "ptrace.h". * signal.c: Likewise. * syscall.c: Likewise. * util.c: Likewise. * strace.c: Include "ptrace.h". * wait.c: Likewise.
/external/strace/defs.h
|
d8890b5c9d77d818617635741ab6f85d33aa9435 |
|
07-Feb-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
printsiginfo: constify the first argument * signal.c (printsiginfo): Make the first argument a pointer to a const type. * defs.h (printsiginfo): Likewise. (printsiginfo, printsiginfo_at): Always define these prototypes. * configure.ac (AC_CHECK_TYPES): Remove siginfo_t, as HAVE_SIGINFO_T is no longer used.
/external/strace/defs.h
|
2af6903f456b549fd57ba8beceddec961803cb3d |
|
05-Feb-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Implement seccomp decoding * configure.ac (AC_CHECK_HEADERS): Add linux/filter.h and linux/seccomp.h. * defs.h (print_seccomp_filter): New prototype. * linux/dummy.h (sys_seccomp): Remove. * linux/syscall.h (sys_seccomp): New prototype. * prctl.c: Include <linux/seccomp.h>. (sys_prctl): Decode PR_SET_SECCOMP. * seccomp.c: New file. * Makefile.am (strace_SOURCES): Add it. * xlat/bpf_class.in: New file. * xlat/bpf_miscop.in: Likewise. * xlat/bpf_mode.in: Likewise. * xlat/bpf_op_alu.in: Likewise. * xlat/bpf_op_jmp.in: Likewise. * xlat/bpf_rval.in: Likewise. * xlat/bpf_size.in: Likewise. * xlat/bpf_src.in: Likewise. * xlat/seccomp_filter_flags.in: Likewise. * xlat/seccomp_mode.in: Likewise. * xlat/seccomp_ops.in: Likewise. * xlat/seccomp_ret_action.in: Likewise.
/external/strace/defs.h
|
513e96eb94841734274c0607aae2c9f212411eee |
|
26-Jan-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Rework string_quote API string_quote() has proven to be too hard to use, replace it with print_quoted_string() that does memory allocation and prints the result. * defs.h (string_quote): Remove. (QUOTE_0_TERMINATED, QUOTE_OMIT_LEADING_TRAILING_QUOTES): New macros. (print_quoted_string): New prototype. * util.c (string_quote): Make static; take "style" flags instead of "len", treat QUOTE_0_TERMINATED style flag as former (len == -1); add QUOTE_OMIT_LEADING_TRAILING_QUOTES style flag support. (ALLOCA_CUTOFF, use_alloca): New macros. (print_quoted_string): New function. (printpathn, printstr): Update to new API. * loop.c (loop_ioctl): Likewise. * mtd.c (ubi_ioctl): Likewise. * net.c (print_scm_security): Likewise. * socketutils.c (unix_parse_response): Likewise.
/external/strace/defs.h
|
6f9a01c72121bc0b0fc760d9fea6879fb85f6f02 |
|
21-Jan-2015 |
Gabriel Laskar <gabriel@lse.epita.fr> |
ioctl: add decoding for parametrized command names Some ioctl commands from evdev, hiddev, mixer, uinput, spi, and joystick are parametrized by a size or a number that are variable. This change implements printing of these parametrized ioctl command names. * configure.ac (AC_CHECK_HEADERS): Add linux/input.h. * defs.h (ioctl_decode_number): New prototype. * io.c (sys_ioctl): Use ioctl_decode_number. * ioctl.c (ioctl_decode_number): New function. * xlat/evdev_abs.in: New file. * xlat/evdev_ev.in: New file. Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
/external/strace/defs.h
|
924996a41e54a3ac6bb90a43a8cebbbf6c0e1319 |
|
20-Jan-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
ioctl: print unrecognized ioctl codes in _IOC(dir,type,nr,size) format * defs.h (ioctl_print_code): New prototype. * ioctl.c: Include xlat/ioctl_dirs.h. (ioctl_print_code): New function. * io.c (sys_ioctl): Use it. * xlat/ioctl_dirs.in: New file.
/external/strace/defs.h
|
c7afb4881f14e44968f3a78ae5988f04ecc66b68 |
|
19-Jan-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
ioctl: assume that all ioctl commands have unsigned int type In linux, ioctl command number has a 32-bit unsigned integer type: fs/ioctl.c:SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) If the kernel completely ignores other bits on 64-bit architectures, why should strace care? Let's follow the kernel and treat it as unsigned int. * defs.h (struct_ioctlent): Change "code" type to "unsigned int". (ioctl_decode, ioctl_lookup, block_ioctl, loop_ioctl, mtd_ioctl, ubi_ioctl, ptp_ioctl, scsi_ioctl, sock_ioctl, term_ioctl, rtc_ioctl, v4l2_ioctl): Likewise. * ioctl.c (ioctl_decode, ioctl_lookup, compare, ioctl_next_match): Likewise. * block.c (block_ioctl): Likewise. * loop.c (loop_ioctl): Likewise. * mtd.c (mtd_ioctl, ubi_ioctl): Likewise. * ptp.c (ptp_ioctl): Likewise. * scsi.c (scsi_ioctl): Likewise. * sock.c (sock_ioctl): Likewise. * term.c (term_ioctl): Likewise. * time.c (rtc_ioctl): Likewise. * v4l2.c (v4l2_ioctl): Likewise. * ioctlsort.c (struct ioctlent, compare, main): Likewise.
/external/strace/defs.h
|
97e5996105e72d021abfb82d2bec4a077646e6ad |
|
14-Jan-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Change length type of umoven and umovestr to unsigned * defs.h (umoven, umovestr): Change type of 3rd argument from "int" to "unsigned int". * util.c (umoven, umovestr): Likewise. Adjust the code appropriately.
/external/strace/defs.h
|
3b499ca870e0e13c31fc4fd2345c4d5dcc2642b1 |
|
10-Jan-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Fix indirect ipc subcall handling indirect_ipccall used to guess whether currently decoded ipc syscall is an indirect subcall or not based on generic knowledge, while there is a robust method to identify indirect ipc subcalls. * defs.h (TRACE_INDIRECT_SUBCALL): New flag. * ipc.c (indirect_ipccall): Check it. * linux/subcall.h: Set it.
/external/strace/defs.h
|
1ea64735fc2cdd4d2814a6455b50f6989c7f1d34 |
|
10-Jan-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Fix fanotify_mark decoding on 32-bit architectures The fanotify_mark syscall takes a 64-bit mask, and on 32-bit architectures it is split up into two syscall arguments. * configure.ac (AC_CHECK_FUNCS): Add fanotify_mark. (AC_CHECK_HEADERS): Add sys/fanotify.h. * defs.h (getllval): New prototype. * util.c (getllval): New function based on printllval. (printllval): Use getllval. * fanotify.c (sys_fanotify_mark): Use getllval to properly decode 64-bit mask and two syscall arguments followed by it. * tests/fanotify_mark.c: New file. * tests/fanotify_mark.test: New test. * tests/Makefile.am (check_PROGRAMS): Add fanotify_mark. (TESTS): Add fanotify_mark.test. * tests/.gitignore: Add fanotify_mark.
/external/strace/defs.h
|
f605e92365c7479d59ccfac3a294089f89359715 |
|
09-Dec-2014 |
Masatake YAMATO <yamato@redhat.com> |
Use the protocol name of a socket as a hint for peer address resolution To resolve the peer address of socket, all combinations of families (AF_INET, AF_INET6) and protocols(IPPROTO_TCP, IPPROTO_UDP) were tried. This change utilizes the protocol name obtained via getxattr to specify the right combination. * socketutils.c (inet_print): New helper function. (print_sockaddr_by_inode): Use it. Utilize the protocol name associated with the given inode for resolving the peer socket address. If the protocol name is NULL, resolve the address by trying combinations of families and protocols as before. * defs.h (print_sockaddr_by_inode): Update prototype. * util.c (printfd): Pass the protocol name associated with the given path to print_sockaddr_by_inode as the 2nd argument. Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/defs.h
|
80f7db1fedefedb01cd2ce3107dfc264eab50601 |
|
13-Dec-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Fix decoding of 16-bit *chown and [gs]et*[gu]id syscalls Define two sets of parsers on architectures that support (either directly or via multiarch) 16-bit and 32-bit uid/gid syscalls simultaneously. Since the code in these two sets is essentially the same and the key difference between them is the size of uid_t, implement it by parametrizing uid_t and names of parser functions. * defs.h (NEED_UID16_PARSERS): New macro. * linux/syscall.h [NEED_UID16_PARSERS] (sys_chown16, sys_fchown16, sys_getresuid16, sys_getuid16, sys_setfsuid16, sys_setresuid16, sys_setreuid16, sys_setuid16): New prototypes. * linux/dummy.h (sys_geteuid16): Alias to sys_getuid16. (sys_getegid16, sys_getgid16, sys_getresgid16, sys_setfsgid16, sys_setgid16, sys_setregid16, sys_setresgid16): Alias to corresponding sys_*uid16 functions. * uid.c: Stop including <asm/posix_types.h>. Parametrize uid_t and names of all exported functions. (get_print_uid): New function. (sys_getresuid): Use it. (printuid): Check for (uid_t) -1. * uid16.c: New file. * Makefile.am (strace_SOURCES): Add it. * linux/arm/syscallent.h: Use sys_chown16, sys_fchown16, sys_getegid16, sys_geteuid16, sys_getgid16, sys_getresgid16, sys_getresuid16, sys_getuid16, sys_setfsgid16, sys_setfsuid16, sys_setgid16, sys_setregid16, sys_setresgid16, sys_setresuid16, sys_setreuid16, and sys_setuid16 parsers for *chown and [gs]et*[gu]id syscall entries. * linux/bfin/syscallent.h: Likewise. * linux/i386/syscallent.h: Likewise. * linux/m68k/syscallent.h: Likewise. * linux/microblaze/syscallent.h: Likewise. * linux/s390/syscallent.h: Likewise. * linux/sparc/syscallent.h: Likewise. * linux/sh/syscallent.h: Likewise. * linux/sh64/syscallent.h: Likewise. * tests/uid16.c: New file. * tests/uid16.test: New test. * tests/Makefile.am (CHECK_PROGRAMS): Add uid16. (TESTS): Add uid16.test. * tests/.gitignore: Add uid16.
/external/strace/defs.h
|
1da7c95b62537f066c74972e2b59a322446ca86e |
|
13-Dec-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
printuid: fix uid_t decoding on 64-bit architectures It was not a good idea to treat uid_t as a long int type because the latter is twice larger than uid_t on 64-bit architectures. * defs.h (printuid): Change uid argument type from "unsigned long" to "unsigned int". * util.c (printuid): Likewise. When uid equals to -1, print "-1". * tests/uid.awk: New file. * tests/uid.c: New file. * tests/uid32.c: Likewise. * tests/uid.test: New test. * tests/uid32.test: Likewise. * tests/Makefile.am (CHECK_PROGRAMS): Add uid and uid32. (TESTS): Add uid.test and uid32.test. (EXTRA_DIST): Add uid.awk. * tests/.gitignore: Add uid and uid32.
/external/strace/defs.h
|
8c0ef9468c0751ae028821a8f2380de9e11da1d8 |
|
11-Dec-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Unexport struct_user_offsets * defs.h (struct_user_offsets): Remove. * process.c (struct_user_offsets): Make static.
/external/strace/defs.h
|
43b110b7d14aeff8db679c737a60dde9417aa345 |
|
06-Dec-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Export at_flags * defs.h (at_flags): New prototype.
/external/strace/defs.h
|
b1a01b8d42555979255977eb7dfc5db5cef0d769 |
|
06-Dec-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Export sprinttime * defs.h (sprinttime): New prototype. * file.c (sprinttime): Make global and move to util.c.
/external/strace/defs.h
|
9514ac73c71456fe9082f40bf7c9a8a2278b47aa |
|
06-Dec-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
file.c: export sprintmode and move it to a separate file * printmode.c: New file. * Makefile.am (strace_SOURCES): Add it. * defs.h (sprintmode): New prototype. * file.c (sprintmode): Make global and move to printmode.c.
/external/strace/defs.h
|
a807dceca5ccfaf283aedaca3d998f83db8fe1fa |
|
06-Nov-2014 |
Masatake YAMATO <yamato@redhat.com> |
Add functions for dumping iovecs in mmsghdr used in sendmmsg and recvmmsg This patch is similar to what I did in commit 02f9f6b386741a52f58e1b31ad4e7fff60781ef8. That commit was for sendmsg and recvmsg system calls. This one is for sendmmsg and recvmmsg system calls. * defs.h (dumpiov_in_mmsghdr): New declaration. * net.c (extractmmsghdr): New function derived from printmmsghdr. (printmmsghdr): Use it. (dumpiov_in_mmsghdr): New function. * syscall.c (dumpio) [HAVE_SENDMSG]: Call dumpiov_in_mmsghdr for recvmmsg and sendmmsg syscalls. Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/defs.h
|
0cc961440b527ff8c16954fc411a1529072edb92 |
|
03-Nov-2014 |
Philippe De Muyter <phdm@macqel.be> |
Implement Video4Linux video-input ioctls decoder Introduce v4l2.c, a decoder for the arguments of the video-input subset of the v4l2 ioctl's. This is a combination of - previous work by Peter Zotov <whitequark@whitequark.org>, found at https://gist.githubusercontent.com/whitequark/1263207/raw/strace-4.6-v4l2-ioctls.patch - previous work by William Manley <will@williammanley.net>, found at http://marc.info/?l=strace&m=139395588520675 - forward port, additions and fixes by Philippe De Muyter <phdm@macqel.be> As v4l2 is a moving target, I have made v4l2.c compilable with ancient linux kernels by testing the availability of some macros. It has been succesfully compiled on linux 3.10, 3.1, 2.6.31 and 2.6.22, and succesfully used on linux 3.10 with a camera device. * configure.ac: Check for availabilty of V4L2_* enum constants. * Makefile.am (strace_SOURCES): Add v4l2.c. * defs.h (v4l2_ioctl): New prototype. * ioctl.c (ioctl_decode): Use v4l2_ioctl. * v4l2.c: New file. * xlat/v4l2_*.in: New files. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Cc: Peter Zotov <whitequark@whitequark.org> Cc: William Manley <will@williammanley.net>
/external/strace/defs.h
|
3e252ca8352fc15e55bb6570bf90b38b877a1ae9 |
|
03-Nov-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Remove ioctl header file names from the executable * defs.h (struct ioctlent): Remove "doth" field. * Makefile.am ($(ioctlent_h)): Remove 1st field.
/external/strace/defs.h
|
02f9f6b386741a52f58e1b31ad4e7fff60781ef8 |
|
15-Oct-2014 |
Masatake YAMATO <yamato@redhat.com> |
Add a function for dumping iovec in msghdr used in sendmsg and recvmsg Here is an example session: $ ./strace -e write=all ip link change dev enp0s25 mtu 1501 > /dev/null sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"(... * 40 bytes in buffer 0 | 00000 28 00 00 00 10 00 05 00 d0 d9 aa 53 00 00 00 00 (..........S.... | | 00010 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ................ | | 00020 08 00 04 00 dd 05 00 00 ........ | ... $ ./strace -e read=all ip link show > /dev/null recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"... * 8192 bytes in buffer 0 | 00000 34 00 00 00 02 00 00 00 00 00 00 00 ff 23 00 00 4............#.. | | 00010 ff ff ff ff 20 00 00 00 10 00 05 00 00 00 00 00 .... ........... | ... * defs.h (dumpiov_in_msghdr): New prototype. * net.c (extractmsghdr): New function derived from printmsghdr. (printmsghdr): Use extractmsghdr. (dumpiov_in_msghdr): New function. * syscall.c (dumpio) [HAVE_SENDMSG]: Call dumpiov_in_msghdr for recvmsg and sendmsg syscalls. Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/defs.h
|
22e34b98578b8fab6be7fb608579e4fc601b2ed0 |
|
24-Sep-2014 |
Elliott Hughes <enh@google.com> |
Don't risk truncating open flags by using mode_t On Android, 32-bit arm and x86 use __kernel_mode_t (an unsigned short) as their mode_t. The open(2) flags are actually an int, so high ones like O_CLOEXEC get truncated if you coerce them to mode_t. * defs.h (tprint_open_modes, sprint_open_modes): Change argument type from mode_t to int. * file.c (tprint_open_modes, sprint_open_modes): Likewise. Signed-off-by: Elliott Hughes <enh@google.com> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/defs.h
|
4176d533e0c0a205aa07e9670c6935cf9bd394a6 |
|
22-Sep-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
fsmagic: sort array by value and use bsearch for faster lookup * defs.h (xlat_search): New prototype. * util.c (xlat_bsearch_compare, xlat_search): New functions. * file.c (sprintfstype): Use xlat_search for fsmagic lookup. * xlat/fsmagic.in: Sort by value and mark as not NULL-terminated. * tests/statfs.c: New file. * tests/statfs.test: New test. * tests/Makefile.am (check_PROGRAMS): Add statfs. (statfs_CFLAGS): Define. (TESTS): Add statfs.test. * tests/.gitignore: Add statfs.
/external/strace/defs.h
|
2f6510c8a6a358ec00f56a491318181bc068a1fc |
|
21-Aug-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Add -yy option: print ip and port associated with socket descriptors When two ore more -y options are given, print local and remote ip:port pairs associated with socket descriptors. This implementation uses NETLINK_INET_DIAG for sockaddr lookup; it's based on the patch prepared by Zubin Mithra as a part of his GSoC 2014 strace project. * Makefile.am (strace_SOURCES): Add socketutils.c (EXTRA_DIST): Add linux/inet_diag.h and linux/sock_diag.h. * defs.h (print_sockaddr_by_inode): New prototype. * linux/inet_diag.h: New file. * linux/sock_diag.h: Likewise. * socketutils.c: Likewise. * strace.1: Document -yy option. * strace.c (usage): Likewise. * util.c (printfd): Use print_sockaddr_by_inode.
/external/strace/defs.h
|
3ed5d021837768405d9f9c9e7d2b05dc6a110d94 |
|
10-Sep-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Fix compilation warnings reported by gcc -Wsign-compare * configure.ac (gl_WARN_ADD): Add -Wsign-compare. * defs.h (struct tcb): Change 'currpers' type to unsigned. (struct xlat): Change 'val' type to unsigned (signame): Add 'const' qualifier to its argument. (xlookup, printxval): Add 'const' qualifier to the 2nd argument and change its type to unsigned. (printpathn): Change the 3rd argument type to unsigned. (ioctl_lookup): Change 1st argument type to unsigned. * count.c (call_summary_pers, call_summary): Change 'i' type to unsigned. * file.c (print_xattr_list): Fix comparisons between signed and unsigned long values. * ioctl.c (compare): Fix cast. (ioctl_lookup): Change 1st argument type to to unsigned. (ioctl_next_match): Change 'code' type to unsigned. * mem.c (sys_move_pages): Change 'i' type to unsigned. * mtd.c (mtd_ioctl): Change 'i' and 'j' types to unsigned. Print 'i' using %u format string. * process.c (sys_prctl): Change 'i' type to unsigned. (printargv): Change 'n' type to unsigned. (sys_ptrace): Change 'addr' type to unsigned. * scsi.c (print_sg_io_buffer): Add 'const' qualifier to 'len' argument and change its type to unsigned. Change 'i' and 'allocated' types to unsigned. * signal.c (signame): Add 'const' qualifier to its argument. Fix comparisons between signed and unsigned values. (sprintsigmask_n, printsiginfo): Fix comparisons between signed and unsigned values. * sock.c (sock_ioctl): Change 'i' and 'nifra' types to unsigned. * strace.c (expand_tcbtab, alloctcb): Change 'i' type to unsigned. (detach): Change 'sig' type to unsigned. (startup_attach): Change 'tcbi' type to unsigned. (startup_child): Change 'm', 'n', and 'len' types to unsigned. (init): Use new variable to iterate 'tcbtab'. (pid2tcb): Change 'i' type to unsigned. (cleanup): Change 'i' and 'sig' types to unsigned. * syscall.c (update_personality): Change 'personality' argument type to unsigned. (struct qual_options): Change 'bitflag' type to unsigned. (reallocate_qual): Add 'const' qualifier to its argument and change its type to unsigned. (qualify_one): Change 'n' and 'bitflag' arguments types to unsigned. Add 'const' qualifier to 'n', 'not', and 'pers' arguments. Change 'p' type to signed int. (qual_syscall): Change 'bitflag' argument type to unsigned. Add 'const' qualifier to 'bitflag' and 'not' arguments. Change 'p' type to signed int. (qual_signal): Change 'bitflag' argument type to unsigned. Add 'const' qualifier to 'bitflag' and 'not' arguments. Change 'i' type to unsigned. (qual_desc): Change 'bitflag' argument type to unsigned. Add 'const' qualifier to 'bitflag' and 'not' arguments. (qualify): Change 'i' type to unsigned. (get_scno): Change 'currpers' type to unsigned. Fix a comparison between signed and unsigned values. * system.c (sys_sysctl): Change 'cnt' and 'max_cnt' types to unsigned. Fix comparisons between signed and unsigned values. * util.c (xlookup, printxval): Add 'const' qualifier to 'val' argument and change its type to unsigned. (printuid): Fix a comparison between signed and unsigned values. (printpathn): Change 'n' argument type to unsigned. (printstr): Change 'size' type to unsigned. Fix a comparison between signed and unsigned values. (setbpt): Change 'i' type to unsigned. * net.c (printsock): Silence a compilation warning. * reboot.c (sys_reboot): Likewise.
/external/strace/defs.h
|
45e7b189e2aeae06bcd1807453bde99463d8e589 |
|
09-Aug-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Prepare for -yy option support * defs.h (show_fd_path): Change type to unsigned int. * strace.c (show_fd_path): Likewise. (init): Handle repeated -y option.
/external/strace/defs.h
|
3c49b02e98af0aabfffd20fd8b34b1f71b8cffb9 |
|
07-Aug-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Fix preadv/pwritev offset decoding on bigendian architectures This partially reverts commit 7845a42b39e59e904d01e75e21f7bc7eb6462560. * util.c (printllval): Remove align argument. * defs.h (printllval): Update prototype. (printllval_aligned, printllval_unaligned): Remove. * file.c (sys_readahead, sys_truncate64, sys_ftruncate64, sys_fadvise64, sys_fadvise64_64, sys_sync_file_range, sys_sync_file_range2, sys_fallocate): Replace printllval_aligned call with printllval. * io.c (sys_pread, sys_pwrite): Likewise. (print_llu_from_low_high_val): New function. (sys_preadv, sys_pwritev): Use it instead of printllval_unaligned.
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
9bc6561588093a788c29f07579f9e4103864a752 |
|
16-Apr-2014 |
Masatake YAMATO <yamato@redhat.com> |
unwind: implement automatic mmap cache invalidation A mmap cache belonging to a tcb was updated when a system call which changed the memory mapping was called. This implementation was assumed the mapping was changed only by the tcb. However, this assumption is incorrect if the target application is multi-threaded; more than two tcbs can shared the same memory mapping and a tcb can modify it without being noticed by the others. This change introduces a global integer variable mmap_cache_generation, and mmap_cache_generation field to struct tcb. The variable is incremented each time a process enters a syscall that can modify its memory mapping. Each tcb records the value of this variable at the moment if building its mmap cache. Every mmap cache associated with the given tcb can be validated by comparing its mmap_cache_generation field with the variable mmap_cache_generation. This implementation is inefficient. If strace attaches two processes which don't share the memory mapping, rebuilding mmap cache of a tcb triggered by another tcb's mmap system call is not necessary. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
/external/strace/defs.h
|
f8e39d7b7a9d581e634be59af73cf82cb566abf9 |
|
16-Apr-2014 |
Masatake YAMATO <yamato@redhat.com> |
unwind: introduce queue_t for capturing stacktrace This is the second step for splitting capturing from printing. New `queue' field is added to tcb. Captured stacktrace is stored here. The field is initialized/finalized at unwind_tcb_init/unwind_tcb_fin. New API function unwind_capture_stacktrace is added. This function captures the currest stack using stracktrace_walker and records it in tcb. It's printing is delayed to the next call of unwind_print_stacktrace. unwind_print_stacktrace is extended. Now it checks queue field of the given tcb at the start of function. If the function finds a captured stack trace, the latter is printed using stracktrace_walker. Currently unwind_capture_stacktrace invocations are added directly to handlers of mmap, munmap, mprotect, and execve. Here is the difference of output with/without patch: (without patch) execve("./test-fork", ["./test-fork"], [/* 56 vars */]) = 0 > /usr/lib64/ld-2.18.so(check_one_fd.part.0+0x82) [0x11f0] (with patch) execve("./test-fork", ["./test-fork"], [/* 54 vars */]) = 0 > /usr/lib64/libc-2.18.so(execve+0x7) [0xbcd27] > /home/yamato/var/strace/strace(exec_or_die+0x10c) [0x26ac] > /home/yamato/var/strace/strace(startup_child+0x346) [0x134f6] > /home/yamato/var/strace/strace(init+0x89f) [0x13dff] > /home/yamato/var/strace/strace(main+0xa) [0x26ca] > /usr/lib64/libc-2.18.so(__libc_start_main+0xf5) [0x21d65] > /home/yamato/var/strace/strace(_start+0x29) [0x2799] In older version output lines of captured elements were built when printing. In this version they are built when capturing the stack. As result, unneeded dynamic memory allocations are avoided. Suggested by Luca Clementi. In older version the combination of snprintf and realloc were used. In this version they are replaced with asprintf. Suggested by Dmitry Levin. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
b65042fbdb576d13e9bb57c21a890539cab25c43 |
|
16-Apr-2014 |
Masatake YAMATO <yamato@redhat.com> |
unwind: make alloc_mmap_cache function local * defs.h (alloc_mmap_cache): Remove. * unwind.c (alloc_mmap_cache): Add static qualifier. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
e53bf23f1c33076090b51184b82af4dd98d0c51c |
|
28-May-2014 |
Mark Hills <Mark.Hills@framestore.com> |
Optionally produce stats on syscall latency Time spent in system time is not useful where a syscall depends on some non-CPU resource, eg. typically open() or stat() to a network drive. This patch adds a new flag (-w) to produce a summary of the time difference between beginning and end of the system call (ie. latency) This functionality has been useful to profile slow processes that are not CPU-bound. Signed-off-by: Mark Hills <mark.hills@framestore.com>
/external/strace/defs.h
|
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/defs.h
|
447db45365e37ec97c41b26b5a24e38d58e4f3ae |
|
29-May-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Constify tv_* functions * defs.h (tv_nz, tv_cmp, tv_float, tv_add, tv_sub, tv_mul, tv_div): Add const qualifier to read only arguments. * util.c (tv_nz, tv_cmp, tv_float, tv_add, tv_sub, tv_mul, tv_div): Likewise.
/external/strace/defs.h
|
3b09ebe724b1ee233ce2314a8b70a4dfdf9d2b07 |
|
02-May-2014 |
James Hogan <james.hogan@imgtec.com> |
Fix {get,set}rlimit decoding with unreliable SIZEOF_RLIM_T When strace is built with large file support definitions in CFLAGS (as may be provided by buildroot) the C library headers may expose a 64-bit rlim_t even though the struct rlimit fields used by the system call interface are only 32-bit. The SIZEOF_RLIM_T will then be 8 which results in bad decoding of the getrlimit and setrlimit syscalls. This is fixed by replacing unreliable SIZEOF_RLIM_T based checks with checks for current_wordsize. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/defs.h
|
7845a42b39e59e904d01e75e21f7bc7eb6462560 |
|
17-Apr-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Fix preadv/pwritev offset decoding * util.c (printllval): Add align argument. * defs.h (printllval): Update prototype. (printllval_aligned, printllval_unaligned): New macros. * file.c (sys_readahead, sys_truncate64, sys_ftruncate64, sys_fadvise64, sys_fadvise64_64, sys_sync_file_range, sys_sync_file_range2, sys_fallocate): Replace printllval call with printllval_aligned. * io.c (sys_pread, sys_pwrite): Likewise. (sys_preadv, sys_pwritev): Replace printllval call with printllval_unaligned. * linux/arm/syscallent.h: Set the number of preadv and pwritev arguments to 5. * linux/mips/syscallent-o32.h: Likewise. * linux/powerpc/syscallent.h: Likewise. * linux/sh/syscallent.h: Likewise. * linux/xtensa/syscallent.h: Likewise. Reported-by: Dima Kogan <dima@secretsauce.net>
/external/strace/defs.h
|
99db95dd039d8fd700e7759bf4969abb55b979b9 |
|
05-Feb-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Implement fanotify_init and fanotify_mark decoding * fanotify.c: New file. * linux/fanotify.h: Likewise. * Makefile.am (strace_SOURCES): Add fanotify.c. (EXTRA_DIST): Add linux/fanotify.h. * defs.h (print_dirfd): New prototype. * file.c (print_dirfd): Export. * linux/dummy.h (sys_fanotify_init, sys_fanotify_mark): Remove. * linux/syscall.h (sys_fanotify_init, sys_fanotify_mark): New prototypes. * pathtrace.c (pathtrace_match): Handle sys_fanotify_init and sys_fanotify_mark.
/external/strace/defs.h
|
82b1ea7c3fc854d5ea805f490d351d443701d60b |
|
05-Feb-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Itroduce XLAT_END macro to make xlat structures more compact * defs.h (XLAT_END): New macro.
/external/strace/defs.h
|
a69ddcb672f326418aaa74f399f600f69d074758 |
|
05-Feb-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Introduce XLAT macro to ease maintenance of xlat structures * defs.h (XLAT): New macro. Suggested-by: Mike Frysinger <vapier@gentoo.org>
/external/strace/defs.h
|
b88a6f877eb08e6d45130374fc1a1867371db703 |
|
31-Jan-2014 |
Stefan Sørensen <stefan.sorensen@spectralink.com> |
Decode ptp ioctls * defs.h (ptp_ioctl): New prototype. * ioctl.c (ioctl_decode): Call ptp_ioctl when code is '='. * Makefile.am (strace_SOURCES): Add ptp.c. (EXTRA_DIST): Add linux/ptp_clock.h. * ptp.c: New file. * linux/ptp_clock.h: New file. Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/defs.h
|
03ef0b2665363adf6100bc4af479a14b5f17bc27 |
|
13-Nov-2013 |
Dmitry V. Levin <ldv@altlinux.org> |
Assume that <sys/ptrace.h> provides a valid ptrace prototype We used to explicitly list architectures where <sys/ptrace.h> from glibc is known to provide a valid prototype for ptrace, and use a homegrown replacement for all the rest. Situation seems to be better nowadays, glibc is not the only libc available, so let's use ptrace prototype from <sys/ptrace.h> by default, leaving the replacement for rare broken cases if any. * defs.h: Use ptrace prototype workaround iff NEED_PTRACE_PROTOTYPE_WORKAROUND is defined.
/external/strace/defs.h
|
0506f0f430c15677c7724f9c4500093e0e7e15d3 |
|
12-Nov-2013 |
Dmitry V. Levin <ldv@altlinux.org> |
Stop using _LFS64_LARGEFILE There is only one place left in the code where strace guesses whether libc provides LFS64 functions and structures. The most natural thing to do there is to check for _LARGEFILE64_SOURCE - the macro provided by glibc. Other libc implementations that provide nondegenerate LFS64 interfaces are expected to define this macro as well. * defs.h (_LFS64_LARGEFILE): Remove. * strace.c: Use _LARGEFILE64_SOURCE instead of _LFS64_LARGEFILE.
/external/strace/defs.h
|
6974bd4f5fae1e78791cf64a6aebc1da2ded25fe |
|
12-Nov-2013 |
Dmitry V. Levin <ldv@altlinux.org> |
Make PTRACE_PEEKUSER/PTRACE_POKEUSER checks less glibc specific * configure.ac (AC_CHECK_DECLS): Add PTRACE_PEEKUSER and PTRACE_POKEUSER. * defs.h: Define PTRACE_PEEKUSER and PTRACE_POKEUSER only if they are not provided by <sys/ptrace.h>. Reported by John Spencer.
/external/strace/defs.h
|
b338f2d65ea9d911a0fead3229ba336bc30e6214 |
|
09-Nov-2013 |
Denys Vlasenko <dvlasenk@redhat.com> |
Fix select decoding on e.g. 32-bit ppc process by 64-bit strace. Added next_set_bit() function which finds the next set bit, properly taking into account word size of the traced process. Use it in decode_select() instead of fd_isset(). Also, properly round fdsize up to word size of traced process, not to strace's word size. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
5e133aa68498626afdbdcf29e22300257a21bf57 |
|
18-Jul-2013 |
Denys Vlasenko <dvlasenk@redhat.com> |
Fix sigset printing via print_sigset(). Replace print_sigset() with print_sigset_addr_len(), which takes not only addr, but also len parameter. This allows us to drop "do we need to print RT signals?" parameter, and this fixes RT signals printing in many syscalls. sys_epoll_pwait: print RT signals too, print sigmask size argument. sys_sigprocmask: print_sigset -> print_sigset_addr_len(current_wordsize), no change in functionality. sys_sigpending: use print_sigset_addr_len(current_wordsize) instead of open-coding it. sys_rt_sigprocmask: use print_sigset_addr_len instead of open-coding it. sys_rt_sigpending: ditto. sys_rt_sigsuspend: ditto. sys_rt_sigtimedwait: ditto. do_signalfd: print_sigset -> print_sigset_addr_len. This fixes RT signals printing (wasn't showing them before). sys_ppoll: ditto. copy_sigset_len() is folded into its only user, print_sigset_addr_len(), and copy_sigset() is gone. While at it, checked kernel sources and noted where kernel enforces sigset_size == NSIG / 8 (== sizeof(kernel_sigset_t)), and where it allows word-sized sigset_size ([rt_]sigpending). Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
76da831a4159a58cd321328498496e772e3b4afc |
|
16-Jul-2013 |
Denys Vlasenko <dvlasenk@redhat.com> |
Group USE_CUSTOM_PRINTF define with other tweakables No code changes. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
a34deadbb3419909d691de514a298f6b748f2d95 |
|
12-Jul-2013 |
Anton Blanchard <anton@samba.org> |
powerpc: fix iflag build issue (static -> extern) Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
fadbf6679cb52d4265a771cbb8635a2ff472e869 |
|
26-Jun-2013 |
Denys Vlasenko <dvlasenk@redhat.com> |
Get rid of TCB_INUSE and TCB_STRACE_CHILD We can use tcb::pid == 0 as an indicator of free tcb, and we already have strace_child variable which holds pid of our child, if any. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
f1669e7975cb8d67448d52d9ae7dde3301d27273 |
|
18-Jun-2013 |
Denys Vlasenko <dvlasenk@redhat.com> |
Cleanups. No logic changes. * defs.h: Define new ptrace constants unconditionally. * strace.c (detach): Fix comment. (trace): Remove now unnecessary "if USE_SEIZE". Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
01997cf32d4492b9898283ced45e8a4a6fd161b8 |
|
13-May-2013 |
Daniel P. Berrange <berrange@redhat.com> |
Allow -q to be repeated for very quiet output Even with the -q flag specified, tracing output is still mixed with messages about signals and process exit status, which is often irrelevant. Allow the -q option to be repeated to force the suppression of signals / exit status info too. * defs.h: Change 'qflag' from 'bool' to 'unsigned int'. * strace.1: Document ability to repeat '-q' option. * strace.c: Allow '-q' to be repeated to quieten process exit status and signal messages. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
/external/strace/defs.h
|
3883ab84388efe01962e4164911508af24d3f2f5 |
|
07-May-2013 |
Mike Frysinger <vapier@gentoo.org> |
mips: fix build regression The recent commit (2690fadc8b35190dddd29274a7405bac13adc469) shuffled the mips headers around causing it to check the ABI defines before it included the header which set those up. Now all mips builds fail with: In file included from count.c:36:0: defs.h:48:4: error: #error Unsupported _MIPS_SIM * defs.h [MIPS]: Move sgidefs.h above _MIPS_SIM check.
/external/strace/defs.h
|
2690fadc8b35190dddd29274a7405bac13adc469 |
|
07-May-2013 |
Dmitry V. Levin <ldv@altlinux.org> |
mips o32: raise the max number of syscall arguments to 7 On mips o32, fadvise64_64 takes 7 arguments. * defs.h [LINUX_MIPSO32]: Raise MAX_ARGS to 7.
/external/strace/defs.h
|
d648f29cc3aeabf0a0430f8ab12ce35fa6c4e48e |
|
02-May-2013 |
Mike Frysinger <vapier@gentoo.org> |
Decode mtd/ubi ioctls Been playing with UBI of late and it'd help if I could see what it was doing. Not entirely sure about the decoding of UBI_IOCVOLUP -- it takes a pointer to a 64bit value, not a strict. * util.c (MAX, MIN): Move to ... * defs.h (MAX, MIN): ... here. (CLAMP): Define. (ubi_ioctl): New prototype. * ioctl.c (ioctl_decode): Call ubi_ioctl when code is 'o' or 'O'. * mtd.c: Include ubi user API header. (ubi_volume_types): New enum decode. (ubi_volume_props): Likewise. (ubi_ioctl): Define. * linux/ubi-user.h: Import from linux 3.8.
/external/strace/defs.h
|
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/defs.h
|
7d5696f11d3c02045001b4ab91a11700f7e05f75 |
|
18-Mar-2013 |
Dmitry V. Levin <ldv@altlinux.org> |
i386, tile, x32: do not redefine ptrace prototype * defs.h [I386 || TILE || X32]: Use ptrace prototype from sys/ptrace.h.
/external/strace/defs.h
|
5198ed4bb36e3105a1f12bb3250bee78b6e0dd72 |
|
06-Mar-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Open-code isprint(c) and isspace(c) We don't call setlocale, thus we always use C locale. But libc supports various other locales, and therefore its ctype interface is general and at times inefficient. For example, in glibc these macros result in function call, whereas for e.g. isprint(c) just c >= ' ' && c <= 0x7e suffices. By open-coding ctype checks (we have only 4 of them) we avoid function calls, we get smaller code: text data bss dec hex filename 245127 680 5708 251515 3d67b strace_old 245019 676 5708 251403 3d60b strace and we don't link in ctype tables (beneficial for static builds). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
61ad0a401c6d1b7b4c1a209f9d61c3790e1e7d15 |
|
06-Mar-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Stop using a large static buffer in getfdpath text data bss dec hex filename 245075 680 9836 255591 3e667 strace_old 245143 680 5708 251531 3d68b strace Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
38cfe7c92328e940c71074c9b579b5bf9f2cb2f6 |
|
05-Mar-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Remove variable tracing_paths and check in pathtrace_match Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
7239dbcf2dff792f408c60fe3e278f707fdf497b |
|
05-Mar-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Use dynamically-sized selected[] array for -P PATH While at it, added a small optimization of not remembering the path twice if it happens to be the same. text data bss dec hex filename 245111 680 10860 256651 3ea8b strace_old 245075 680 9804 255559 3e647 strace Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
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/defs.h
|
05f325199a6cf36c92560d5a08b56652502705c2 |
|
26-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Assorted NOMMU fixes With -D, strdup'ing of pathname is necessary only on NOMMU. Don't set skip_startup_execve to 1 if NOMMU and not in daemonized mode (try "strace [-D] -b env echo HI" to see whether we detach on correct execve). Fix test_ptrace_FOO shortcuts on NOMMU to always assume success and _properly_ set all variables. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
40d63b9a92e049986fce1fb91cca10fdd3d3a64a |
|
22-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Use tcp->qual_flg instead of qual_flags[] in verbose() and abbrev() We have hundreds of uses of these macros. Result is more efficient and 1.1 kbyte shorter code: text data bss dec hex filename 245579 700 12928 259207 3f487 strace.t5/strace 244471 700 12928 258099 3f033 strace.t6/strace Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
4bfb198db17d9a6b83f104d4f1e184664db78391 |
|
20-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Use the same style of includes in linux/*/* files While at it, fix some comments which say "we use i386 syscalls/ioctls/errnos" but in reality common ones are used. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
5c9d8f4fc5318fc740ec2a16bac5b8a29e7eb52d |
|
19-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Make it possible to to do test builds for NOMMU architectures And while using it, I discovered that -D doesn't work too well on NOMMU. Added a comment about it. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
c9d0fc0a63d5b425d6a4e9fedb4cb7a8e3129d6c |
|
17-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Remove broken HAVE_LONG_LONG conditionals We use printllval without HAVE_LONG_LONG guards in many places, but define it only if HAVE_LONG_LONG. This means that on !HAVE_LONG_LONG systems we won't build for some time now. * defs.h: Remove HAVE_LONG_LONG guard around LONG_LONG() macro and printllval() function declaration. * util.c: Remove HAVE_LONG_LONG guard around printllval() function definition. (printllval): Add compile-time error check for using wrong if branch. Explain places where we deliberately use mismatched types for printf formats. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
86738a232d74ddea29d2b9c90e8d036f63c438fd |
|
17-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Merge two identical tables * defs.h: Declare whence_codes[]. * desc.c: Delete static whence[]. (printflock[64]): Use whence_codes. * file.c: Make whence_codes[] non-static. Add SEEK_DATA and SEEK_HOLE to them. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
e015d2d331c75b912e3dd96532e2c31ae0e06554 |
|
15-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Macroize conditional signed widening operation * defs.h: Define widen_to_long() macro. * signal.c (sys_kill): Use it instead of open-coding it. (sys_tgkill): Use widen_to_long() on pids. * resource.c (decode_rlimit): Formatting fix. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
d4d3edefe74787a194a2472d99a673f6d4a2721a |
|
13-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Factor out code to check addr, fetch and print siginfo * defs.h: Declare new function printsiginfo_at(tcp, addr). * process.c (sys_waitid): Use printsiginfo_at(). (sys_ptrace): Likewise. * signal.c: (printsiginfo_at): Implement this new function. (sys_rt_sigsuspend): Use printsiginfo_at(). (sys_rt_sigtimedwait): Likewise. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
bf357fcb76baeb64a45fc2b6b355c913c63e6015 |
|
12-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Remove hacks for old kernels for architectures which require new kernels * defs.h: Do not define TCB_WAITEXECVE for AARCH64. * util.c (change_syscall): For AARCH64 and X32, replace code with dummy "return 0" and a comment explaining why that is ok for these architectures. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
d27809c978f3c8c3271f7d726dc92dd0eefa8a0f |
|
12-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Remove old kernel hacks for architectures which require new kernels * defs.h: Do not define TCB_WAITEXECVE for AVR32, BFIN and TILE. * util.c (change_syscall): For AVR32, BFIN and TILE, replace code with dummy "return 0" and a comment explaining why that is ok for these architectures. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
9472a27b79a6820b5bdf37647c04a7e1d8790737 |
|
12-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Remove unused / ambiguously used defines We sometimes use LINUXSPARC and sometimes (more often) use "defined(SPARC) || defined(SPARC64)". Better to use one construct consistently. LINUX_MIPS64 is altogether unused. * defs.h: Remove LINUXSPARC and LINUX_MIPS64 defines. Move PTRACE_xxx compat defines up, before arch-specific machinery. Use defined(SPARC) || defined(SPARC64) instead of LINUXSPARC. * file.c: Use defined(SPARC) || defined(SPARC64) instead of LINUXSPARC. * signal.c: Likewise. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
26bc0606d96d05d30ba263939a0451889340a64c |
|
10-Jul-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Enable usage of PTRACE_SEIZE * defs.h: Define USE_SEIZE to 1. Remove PTRACE_SEIZE_DEVEL and PTRACE_EVENT_STOP1. * strace.c (ptrace_attach_or_seize): Replace PTRACE_SEIZE_DEVEL with 0. (trace): Do not check for PTRACE_EVENT_STOP1. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
c52826c267aaca5c976b10e13ee6debc0bdf3f43 |
|
15-May-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Make sure current_wordsize and PERSONALITY0_WORDSIZE are ints in all arches On 64bit systems with a single personality, they used to be sizeof(long), which has type "long", not "int", which complicates printf formats. * defs.h: Ensure that PERSONALITY0_WORDSIZE;s tyoe is int. This in turn makes sure current_wordsize is also an int. * count.c (call_summary): Revert the change which added cast to int. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
b5d43b81a8abdf17bc3aa585a66215ebe3ba3671 |
|
28-Apr-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Fix printstr's len parameter width We often pass syscall params and other long-sized values as printstr(len). Truncating them to int may be a bad thing. * defs.h: Change len parameter's type from int to long in string_quote and printstr function declarations. * util.c (string_quote): Special-case only len==-1, not all len<0. (printstr): Likewise. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
e0bc222263cf47a43e1b26d55edb2ffadc8ccbff |
|
28-Apr-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Fix recvmsg decode: do not show more data than actually returned I noticed that "hostname -d" talks over netlink and gets 20 bytes of response, but we show entire 1024 bytes of iov. This changes fixes that. * defs.h: New function tprint_iov_upto. * io.c (tprint_iov_upto): Definition of this function. (tprint_iov): Call tprint_iov_upto. * net.c (do_msghdr): Add data_size parameter, pass it down to tprint_iov_upto. (printmsghdr): Add data_size parameter, pass it down to do_msghdr. (printmmsghdr): Call do_msghdr with data_size==ULONG_MAX. (sys_sendmsg): Call printmsghdr with data_size==ULONG_MAX. (sys_recvmsg): Call printmsghdr with data_size==tcp->u_rval. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
ebee04cfb009bdc46599774b4647f6615b6ce3a2 |
|
18-Apr-2012 |
Mike Frysinger <vapier@gentoo.org> |
Decode /dev/loop ioctls Needed to debug some losetup failures, and it's easier when you can see what the kernel is getting vs what you think you're sending, so add some decoders for those ioctls. * loop.c: New file. * Makefile.am (strace_SOURCES): Add loop.c. * defs.h (loop_ioctl): New prototype. (string_quote): Likewise. * ioctl.c (ioctl_decode): Call loop_ioctl when code is 'L'. * util.c (string_quote): Remove static keyword. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
/external/strace/defs.h
|
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/defs.h
|
6e4f3c1fa41851cb72230432db4be8e0c2993c7d |
|
16-Apr-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Add custom (faster) vfprintf implementation (disabled by default) * defs.h: Declare strace_vfprintf either as a alias to vfprintf or as a bona fide function. USE_CUSTOM_PRINTF define controls whether we use strace_vfprintf. By default, we don't. * strace.c (tprintf): Call strace_vfprintf instead of vfprintf. * vsprintf.c: New file, implements strace_vfprintf. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
0cbed357ab749fa0cf58e8d72230c2ed92334932 |
|
05-Apr-2012 |
Mike Frysinger <vapier@gentoo.org> |
Decode mtd ioctls I got tired of figuring out mtd structures (which show up a lot in the embedded space), so add decoders for those ioctls. * defs.h (mtd_ioctl): New prototype. (print_loff_t): Likewise. * io.c (print_loff_t): Delete static keyword * ioctl.c (ioctl_decode): Call mtd_ioctl when code is 'M'. * Makefile.am (strace_SOURCES): Add mtd.c. (EXTRA_DIST): Add linux/mtd-abi.h. * mtd.c: New file. * linux/mtd-abi.h: New file. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
d63b0d568265296caccef53476cee5e3ca05ce57 |
|
23-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Reorder declarations in defs.h. No code changes * defs.h: Reorder declarations (such as: keep all printing functions together). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
513e9c23df4713c97c25f862ee9c140f508c5a2c |
|
21-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
simple cleanups in defs.h. No logic changes. * defs.h: Move offsetof macro definition into "libc stuff" section. Renumber TCB_foo constants (smaller constants -> sometimes smaller code). Remove uoff macro. * process.c: Move uoff macro here (sole user). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
235067525cc064a9a466c245fa8a6265ae136306 |
|
21-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Report some ptrace failures; nuke tcp->ptrace_errno Report some (not all) ptrace errors, namely, errors on ptrace restart operations. Before: 10533 sendto(-1, 0x804895e, 17, 0, NULL, 0 <unfinished ...> After: 10533 sendto(-1, 0x804895e, 17, 0, NULL, 0 <ptrace(SYSCALL):No such process> This tells user that strace failed to let sendto syscall to be entered - process was dead at that point of time. It is (marginally) better than to always say "<unfinished ...>" While at it, patch removes tcp->ptrace_errno. I added it many months ago, and it looks that after all it is not needed for ptrace error detection: I failed to execute a single existing code path which is accessible through that variable only. * defs.h: Remove struct tcp::ptrace_errno field. * strace.c (ptrace_restart): Emit message to log on error. (printleader): Remove "if (printing_tcp->ptrace_errno)..." code. (trace): Remove !tcp->ptrace_errno check, it's always true. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
852f98a3824f6b8359df744af5772306410341ab |
|
20-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Make ptrace_restart() static. No code changes * defs.h: Remove ptrace_restart() declaration. * strace.c (ptrace_restart): Move its definition here. * util.c (ptrace_restart): Remove its definition. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
a61a72eacb9b6c687937799b933876bb3b397af4 |
|
17-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Remove unused struct tcb::baddr field * defs.h: Remove unused struct tcb::baddr field. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
081533c10048365a2a8ffd2456af81765d402810 |
|
17-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Move change_syscall() to its only user and make it static * defs.h: Remove declaration of change_syscall(). * process.c (change_syscall): Remove definition of this function. * util.c (change_syscall): Add definition of change_syscall(). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
800ec8ffde1296b3f2cfdd838fb08f2ff2bbe946 |
|
16-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Make alloc_tcb and droptcb static. No code changes. The change is trivial. Diff is large because it is confused by function definitions being moved around. * defs.h: Remove declarations of alloc_tcb and droptcb. * strace.c: Make alloc_tcb and droptcb static. Shuffle functions around to make compiler happy. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
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/defs.h
|
2c4fb905fef268a7e359ce3acaec4ee7ef087996 |
|
15-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
When reporting signals, use short signal names (SIGfoo) instead of strerror * defs.h: Remove strsignal declaration. * signal.c: Better check for SI_FROMUSER define. * strace.c (strerror): Remove this function. (trace): Use short signal names (SIGfoo) instead of strerror. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
29898149a0ce805cedb88602896573c50e059e74 |
|
15-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Clean up defs.h order. No code changes * defs.h: Group together related declarations. No code changes. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
68269aa29f37e012ab545aa1e700d2df3b85bb81 |
|
15-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Remove an outdated comment * defs.h: Remove an outdated comment. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
75fe85c2ee83a31afe0c8f1468da28deb1c2bc28 |
|
09-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Fix the case where we try to detach unattached processes Before this change: $ strace -D -p1 strace: -D and -p are mutually exclusive options Process 1 detached <==== WRONG! (and we try to SIGSTOP it!!!) * defs.h: Change the meaning of TCB_ATTACHED: now it means "this tracee is attached to us". Add TCB_STRACE_CHILD: "this tracee is our child". * strace.c (kill_save_errno): Move up. No code changes. (process_opt_p_list): Don't set TCB_ATTACHED on new tcb. (startup_attach): Change how we work with TCB_ATTACHED. Set TCB_STRACE_CHILD on -D. (startup_child): Use kill_save_errno instead of kill. Set TCB_ATTACHED and TCB_STRACE_CHILD on attached strace child. If we are in -D case, don't set TCB_ATTACHED (we aren't attached yet). (detach): do not do PTRACE_DETACH if TCB_ATTACHED is not set. (cleanup): Check TCB_STRACE_CHILD instead of TCB_ATTACHED. (trace): Likewise. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
e8172b79e3dd35a136f4dc4d4de9df5bb4565c01 |
|
09-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Allow -p PID to take comma or whitespace-separated list of PIDs * defs.h: Clarify meaning of TCB_ATTACHED. No code changes. * strace.c (process_opt_p_list): New function. (main): Call process_opt_p_list to process -p PIDs argument. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
114aefd6183b8c073453f8def73270c42255f974 |
|
08-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Pass addr=0 instead of 1 into restarting ptrace calls While we are at it, fold do_ptrace into its lone caller. We no longer set tcp->ptrace_errno = ESRCH on ESRC error in upeek. Other code paths where ptrace fails wern't doing it, and the code which checks tcp->ptrace_errno even assumes it is never set to ESRCH. (It was me who added this code sometime ago, so it was my fault that it was a bit messy) I ran sigkill_rain test and verified that unfinished syscalls are still handled correctly. * util.c (ptrace_restart): Do not pass addr=1 to ptrace(), pass 0 instead. I have no idea why we were passing 1. Ptrace documentation says that addr parameter is ignored. (do_ptrace): Remove this function. (upeek): Use ptrace() instead of do_ptrace(). * defs.h: Remove do_ptrace() declaration. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
aa925db23634fe6a2c1d4b47accb3649daf1b781 |
|
25-Feb-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Remove a few more code parts which are unused on Linux This change is abapted from Dmitry's changes to remove support for non-Linux architectures. * Makefile.am: Remove if LINUX/endif pairs. * defs.h: Remove stream_ioctl() declaration. * ioctl.c (ioctl_decode): Remove 'ifdef HAVE_SYS_STREAM_H' block. * resource.c: Use 'defined(FOO)' instead of 'defined FOO' form. * util.c: Likewise. * signal.c: Remove conditional includes which are never used on Linux. * stream.c: Likewise. * file.c: Remove excessive empty lines. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
329655a4661180043dc3f30e85b343e76a85b8e6 |
|
25-Feb-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Reindent defs.h preprocessor directives * defs.h: Fix indentation of preprocessor directives broken by automatic removal of non-Linux code. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
9aa25abb2e74b05872c8d141776ced5c77b29dcf |
|
10-Feb-2012 |
Dmitry V. Levin <ldv@altlinux.org> |
Remove initialization of native_scno field for most of syscalls The native_scno field is not so much used in the code than before. In many cases sys_func is checked instead, and for most of syscall entries there is no need to initialize native_scno. * linux/i386/syscallent.h: Remove native_scno initialization for _exit, read, write, waitpid, execve, wait4, sysfs, readv, writev, pread64, pwrite64, exit_group, waitid, send, recv, sendto and recvfrom syscall entries. * linux/syscall.h: Do not define no longer used SYS_waitid and SYS_sub_* constants. [IA64]: Do not define SYS_waitpid and SYS32_* constants. * defs.h: Do not define no longer used __NR_exit_group constant. * strace.c [USE_PROCFS] (proc_open): Use sys_func to check for execve.
/external/strace/defs.h
|
e752bed4afcd88da082f8b80ca7060d15c59fb16 |
|
03-Feb-2012 |
H.J. Lu <hongjiu.lu@intel.com> |
Skip the syscall entry if the sys_func field is NULL Avoid NULL dereference when there are holes in sysent tables. It can happen with syscall (number, ...) and number is in those holes. There are no targets with holey systent tables so far, but at least one such a target, x32, is already on the horizon. * defs.h (SCNO_IN_RANGE): Also check the sys_func field.
/external/strace/defs.h
|
31fa8a22b17b2f898513b68e04269597147d2478 |
|
29-Jan-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Add experimental code to use PTRACE_SEIZE, disabled by default All new code is predicated on "ifdef USE_SEIZE". If it is not defined, behavior is not changed. If USE_SEIZE is enabled and run-time check shows that PTRACE_SEIZE works, then: - All attaching is done with PTRACE_SEIZE + PTRACE_INTERRUPT. This means that we no longer generate (and possibly race with) SIGSTOP. - PTRACE_EVENT_STOP will be generated if tracee is group-stopped. When we detect it, we issue PTRACE_LISTEN instead of PTRACE_SYSCALL. This leaves tracee stopped. This fixes the inability to SIGSTOP or ^Z a straced process. * defs.h: Add commented-out "define USE_SEIZE 1" and define PTRACE_SEIZE and related constants. * strace.c: New variable post_attach_sigstop shows whether we age going to expect SIGSTOP on attach (IOW: are we going to use PTRACE_SEIZE). (ptrace_attach_or_seize): New function. Uses PTRACE_ATTACH or PTRACE_SEIZE + PTRACE_INTERRUPT to attach to given pid. (startup_attach): Use ptrace_attach_or_seize() instead of ptrace(PTRACE_ATTACH). (startup_child): Conditionally use alternative attach method using PTRACE_SEIZE. (test_ptrace_setoptions_followfork): More robust parameters to PTRACE_TRACEME. (test_ptrace_seize): New function to test whether PTRACE_SEIZE works. (main): Call test_ptrace_seize() while initializing. (trace): If PTRACE_EVENT_STOP is seen, restart using PTRACE_LISTEN in order to not let tracee run. * process.c: Decode PTRACE_SEIZE, PTRACE_INTERRUPT, PTRACE_LISTEN. * util.c (ptrace_restart): Add "LISTEN" to a possible error message. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
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/defs.h
|
eebb04d4ae8bf4b08a041f5ea442ca24c90692c2 |
|
27-Jan-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Make pid2tcb static * defs.h: Remove pid2tcb declaration. * strace.c (pid2tcb): Make this function static. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
a1d541ec56e2fb4716f083fcc814b1dedde63d87 |
|
20-Jan-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Eliminate code duplication in time printing, reduce a few static buffers text data bss dec hex filename 238454 664 28772 267890 41672 strace.before 238106 664 28676 267446 414b6 strace * defs.h: Add TIMESPEC_TEXT_BUFSIZE and TIMEVAL_TEXT_BUFSIZE defines. Add 'int special' parameter to sprinttv(). * time.c (sprinttv): Add 'int special' parameter, and use it similarly to 'int special' parameter of printtv_bitness(). (printtv_bitness): Use sprinttv() instead of duplicating its code. (print_timespec): Use sprint_timespec() instead of duplicating its code. * desc.c (decode_select): Use TIMEVAL_TEXT_BUFSIZE instead of 128 when checking remaining buffer size. * net.c (sys_recvmsg): Use TIMESPEC_TEXT_BUFSIZE instead of 128 for static buffer size. * stream.c (decode_poll): Use TIMESPEC_TEXT_BUFSIZE instead of 128 when checking remaining buffer size. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/defs.h
|
023b7700de942f59fcb4cd30903969d276a4d796 |
|
18-Jan-2012 |
Denys Vlasenko <dvlasenk@redhat.com> |
Get rid of TCB_SIGTRAPPED On attempts to block or set SIGTRAP handler, for example, using sigaction syscall, we generate an additional SIGSTOP. This change gets rid of this SIGSTOP sending/ignoring. It appears to work just fine. It also works if I force strace to not use PTRACE_O_TRACESYSGOOD, which means strace stops will be marked with SIGTRAP, not (SIGTRAP | 0x80) - I wondered maybe that's when this hack is needed. So, why we even have TCB_SIGTRAPPED? No one knows. It predates version control: this code was present in the initial commit, in 1999. No adequate comments, either. Moreover, TCB_SIGTRAPPED is not set in sys_rt_sigaction and sys_sigprocmask syscalls - the ones which are most usually used to implement signal blocking, it is only set in obsolete sys_signal, sys_sigaction, sys_sigsetmask, and in some dead non-Linux code. I think whatever bug it was fixing is gone long ago - at least as long as sys_rt_sigaction is used by glibc. Again, since glibc (and uclibc) uses sys_rt_sigaction and sys_sigprocmask, modified code paths are not used by most programs anyway. * defs.h: Remove definition of TCB_SIGTRAPPED. * signal.c (sys_sigvec): Don't set TCB_SIGTRAPPED and don't send SIGSTOP. (sys_sigsetmask): Likewise. (sys_sigaction): Likewise. (sys_signal): Likewise. * strace.c (trace): Remove code which executes if TCB_SIGTRAPPED is set. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
f88837a666a716aecd9974f7ef3fcf006e0afce1 |
|
05-Sep-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Do post-attach initialization earlier; fix "we ignore SIGSTOP on NOMMU" bug We set ptrace options when we see post-attach SIGSTOP. This is wrong: it's better to set them right away on the very first stop (whichever it will be). It also will make adding SEIZE support easier, since SEIZE has no post-attach SIGSTOP. We do it by adding a new bit, TCB_IGNORE_ONE_SIGSTOP, and treating TCB_STARTUP and TCB_IGNORE_ONE_SIGSTOP as two slightly different things. * defs.h: Add a new flag bit, TCB_IGNORE_ONE_SIGSTOP. * process.c (internal_fork): Set TCB_IGNORE_ONE_SIGSTOP on a newly added child. * strace.c (startup_attach): Set TCB_IGNORE_ONE_SIGSTOP after attach. Fix a case when "strace -p PID" found PID dead but sone other of its threads still alive. (startup_child): Set TCB_IGNORE_ONE_SIGSTOP after attach, _if needed_. This fixes a bogus case where we can ignore a _real_ SIGSTOP on NOMMU. (detach): Perform anti-SIGSTOP dance only if TCB_IGNORE_ONE_SIGSTOP is set, not if TCB_STARTUP is set. (trace): Set TCB_IGNORE_ONE_SIGSTOP after attach. Clear TCB_STARTUP and initialize tracee on the very first tracee stop. Clear TCB_IGNORE_ONE_SIGSTOP when SIGSTOP is seen. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
d116a7338645af45090aecc331701e999148d284 |
|
05-Sep-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Get rid of TCB_ATTACH_DONE * defs.h: Remove TCB_ATTACH_DONE constant. * strace.c (startup_attach): Use TCB_STARTUP instead of TCB_ATTACH_DONE to distinquish attached from not-yet-attached threads. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
0a295bc97fd2ba9e6dc02f382dc87bc8705dc4d0 |
|
01-Sep-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Add stpcpy to autoconf machinery * configure.ac: Add stpcpy to AC_CHECK_FUNCS. * defs.h: Frame stpcpy with "if !defined HAVE_STPCPY". * util.c: Likewise. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
2fb4db3e7aa1d6ac6b4b43f47597197492a846dd |
|
31-Aug-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Optimization: eliminate all remaining usages of strcat() After this change, we don't use strcat() anywhere. * defs.h: Change sprinttv() return type to char *. * time.c (sprinttv): Return pointer past last stored char. * desc.c (decode_select): Change printing logic in order to eliminate usage of strcat() - use stpcpy(), *outptr++ = ch, sprintf() instead. Also reduce usage of strlen(). * stream.c (decode_poll): Likewise. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
5284557bfad96f12dd5798539008e1644f1dc094 |
|
31-Aug-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Optimization: eliminate some usages of strcat() * defs.h: Declare stpcpy(). * util.c: Define stpcpy(). * file.c: Remove static str_append(). (sprint_open_modes): Use stpcpy() instead of str_append(). (sprintflags): Use stpcpy() instead of strcat(). (printpathn): Eliminate usage of strcat(). (printstr): Eliminate usage of strcat(). Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
77770bbf6b52bc109a2769df3aff19ce9fcdc9f4 |
|
26-Aug-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Indent a large set of nested ifdefs/endifs. No code changes * defs.h: Indent a large set of nested ifdefs/endifs Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
92d443c030d821f3ccb7462842fca8f62aea0b42 |
|
25-Aug-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Group int-sized fields together in struct tcb * defs.h: Group int-sized fields together in struct tcb. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
44142a7b79d96e711c8b492a6ad6bb0a2bbc8ead |
|
23-Aug-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Define MAX_ARGS to 6 for all Linux arches * defs.h: Define MAX_ARGS to 6 for all Linux arches. * linux/ia64/syscallent.h: Change all 8-argument printargs to MA (MAX_ARGS). linux/mips/syscallent.h: Change all two 7-argument printargs to MA (MAX_ARGS). Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
8dc0c8c5ef66c2b2eb76484b83c750c0712891f9 |
|
20-Aug-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Exclude tcp->pfd from non-procfs systems * defs.h: Make struct tcb::pfd fields conditional on USE_PROCFS. * strace.c (alloc_tcb): Use tcp->pfd only if USE_PROCFS. (droptcb): Likewise. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
3ec963237690a8bb7e032c37e26fa0f089bb16e4 |
|
20-Aug-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Remove unused declaration * defs.h: Remove unused declaration of handle_new_child(). Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
d9ec141671dea4f4982749aa1bcc9c9ff4138d30 |
|
20-Aug-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Use natural-sized integer field for tcb::flags * defs: Change struct tcb::flags type from short to int. This results in smaller code at least on x86. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
4924dbd6d750665cf383b20ab4fd67e48219ab91 |
|
19-Aug-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Make addflags return void * defs.h (addflags): Change return type from int to void. * util.c (addflags): Change return type from int to void. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
d9560c108099394281012eb4bd7c46a46df6d31d |
|
19-Aug-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Set saner MAX_ARGS (6 or 8) for X86_64 and I386 I noticed that tcp->u_args[MAX_ARGS] array is way larger than I'd expect: for all arches except HPPA it has 32 (!) elements. I looked at the code and so far I spotted only one abuser of this fact: sys_sigreturn. On several arches, it saves sigset_t into tcp->u_args[1...N] on entry and prints it on exit, a-la memcpy(&tcp->u_arg[1], &sc.oldmask[0], sizeof(sigset_t)) The problem here is that in glibc sigset_t is insanely large: 128 bytes, and using sizeof(sigset_t) in memcpy will overrun &tcp->u_args[1] even with MAX_ARGS == 32: On 32 bits, sizeof(tcp->u_args) == 32*4 == 128 bytes! We may already have a bug there! This commit changes the code to save NSIG / 8 bytes only. NSIG can't ever be > 256, and in practice is <= 129, thus NSIG / 8 is <= 16 bytes == 4 32-bit words, and even MAX_ARGS == 5 should be enough for saving signal masks. * defs.h: Reduce MAX_ARGS for X86_64 and I386 from 32 to 8 for FreeBSD and to 6 for everyone else. Add comment about current state of needed MAX_ARGS. * signal.c: Add comment about size of sigset_t. (sprintsigmask): Reduce static string buffer from 8k to 2k. (sys_sigreturn): Fix sigset saving to save only NSIG / 8 bytes, not sizeof(sigset_t) bytes. * linux/mips/syscallent.h: Reduce nargs of printargs-type syscall to 7. * linux/arm/syscallent.h: Reduce nargs of printargs-type syscall to 6. * linux/i386/syscallent.h: Likewise. * linux/m68k/syscallent.h: Likewise. * linux/powerpc/syscallent.h: Likewise. * linux/s390/syscallent.h: Likewise. * linux/s390x/syscallent.h: Likewise. * linux/sh/syscallent.h: Likewise. * linux/sh64/syscallent.h: Likewise. * linux/sparc/syscallent.h: Likewise. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
44f87efc676467ab47972feec49af4f7f34356bf |
|
17-Aug-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Remove tcp->parent and TCB_CLONE_THREAD. tcp->parent is used for only two things: (1) to send signal on detach via tgkill (need to know tgid). Solution: use tkill, it needs only tid. (2) to optimize out ptrace options setting for new tracees. Not a big deal if we drop this optimization: "set options" op is fast, doing it just one extra time once per each tracee is hardly measurable. TCB_CLONE_THREAD is a misnomer. It used only to flag sibling we attached to in startup_attach. This is used to prevent infinite recursive rescanning of /proc/PID/task. Despite the name, there is no guarantee it is set only on non-leader: if one would run "strace -f -p THREAD_ID" and THREAD_ID is *not* a thread leader, strace will happily attach to it and all siblings and will think that THREAD_ID is the leader! Which is a bug, but since we no longer detach when we think tracee is going to die, this bug no longer matters, because we do not use the knowledge about thread group leaders for anything. (We used it to delay leader's exit). IOW: after this patch strace has no need to know about threads, parents and children, and so on. Therefore it does not track that information. It treats all tracees as independent entities. Overall, this simplifies code a lot. * defs.h: Add TCB_ATTACH_DONE flag, remove TCB_CLONE_THREAD flag and struct tcb::parent field. * process.c (internal_fork): Don't set tcpchild->parent. * strace.c (startup_attach): Use TCB_ATTACH_DONE flag instead of TCB_CLONE_THREAD to avoid attach attempts on already-attached threads. Unlike TCB_CLONE_THREAD, TCB_ATTACH_DONE bit is used only temporarily, and only in this function. We clear it on every tcb before we return. (detach): Use tkill instead of tgkill. (trace): Set ptrace options on new tracees unconditionally, not only when tcp->parent == NULL. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
833fb13cef3f1f05b71361b5002aa3c2faad9615 |
|
17-Aug-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Remove TCB_SUSPENDED constant and related code. Since we no longer suspend waitpid'ing tracees, we have only one case when we suspend tracee: when we pick up a new tracee created by clone/fork/vfork. Background: on some other OSes, attach to child is done this way: get fork's result (pid), loop ptrace(PTRACE_ATTACH) until you hook up new process/thread. This is ugly and not safe, but what matters for us is that it doesn't require suspending. Suspending is required on Linux only, because on Linux attach to child is done differently. On Linux, we use two methods of catching new tracee: adding CLONE_THREAD bit to syscall (if needed, we change [v]fork into clone before that), or using ptrace options. In both cases, it may be so that new tracee appears before one which created it returns from syscall. In this case, current code suspends new tracee until its creator returns. Only then strace can determine who is its parent (it needs child's pid for this, which is visible in parent's [v]fork/clone result). This is inherently racy. For example, what if SIGKILL kills creator after it succeeded creating child, but before it returns? Looks like we will have child suspended forever. But after previous commit, we DO NOT NEED parent<->child link for anything. Therefore we do not need suspending too. Bingo! This patch removes suspending code. Now new tracees will be continued right away. Next patch will remove tcp->parent member. * defs.h: Remove TCB_SUSPENDED constant * process.c (handle_new_child): Delete this function. (internal_fork): Do not call handle_new_child on syscall exit. * strace.c (handle_ptrace_event): Delete this function. (trace): Do not suspend new child; remove all handling of now impossible TCB_SUSPENDED condition. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
02a08fb6f08e21e464b629f20e1601f1176b5be9 |
|
11-Aug-2011 |
Sergei Trofimovich <slyfox@gentoo.org> |
Declare printrusage32() on Alpha * defs.h [ALPHA] (printrusage32): New declaration. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
/external/strace/defs.h
|
1b0df40644ca23fe068d7f004dbc15b07ff85086 |
|
20-Jul-2011 |
Dmitry V. Levin <ldv@altlinux.org> |
Check for additional PTRACE_* constants * configure.ac (AC_CHECK_DECLS): Add PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEEXIT, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE and PTRACE_EVENT_EXIT. * defs.h [LINUX]: Define these PTRACE_* constants when they are not provided by <sys/ptrace.h>. Reported-by: Douglas Mencken <dougmencken@gmail.com> Reported-by: Steve Bennett <steveb@workware.net.au>
/external/strace/defs.h
|
9015cd9f9e33d4457bdb50dbafe1ce943a5f3a96 |
|
24-Jun-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Make IOCTL_WSTOP more readable * defs.h: Make IOCTL_WSTOP more readable Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
ead73bd3493c517fde508aecf6bc097aeae1752c |
|
24-Jun-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Make a few variables static. * defs.h: Remove tcbtab declaration. * strace.c: Make run_uid, run_gid, outf, tcbtab, progname global variables static Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
91ecfac9b61691c0ba2d878c5398c6db52c7624e |
|
23-Jun-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Add a comment about setbpt. No code changes. * defs.h: Add a comment about setbpt(). Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
65d7c4d66c209dce592a5a2ec0d1f83eef6b2f28 |
|
23-Jun-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Remove TCB_FOLLOWFORK TCB_FOLLOWFORK flag seems to be unnecessary, because we either follow all [v]forks/clones or don't follow any, therefore global variable followfork is an already existing indicator of what we want to do. This patch drops all setting/clearing of TCB_FOLLOWFORK bit, and replaces checks for this bit by checks of followfork value. In internal_fork, check is moved to in front of if(), since the check is needed on both "entering" and "exiting" branch. * defs.h: Remove TCB_FOLLOWFORK define. * process.c (internal_fork): Do not set/clear TCB_FOLLOWFORK, test followfork instead of tcp->flags & TCB_FOLLOWFORK. (handle_new_child): Likewise. * strace.c (startup_attach): Likewise. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
2b60c35b33cf22a88405c60db1e620880d05a7d4 |
|
22-Jun-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Delete fork_tcb() Get rid of fork_tcb() function. It used to do what the comment above it says, but now it doesn't do much: it only sets tcp->flags |= TCB_FOLLOWFORK and maybe calls expand_tcbtab(). The second operation is not necessary, since alloc_tcp() will do it itself when needed. This patch deletes fork_tcb(), open-coding tcp->flags |= TCB_FOLLOWFORK where it was formerly called. It also makes nprocs, tcbtabsize and expand_tcbtab() static. (While at it, I nuked redundant extern char **environ declaration: strace.c had *two* of them...) * defs.h: Remove declarations of nprocs, tcbtabsize and expand_tcbtab. * process.c (fork_tcb): Remove this function. (internal_fork): Open-code fork_tcb. (handle_new_child): Likewise. * strace.c: Remove redundant "extern char **environ". Declare nprocs and tcbtabsize static. (expand_tcbtab): Make it static. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
b56d6d3bfeeb8889ea18105033acfba6f3fcbf51 |
|
21-Jun-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Remove write-only nchildren member from struct tcb * defs.h: Remove nchildren member from struct tcb. * process.c (handle_new_child): Remove inc/decrements of tcp->nchildren. (internal_fork): Likewise. * strace.c (startup_attach): Likewise. (droptcb): Likewise. (alloc_tcb): Remove initialization of tcp->nchildren. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
f0a5f6d7107ade2ea9c425330655e97d11d17d79 |
|
21-Jun-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Remove write-only nzombies member from struct tcb * defs.h: Remove nzombies member from struct tcb. * strace.c (droptcb): Remove "tcp->parent->nzombies++". (alloc_tcb): Remove "tcp->nzombies = 0". Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
f44cce48bbbd573cc5ae801f69f857433160b03a |
|
21-Jun-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Fix regression introduced by "Properly handle real SIGTRAPs" change Commit 3454e4b463e6c22c7ea8c5461ef5a077f4650a54 introduced a bug: sometimes, TRACECLONE/TRACE[V]FORK opts were not set. The check (tcp->parent == NULL) in old code was meant to check "if we are not a child created by auto-attach" - in this case, options need to be set on the child; otherwise they are inherited and do not need to be set. I misunderstood the check and if tcp->parent is not NULL, I was setting only ptrace_setoptions_for_all bits. This change fixes the problem. Since the fixed logic makes it unnecessary to keep two sets of options in separate variables, I merge them back into one variable, ptrace_setoptions. * defs.h: Merge ptrace_setoptions_followfork and ptrace_setoptions_for_all into one variable, ptrace_setoptions. * strace.c: Likewise. (test_ptrace_setoptions_followfork): Use ptrace_setoptions variable. (test_ptrace_setoptions_for_all): Likewise. (main): Likewise. * process.c (internal_fork): Likewise. (internal_exec): Likewise. * strace.c (trace): Fix the bug where different options were set depending on "tcp->parent == NULL" condition. Add a comment which makes it more clear why this condition is checked. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/defs.h
|
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/defs.h
|
8884968a46f5413345de7b0085388a367eb9caae |
|
14-Jun-2011 |
Dmitry V. Levin <ldv@altlinux.org> |
Add argument to tprint_iov() specifying whether to decode each iovec * defs.h (tprint_iov): Add decode_iov argument. * io.c (tprint_iov): Implement new decode_iov argument. (sys_readv, sys_writev, sys_sendfile, sys_preadv, sys_pwritev): Update tprint_iov calls. * net.c (do_msghdr): Likewise.
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
75422766d51cf96ea081977c9d0b26b2ba1a8ade |
|
27-May-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Cleanups on top of "handle SIGTRAP properly" change, based on Dmitry's comments. * defs.h ([p]error_msg[_and_die]): Declare new functions. * strace.c (SYSCALLTRAP): Rename to syscall_trap_sig. ([p]error_msg[_and_die]): Define new functions. (strace_tracer_pid): New variable, it controls which pid will do cleanup on exit via [p]error_msg_and_die. (main): Set strace_tracer_pid to our initial pid. (startup_attach): Change strace_tracer_pid if we are in -D mode. (test_ptrace_setoptions_for_all): Minor changes to logic, such as better diagnostic messages.
/external/strace/defs.h
|
f8bc0655a0db6fd3031384a88cdc707285029ca5 |
|
24-May-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Don't perform TCB_WAITEXECVE wait if not needed. * defs.h (ptrace_setoptions_for_all): Expose this variable. * strace.c (ptrace_setoptions_for_all): Remove "static". * process.c (internal_exec): Don't set TCB_WAITEXECVE bit if we know that post-execve SIGTRAP is not going to happen.
/external/strace/defs.h
|
3454e4b463e6c22c7ea8c5461ef5a077f4650a54 |
|
23-May-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Properly handle real SIGTRAPs. * defs.h (ptrace_setoptions): Variable renamed to ptrace_setoptions_followfork. * process.c (internal_fork): Ditto. * strace.c (ptrace_setoptions_for_all): New variable. (SYSCALLTRAP): New variable. (error_msg_and_die): New function. (test_ptrace_setoptions_for_all): New function. (main): Call test_ptrace_setoptions_for_all() at init. (handle_ptrace_event): Handle PTRACE_EVENT_EXEC (by ignoring it). (trace): Check events and set ptrace options without -f too. Check WSTOPSIG(status) not for SIGTRAP, but for SYSCALLTRAP.
/external/strace/defs.h
|
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/defs.h
|
03aefdadb20f3bdd05bf644dc2ce1e85758a5aee |
|
15-Mar-2011 |
Dmitry V. Levin <ldv@altlinux.org> |
Ensure that PTRACE_GETSIGINFO et al are always defined on Linux * configure.ac (AC_CHECK_DECLS): Add PTRACE_* constants. * defs.h [LINUX]: Define those PTRACE_* constants that are not provided by <sys/ptrace.h>.
/external/strace/defs.h
|
3138213bc9a827a372ad9f8009ebcc5d8797ce2d |
|
04-Mar-2011 |
Dmitry V. Levin <ldv@altlinux.org> |
Fix decoding of file descriptors * defs.h (printfd): New function prototype. * util.c (printfd): New function. * file.c (print_dirfd): Update prototype to use printfd(). (sys_openat, sys_faccessat, sys_newfstatat, sys_mkdirat, sys_linkat, sys_unlinkat, sys_readlinkat, sys_renameat, sys_fchownat, sys_fchmodat, sys_futimesat, sys_utimensat, sys_mknodat): Update use of print_dirfd(). (sys_lseek, sys_llseek, sys_readahead, sys_ftruncate, sys_ftruncate64, sys_fstat, sys_fstat64, sys_oldfstat, sys_fstatfs, sys_fstatfs64, sys_fchdir, sys_fchroot, sys_linkat, sys_fchown, sys_fchmod, sys_fsync, sys_readdir, sys_getdents, sys_getdirentries, sys_fsetxattr, sys_fgetxattr, sys_flistxattr, sys_fremovexattr, sys_fadvise64, sys_fadvise64_64, sys_inotify_add_watch, sys_inotify_rm_watch, sys_fallocate): Use printfd() for decoding of file descriptors. * desc.c (sys_fcntl, sys_flock, sys_close, sys_dup, do_dup2, decode_select, sys_epoll_ctl, epoll_wait_common): Use printfd() for decoding of file descriptors. * io.c (sys_read, sys_write, sys_readv, sys_writev, sys_pread, sys_pwrite, sys_sendfile, sys_sendfile64, sys_pread64, sys_pwrite64, sys_ioctl): Likewise. * mem.c (print_mmap, sys_mmap64): Likewise. * signal.c (do_signalfd): Likewise. * stream.c (decode_poll): Likewise. * time.c (sys_timerfd_settime, sys_timerfd_gettime): Likewise. Based on patch from Grant Edwards <grant.b.edwards@gmail.com>.
/external/strace/defs.h
|
10a16a76fc04ec692a255c7ca2f4aac2e19df2c1 |
|
07-Sep-2010 |
Dmitry V. Levin <ldv@altlinux.org> |
Simplify tprintf() declaration * defs.h (tprintf): Simplify declaration.
/external/strace/defs.h
|
7655fa090707a94c5ed34128e0d36da75af95198 |
|
05-Feb-2011 |
Dmitry V. Levin <ldv@altlinux.org> |
* defs.h (SYSCALL_NEVER_FAILS): Fix typo.
/external/strace/defs.h
|
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/defs.h
|
4ef6db489a8a51ae03ffb78b58c679162a39f3c3 |
|
15-Jan-2011 |
Dmitry V. Levin <ldv@altlinux.org> |
Add block ioctl support * block.c: New file. * Makefile.am (strace_SOURCES): Add it. * defs.h [LINUX] (block_ioctl): New function. * ioctl.c (ioctl_decode) [LINUX]: Use it to decode HDIO_* and BLK* ioctls. Patch by Jeff Mahoney <jeffm@suse.com>
/external/strace/defs.h
|
b9c525790c158404c96ce8508e42a9217d1760d3 |
|
13-Dec-2010 |
Carmelo AMOROSO <carmelo.amoroso@st.com> |
sh: Fix compilation warning in do_pipe due to missing prototype * defs.h [SH]: Make getrval2 prototype visible to do_pipe and fix the following compiler warning: .../net.c: In function 'do_pipe': .../net.c:1632: warning: implicit declaration of function 'getrval2' .../net.c:1632: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'int' Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
/external/strace/defs.h
|
696381ec63ec200c5211643e4a4324d58b3031c4 |
|
14-Dec-2010 |
Dmitry V. Levin <ldv@altlinux.org> |
Fix build on uClibc * defs.h [LINUX]: Define PTRACE_GETEVENTMSG macro. Patch by Douglas Mencken <dougmencken@gmail.com>.
/external/strace/defs.h
|
ca8ab8d2958f86297a6574a73cc1b9759d59c9b1 |
|
12-Nov-2010 |
Wang Chao <wang.chao@cn.fujitsu.com> |
Handle followfork using ptrace_setoptions if available If PTRACE_O_TRACECLONE et al options are supported by kernel, use them to do followfork rather than the original setbpt method that changes registers ourselves. * defs.h [LINUX] (handle_new_child): New function prototype. * process.c [LINUX] (handle_new_child): New function based on the code from internal_fork(), with a trivial change: do reparent only for sys_clone. [LINUX] (internal_fork): Use handle_new_child(). Do nothing if ptrace_setoptions is in effect. * strace.c [LINUX] (handle_ptrace_event): New function. [LINUX] (trace): If ptrace_setoptions is in effect, then call the new function to handle PTRACE_EVENT_* status, and set PTRACE_SETOPTIONS when we see the initial stop of tracee. Signed-off-by: Wang Chao <wang.chao@cn.fujitsu.com>
/external/strace/defs.h
|
b13c0de058585de7d47778a8923426b89bfffbb5 |
|
12-Nov-2010 |
Wang Chao <wang.chao@cn.fujitsu.com> |
Test how PTRACE_SETOPTIONS support works Currently test fork related options only. Fork a child that uses PTRACE_TRACEME at startup and then does a fork so strace can test how the PTRACE_SETOPTIONS support works before it handles any real tracee. Since PTRACE_O_TRACECLONE/*FORK were introduced to kernel at the same time, this test seems to be enough for these 3 options. * defs.h [LINUX]: Define PTRACE_O_TRACECLONE et al macros here. (ptrace_setoptions): New variable declaration. * strace.c [LINUX] (test_ptrace_setoptions): New function, tests whether kernel supports PTRACE_O_CLONE/*FORK, the result is stored in the new variable ptrace_setoptions for later use. (main): Call test_ptrace_setoptions() if followfork option is set. Signed-off-by: Wang Chao <wang.chao@cn.fujitsu.com>
/external/strace/defs.h
|
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/defs.h
|
21b8db4eb966a6098c7cd10bd6cf0ce8ec59cab8 |
|
27-Aug-2010 |
Wang Chao <wang.chao@cn.fujitsu.com> |
Drop nclone_detached and related flags Remove nclone_detached since CLONE_DETACHED flag was no-op for a very long time in kernel. * defs.h (struct tcb): Remove nclone_detached field. Remove TCB_CLONE_DETACHED flag. * process.c: Remove CLONE_DETACHED flag. (clone_flags): Remove CLONE_DETACHED entry. (internal_fork, internal_wait): Remove code dealing with CLONE_DETACHED flag and nclone_detached. * strace.c (startup_attach, alloc_tcb, droptcb, handle_group_exit): Likewise. Signed-off-by: Wang Chao <wang.chao@cn.fujitsu.com>
/external/strace/defs.h
|
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/defs.h
|
102e69a3ea49c2833e2c95bf1babcaa0761d0ed7 |
|
03-Jul-2010 |
Andreas Schwab <schwab@linux-m68k.org> |
Remove extern declaration at file scope * defs.h (force_result): Declare. * process.c (internal_wait): Don't declare force_result.
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
e5355de95c495dcfc616509f88c4fb5f9996b8e6 |
|
27-Oct-2009 |
Andreas Schwab <schwab@redhat.com> |
Remove support for pre-C89 * defs.h: Remove references to __STDC__ and P macros. * strace.c: Likewise.
/external/strace/defs.h
|
b5600fc3df0453ba11f254a9b49add3ffbec9733 |
|
04-Nov-2009 |
Andreas Schwab <schwab@redhat.com> |
Factor out printing of 64bit syscall argument * defs.h (ALIGN64): Remove. (printllval): Declare. * util.c (printllval): Define. * file.c (sys_readahead): Use printllval. (sys_lseek64): Likewise. (sys_truncate64): Likewise. (sys_ftruncate64): Likewise. (sys_fadvise64): Likewise. (sys_fadvise64_64): Likewise. (sys_fallocate): Likewise. * io.c (sys_pread): Likewise. (sys_pwrite): Likewise. (sys_pread64): Likewise. (sys_pwrite64): Likewise. * mem.c (sys_mmap64): Likewise.
/external/strace/defs.h
|
ccdff481c086611488c5df70550fcf8fe907e7af |
|
27-Oct-2009 |
Andreas Schwab <schwab@redhat.com> |
Maintain separate print column for each process * defs.h (struct tcp): Add curcol. * strace.c: (alloc_tcb): Initialize it. (trace): Use curcol from current process and save it before continuing. (tprintf): Don't modify curcol on output error.
/external/strace/defs.h
|
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/defs.h
|
67874d8393499e3c7f0d5a950f2707758560f61f |
|
06-Oct-2009 |
Dmitry V. Levin <ldv@altlinux.org> |
* defs.h [HPPA]: Lower MAX_ARGS from 32 to 6.
/external/strace/defs.h
|
eb9e2e8904ce85a6c7390be25bb873c6db88c4d3 |
|
03-Jun-2009 |
Roland McGrath <roland@redhat.com> |
Revert unapproved commits.
/external/strace/defs.h
|
eedaac768dcb55346292495440f1201bd7b2b1b4 |
|
10-Mar-2009 |
Denys Vlasenko <dvlasenk@redhat.com> |
Decode fcntl's F_{GET,SET}LEASE, F_NOTIFY, and F_DUPFD_CLOEXEC. By Mike Frysinger (vapier AT gentoo.org) * desc.c: Add F_SETLEASE, F_GETLEASE, F_NOTIFY, F_DUPFD_CLOEXEC to fcntlcmds[]. Create notifyflags[] array. (sys_fcntl): Handle new flags. Optimize printing of open modes. * defs.h: Declare sprint_open_modes(), remove unused parameter in tprint_open_modes(). * desc.c (sprint_open_modes): Move fuction definition from here... * file.c (sprint_open_modes): To here. (tprint_open_modes): Use sprint_open_modes(), it already generates needed string. * ipc.c: Remove unused parameter from calls to tprint_open_modes().
/external/strace/defs.h
|
c71016ea799c6ca5b7bfca60eb845266af9c065f |
|
06-Mar-2009 |
Denys Vlasenko <dvlasenk@redhat.com> |
defs.h: cosmetics (wrap overlong line)
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
3bb7cd6660032e97f76e8f62efd3540dbba97656 |
|
09-Feb-2009 |
Denys Vlasenko <dvlasenk@redhat.com> |
* defs.h: Correct the comment about TCB_SUSPENDED. * strace.c: Fix misplaced #endif. * util.c: Indent preprocessor directives, mark code parts which can never be reached by compilation because of the combination of #if directives. These are likely dead code, I want to remove them later.
/external/strace/defs.h
|
59432dbb333959618b5afdb9a7513d1ab0289a14 |
|
26-Jan-2009 |
Denys Vlasenko <dvlasenk@redhat.com> |
* process.c (printwaitn): Add comment about wait4() pid expansion. Use #ifdef ALPHA instead of LINUX_64BIT, it was misleading (by implying "any 64-bit platform"). * defs.h: Remove now-unused LINUX_64BIT define. * resource.c (sys_osf_getrusage): Fix indentation.
/external/strace/defs.h
|
418d66a847bda4867c59e604c0d07c64ed53e320 |
|
17-Jan-2009 |
Denys Vlasenko <dvlasenk@redhat.com> |
Two cleanups: tcb table expansion failure is not really a survivable event, we do not have any viable way to continue. No wonder most places where that is detected have FIXMEs. It's way simpler to treat as fatal failure, and handle it inside tcb table expansion finctions. Second cleanup: tidy up haphazard locations of a few externs. * defs.h: Change return type of expand_tcbtab() to void. Declare change_syscall(). * process.c: Change all callsites of alloctcb(), alloc_tcb() and fork_tcb(), removing now-redundant error checks. (fork_tcb): Change return type to void - it can't fail now. * strace.c: Move extern declarations out of function bodies. Change all callsites of alloctcb(), alloc_tcb() and fork_tcb(), removing now-redundant error checks. (expand_tcbtab): Change return type to void - it can't fail now. On failure to expand, print a message, clean up, and exit. (alloc_tcb): On failure to expand, print a message, clean up, and exit. * util.c (setbpt): Remove extern declaration from function body.
/external/strace/defs.h
|
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/defs.h
|
f535b54bc40373c81b13df0975aef4212dacbbde |
|
13-Jan-2009 |
Denys Vlasenko <dvlasenk@redhat.com> |
Fixes for ptrace() argument parsing. * process.c: Add parsing of PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO. * strace.c (handle_stopped_tcbs): Make PTRACE_SETOPTIONS define check more robust. * defs.h: Declare several "extern const struct xlat" arrays here. * desc.c: Remove open_mode_flags[] and open_access_modes[] extern declarations. * net.c: Remove open_mode_flags[] extern declaration. * sock.c: Remove addrfams[] extern declaration. * util.c: Remove struct_user_offsets[] extern declaration. * signal.c: Remove open_mode_flags[] extern declaration.
/external/strace/defs.h
|
215cc2703763894faea05899642ea5dfd5fc5c95 |
|
09-Jan-2009 |
Denys Vlasenko <dvlasenk@redhat.com> |
* defs.h: Add new struct tcb fields: wait_status, next_need_service. make flags field wider (ints are easier to work with on many CPUs). * strace.c (trace): Split this function into two: collect_stopped_tcbs() and handle_stopped_tcbs(). Now we collect *all* waitable tasks, then handle them all, then repeat. Fixes RH#478419 "Some threads stop when strace with -f option is executed on a multi-thread process" * test/many_looping_threads.c: example program which cna't be straced successfully without this fix.
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
96d5a76109b4f1d1f4c9c76641e6ec896108083d |
|
29-Dec-2008 |
Denys Vlasenko <dvlasenk@redhat.com> |
* defs.h: Remove sigtrap80 field from struct tcb. * strace.c: Add ptrace_stop_sig static variable and use it in place of tcp->sigtrap80. Add ptrace_opts_set static flag variable. (trace): Set ptrace options once, not per-process. If unexpected SIGTRAP is later received, revert back to using SIGTRAP (assume old, broken kernel).
/external/strace/defs.h
|
1e3ce32a4fadb58230bca4f16baf8152579dd3d0 |
|
22-Dec-2008 |
Denys Vlasenko <dvlasenk@redhat.com> |
Make strace correctly handle SIGTRAP produced by e.g. kill(2) and by trapping instruction. * defs.h: Add sigtrap80 field to struct tcb. * strace.c (alloc_tcb): Initialize it to SIGTRAP. (detach): Use tcp->sigtrap80 instead of SIGTRAP constant. (trace): Attempt to set PTRACE_O_TRACESYSGOOD and PTRACE_O_TRACEEXEC options on each newly attached process, distinquish between SIGTRAP and (SIGTRAP | 0x80) stops. Fixes RH#162774 "strace ignores int3 SIGTRAP".
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
639658b75493e752b2bccfa4c03c411a860a8912 |
|
01-Aug-2008 |
Roland McGrath <roland@redhat.com> |
2008-07-31 Roland McGrath <roland@redhat.com> * configure.ac: Add AC_HEADER_STDBOOL. * defs.h [HAVE_STDBOOL_H]: #include <stdbool.h>. Fixes Debian##492774.
/external/strace/defs.h
|
c07538a2da61e1ed1b70706442b7de99a3b852de |
|
22-Jul-2008 |
Roland McGrath <roland@redhat.com> |
2008-07-21 Roland McGrath <roland@redhat.com> * defs.h [LINUXSPARC]: Don't #include <linux/a.out.h>.
/external/strace/defs.h
|
41c48227a86a176da333f713d5047240885f25cc |
|
18-Jul-2008 |
Roland McGrath <roland@redhat.com> |
2008-07-03 Jan Kratochvil <jan.kratochvil@redhat.com> Trace even VFORK on -f on all the platforms. * strace.1 <-f>: Describe Linux catches new children immediately. <-F>: Make the option obsolete. Move the SunOS VFORK comment to the `-f' option description. * defs.h (followvfork): Declaration removed. * strace.c (followvfork): Variable removed. (main) <-F>: Merge with the `-f' option. (trace): Make !FOLLOWVFORK unconditional. * process.c (internal_fork): Make !FOLLOWVFORK unconditional.
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
6bc09daaf6b249b35dec4283b165b1f39e6d6a0d |
|
01-Nov-2007 |
Roland McGrath <roland@redhat.com> |
2007-09-22 Dmitry V. Levin <ldv@altlinux.org> * time.c (print_timespec, sprint_timespec): New functions. * defs.h (print_timespec, sprint_timespec): Declare them. * desc.c (sys_io_getevents): Use print_timespec. * stream.c (sys_ppoll): Likewise. (decode_poll): Use sprint_timespec.
/external/strace/defs.h
|
a6c0d8c90a1cc3117f70281968d9efe6de755d83 |
|
01-Nov-2007 |
Roland McGrath <roland@redhat.com> |
2007-09-22 Dmitry V. Levin <ldv@altlinux.org> * desc.c (sprintflags): Remove static qualifier, add "prefix" argument, move function to ... * util.c (sprintflags): ... here. * defs.h (sprintflags): Declare it.
/external/strace/defs.h
|
5aa0434fe990c2137f6e16fb69ff6279832ab393 |
|
12-Sep-2007 |
Roland McGrath <roland@redhat.com> |
2007-09-11 Roland McGrath <roland@redhat.com> * defs.h [LINUXSPARC]: Use asm/psrcompat.h for [SPARC64], not asm/psr.h. From Jakub Bogusz <qboosh@pld-linux.org>.
/external/strace/defs.h
|
6afc5659acc3df3d2e446ba4aa3a76bdd7264e1b |
|
24-Jul-2007 |
Roland McGrath <roland@redhat.com> |
2007-07-23 Ulrich Drepper <drepper@redhat.com> * defs.h: Add new parameter to printtv_bitness prototype. (printttv): Pass zero for the new parameter. (printtv_special): New macro. * desc.c (decode_select): Pass zero for the new parameter of printtv_bitness. * file.c (utimensatflags): New macro. (sys_osf_utimes): Pass zero for the new parameter of printtv_bitness. (sys_utimes): Likewise. (sys_futimesat): Likewise. (decode_utimes): Add new parameter. Pass it to the printtv_bitness calls. Fix printing of time values. (sys_utimensat): New function. * time.c (UTIME_NOW, UTIME_OMIT): Define if not already happened. (printtv_bitness): Add new parameter. Print special UTIME_* values as strings if set. (sys_osf_gettimeofday): Pass zero for the new parameter of printtv_bitness. (sys_osf_settimeofday): Likewise. * linux/syscall.h: Declare sys_utimensat. * linux/syscallent.h: Add utimensat entry. * linux/x86_64/syscallent.h: Likewise.
/external/strace/defs.h
|
b011af5ef077fcfc2ad967579dcb1e5ed9b3193e |
|
30-Jun-2007 |
Dmitry V. Levin <ldv@altlinux.org> |
2007-03-29 Vladimir Nadvornik <nadvornik@suse.cz> Dmitry V. Levin <ldv@altlinux.org> Trace linux SG_IO ioctl arguments and results. * scsi.c: New file. * Makefile.am (strace_SOURCES): Add scsi.c * defs.h (scsi_ioctl): New function. * ioctl.c (ioctl_decode): Use scsi_ioctl().
/external/strace/defs.h
|
9b5b67eb43bf90e83834126dfde4472e5a721080 |
|
12-Jan-2007 |
Dmitry V. Levin <ldv@altlinux.org> |
2007-01-11 Dmitry V. Levin <ldv@altlinux.org> Fix open(2) flags parser. * defs.h (tprint_open_modes): New function. * desc.c (sprint_open_modes): New function. (sys_fcntl): Use tprint_open_modes() and sprint_open_modes(). * file.c (openmodes): Split xlat into open_access_modes and open_mode_flags. (tprint_open_modes): New function. (decode_open): Use it. * ipc.c (sys_mq_open, printmqattr): Likewise. Fixes RH#222385.
/external/strace/defs.h
|
ab9008bc085848e6c898cd38b7415baa161c5890 |
|
11-Jan-2007 |
Dmitry V. Levin <ldv@altlinux.org> |
2006-12-27 Dmitry V. Levin <ldv@altlinux.org> Add const qualifier to xlookup() return value * defs.h (xlookup): Add const qualifier to return value. * desc.c (sprintflags): Likewise. * process.c (printpriv): Update xlookup() use. * signal.c (sprintsigmask): Add const qualifier to first argument and return value. * util.c (xlookup): Add const qualifier to return value. (printxval): Update xlookup() use.
/external/strace/defs.h
|
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/defs.h
|
10de62bb052b541af3d0566f05f3f870cce0e028 |
|
13-Dec-2006 |
Dmitry V. Levin <ldv@altlinux.org> |
2006-12-12 Dmitry V. Levin <ldv@altlinux.org> Fix -ff -o behaviour. Fix piping trace output. * defs.h (newoutf): Remove. (alloctcb): Rename to alloc_tcb. Add alloctcb() macro wrapper around alloc_tcb(). * process.c [!USE_PROCFS] (internal_clone, internal_fork): Remove newoutf() call. * strace.c (set_cloexec_flag, strace_fopen, strace_popen, swap_uid): New functions. (popen_pid): New variable. (newoutf): Make static, use strace_fopen(). (main): Use strace_fopen() and strace_popen(), remove uids swapping. Do not open outfname when followfork > 1. Reinitialize tcp->outf properly. (alloctcb): Rename to alloc_tcb. Use newoutf(). (trace): Check popen_pid. Remove newoutf() call. [USE_PROCFS] (proc_open, proc_poll_open): Use set_cloexec_flag(). Fixes RH#204950, RH#218435.
/external/strace/defs.h
|
a7945a3d4e144674a8dd1d885e7086bc274e391b |
|
13-Dec-2006 |
Dmitry V. Levin <ldv@altlinux.org> |
2006-12-10 Dmitry V. Levin <ldv@altlinux.org> Add biarch support for "struct timeval". * defs.h (bitness_t): New enum type. (printtv_bitness, sprinttv): New function prototypes. (printtv): Convert to macro wrapper around printtv_bitness(). (printtv32): Remove. * desc.c (decode_select): Use printtv_bitness() and sprinttv(). (sys_oldselect, sys_osf_select, sys_select, sys_pselect6): Update decode_select() use. * file.c [ALPHA] (sys_osf_utimes): Use printtv_bitness(). * time.c (printtv_bitness, sprinttv): New functions. (printtv, printtv32): Remove. [ALPHA] (sys_osf_settimeofday, sys_osf_settimeofday): Use printtv_bitness(). Fixes RH#171626, RH#173050.
/external/strace/defs.h
|
4ebb4e3d312bb8215f4eea9130cce6bb8bdb972f |
|
13-Dec-2006 |
Dmitry V. Levin <ldv@altlinux.org> |
2006-12-10 Dmitry V. Levin <ldv@altlinux.org> Add biarch support for "struct iovec". * defs.h (personality_wordsize): Add. * io.c [HAVE_SYS_UIO_H] (tprint_iov): [LINUX && SUPPORTED_PERSONALITIES > 1] Handle 32-bit personality. * util.c [HAVE_SYS_UIO_H] (dumpiov): [LINUX && SUPPORTED_PERSONALITIES > 1] Likewise. Patch from Jakub Jelinek. Fixes RH#218433.
/external/strace/defs.h
|
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/defs.h
|
95ebf5abfc1f3ed8b451b7816aa51b93a49e3ef7 |
|
13-Oct-2006 |
Dmitry V. Levin <ldv@altlinux.org> |
2006-10-13 Ulrich Drepper <drepper@redhat.com> Bernhard Kaindl <bk@suse.de> Dmitry V. Levin <ldv@altlinux.org> Michael Holzheu <holzheu@de.ibm.com> Add hooks for new syscalls. Add decoders for *at, inotify*, pselect6, ppoll and unshare syscalls. * defs.h: Declare print_sigset. * desc.c (sys_pselect6): New function. * file.c (decode_open, decode_access, decode_mkdir, decode_readlink, decode_chmod, decode_utimes, decode_mknod): New functions. (sys_open, sys_access, sys_mkdir, sys_readlink, sys_chmod, sys_utimes, sys_mknod): Use them. [LINUX] (fstatatflags, unlinkatflags, inotify_modes): New variables. [LINUX] (print_dirfd, sys_openat, sys_faccessat, sys_newfstatat, sys_mkdirat, sys_linkat, sys_unlinkat, sys_symlinkat, sys_readlinkat, sys_renameat, sys_fchownat, sys_fchmodat, sys_futimesat, sys_mknodat, sys_inotify_add_watch, sys_inotify_rm_watch): New functions. * process.c [LINUX] (sys_unshare): New function. * signal.c (print_sigset): New function. (sys_sigprocmask): Use it. * stream.c (decode_poll): New function. (sys_poll): Use it. [LINUX] (sys_ppoll): New function. * linux/syscall.h: Delcare new syscall handlers. * linux/syscallent.h: Hook up new syscalls. * linux/alpha/syscallent.h: Likewise. * linux/hppa/syscallent.h: Likewise. * linux/ia64/syscallent.h: Likewise. * linux/mips/syscallent.h: Likewise. * linux/powerpc/syscallent.h: Likewise. * linux/s390/syscallent.h: Likewise. * linux/s390x/syscallent.h: Likewise. * linux/sparc/syscallent.h: Likewise. * linux/sparc64/syscallent.h: Likewise. * linux/x86_64/syscallent.h: Likewise. Fixes RH#178633.
/external/strace/defs.h
|
aca9a74264bb2460f014fb0b2935c25a03e79646 |
|
12-Oct-2006 |
Dmitry V. Levin <ldv@altlinux.org> |
2006-04-21 Dmitry V. Levin <ldv@altlinux.org> * defs.h [LINUX && X86_64 && !__NR_exit_group]: Define __NR_exit_group.
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
165155a9c63b7076e60a74a44c86f8d8b308c9c4 |
|
19-Jul-2005 |
Roland McGrath <roland@redhat.com> |
2005-07-19 Roland McGrath <roland@redhat.com> * defs.h [LINUX] [M68K] (__NR_exit_group): Define it if missing. Fixes Debian#315500.
/external/strace/defs.h
|
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/defs.h
|
9814a94bd10aea81b8bcb29e2ba167b09d70cedb |
|
05-Jul-2005 |
Roland McGrath <roland@redhat.com> |
2005-07-04 Roland McGrath <roland@redhat.com> * util.c (printnum_int): New function, printnum with s/long/int/. * defs.h: Declare it. * net.c (printsockopt): Use it for int-sized option. Fixes RH#162449.
/external/strace/defs.h
|
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/defs.h
|
76989d7a16cb9683d0a75a6261f18ced66d0c04a |
|
08-Jun-2005 |
Roland McGrath <roland@redhat.com> |
2005-06-06 Roland McGrath <roland@redhat.com> * 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/defs.h
|
aa524c88c49814863cb7f19e5c8a8eeca6ce22fe |
|
01-Jun-2005 |
Roland McGrath <roland@redhat.com> |
2005-05-31 Dmitry V. Levin <ldv@altlinux.org> Deal with memory management issues. * defs.h (tprint_iov): Update prototype. * desc.c (sys_epoll_wait) [HAVE_SYS_EPOLL_H]: Do not allocate epoll_event array of arbitrary size on the stack, to avoid stack overflow. * file.c (print_xattr_val): Check for integer overflow during malloc size calculation, to avoid heap corruption. * io.c (tprint_iov) [HAVE_SYS_UIO_H]: Check for integer overflow during malloc size calculation, to avoid heap corruption. Change iovec array handling to avoid heap memory allocation. * mem.c (get_nodes) [LINUX]: Check for integer overflow during size calculation and do not allocate array of arbitrary size on the stack, to avoid stack overflow. * net.c (printcmsghdr) [HAVE_SENDMSG]: Do not allocate array of arbitrary size on the stack, to avoid stack overflow. Do not trust cmsg.cmsg_len to avoid read beyond the end of allocated object. (printmsghdr) [HAVE_SENDMSG]: Update tprint_iov() usage. * process.c (sys_setgroups): Check for integer overflow during malloc size calculation, to avoid heap corruption. Change gid_t array handling to avoid heap memory allocation. (sys_getgroups): Likewise. (sys_setgroups32) [LINUX]: Likewise. (sys_getgroups32) [LINUX]: Likewise. * stream.c (sys_poll) [HAVE_SYS_POLL_H]: Check for integer overflow during malloc size calculation, to avoid heap corruption. Change pollfd array handling to avoid heap memory allocation. * system.c (sys_sysctl) [LINUX]: Check for integer overflow during malloc size calculation, to avoid heap corruption. * util.c (dumpiov) [HAVE_SYS_UIO_H]: Check for integer overflow during malloc size calculation, to avoid heap corruption. Fixes RH#159196.
/external/strace/defs.h
|
b2dee13345a62c80a677f3342cd525d611fbc632 |
|
01-Jun-2005 |
Roland McGrath <roland@redhat.com> |
2005-05-31 Dmitry V. Levin <ldv@altlinux.org> * util.c (printxval): Change third argument from "char *" to "const char *". (printflags): Add third argument, "const char *", with similar meaning to the third argument of printxval(). * defs.h (printxval): Change third argument from "char *" to "const char *". (printflags): Add third argument. * bjm.c (sys_query_module) [LINUX]: Pass third argument to printflags(). * desc.c (sys_fcntl): Likewise. (sys_flock) [LOCK_SH]: Likewise. (print_epoll_event) [HAVE_SYS_EPOLL_H]: Likewise. * file.c (sys_open): Likewise. (solaris_open) [LINUXSPARC]: Likewise. (sys_access): Likewise. (sys_chflags, sys_fchflags) [FREEBSD]: Likewise. (realprintstat) [HAVE_LONG_LONG_OFF_T && HAVE_STRUCT_STAT_ST_FLAGS]: Likewise. (printstat64) [HAVE_STAT64 && HAVE_STRUCT_STAT_ST_FLAGS]: Likewise. (sys_setxattr, sys_fsetxattr): Likewise. * ipc.c (sys_msgget, sys_msgsnd, sys_msgrcv, sys_semget, sys_shmget, sys_shmat) [LINUX || SUNOS4 || FREEBSD]: Likewise. (sys_mq_open) [LINUX]: Likewise. (printmqattr) [HAVE_MQUEUE_H]: Likewise. * mem.c (print_mmap) [!HAVE_LONG_LONG_OFF_T]: Likewise. (sys_mmap64) [_LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T]: Likewise. (sys_mprotect): Likewise. (sys_mremap, sys_madvise, sys_mlockall) [LINUX]: Likewise. (sys_msync) [MS_ASYNC]: Likewise. (sys_mctl) [MC_SYNC]: Likewise. (sys_remap_file_pages, sys_mbind, sys_get_mempolicy) [LINUX]: Likewise. * net.c (printmsghdr) [HAVE_STRUCT_MSGHDR_MSG_CONTROL]: Likewise. (sys_send, sys_sendto): Likewise. (sys_sendmsg) [HAVE_SENDMSG]: Likewise. (sys_recv, sys_recvfrom): Likewise. (sys_recvmsg) [HAVE_SENDMSG]: Likewise. (printicmpfilter) [ICMP_FILTER]: Likewise. * proc.c (proc_ioctl) [SVR4 && !HAVE_MP_PROCFS || FREEBSD]: Likewise. * process.c (sys_clone) [LINUX]: Likewise. (printwaitn): Likewise. (sys_waitid) [SVR4 || LINUX]: Likewise. * signal.c (sys_sigvec) [SUNOS4 || FREEBSD]: Likewise. (sys_sigaction): Likewise. (printcontext) [SVR4]: Likewise. (print_stack_t) [LINUX) || FREEBSD]: Likewise. (sys_rt_sigaction) [LINUX]: Likewise. * sock.c (sock_ioctl) [LINUX]: Likewise. * stream.c (sys_putmsg, sys_getmsg): Likewise. (sys_putpmsg) [SYS_putpmsg]: Likewise. (sys_getpmsg) [SYS_getpmsg]: Likewise. (sys_poll): Likewise. (print_transport_message) [TI_BIND]: Likewise. (stream_ioctl): Likewise. * system.c (sys_mount, sys_reboot): Likewise. (sys_cacheflush) [LINUX && M68K]: Likewise. (sys_capget, sys_capset) [SYS_capget]: Likewise. * term.c (term_ioctl) [TIOCMGET]: Likewise. * time.c (sys_clock_nanosleep, sys_timer_settime) [LINUX]: Likewise. Fixes RH#159310.
/external/strace/defs.h
|
15dca8e307086cb2a53045046fe4791dc7afe378 |
|
06-Feb-2005 |
Roland McGrath <roland@redhat.com> |
2004-12-19 Dmitry V. Levin <ldv@altlinux.org> * strace.c (main) [!USE_PROCFS]: In child process, raise SIGSTOP right before execv() call. Remove fake_execve() call. * defs.h (fake_execve): Remove unused declaration. * process.c (fake_execve): Remove unused function. Fixes RH#143365.
/external/strace/defs.h
|
795edb11488dd47c4598e2228e3b5431de7ed46d |
|
02-Feb-2005 |
Roland McGrath <roland@redhat.com> |
2004-12-20 Dmitry V. Levin <ldv@altlinux.org> * configure.ac: Use AC_GNU_SOURCE macro instead of changing CFLAGS. * defs.h [HAVE_CONFIG_H]: Include config.h first. * strace.c: Include "defs.h" first. Fixes RH#143370.
/external/strace/defs.h
|
d83c50b8e44db2a2e19d048ab7d1e1caf1fa1996 |
|
07-Oct-2004 |
Roland McGrath <roland@redhat.com> |
2004-09-13 Ulrich Drepper <drepper@redhat.com>, Dmitry V. Levin <ldv@altlinux.org> * time.c [LINUX] (print_rtc): New function, for printing rtc_time structure. [LINUX] (rtc_ioctl): New function, for parsing RTC_* ioctls. * ioctl.c [LINUX] (ioctl_decode): Call rtc_ioctl. * defs.h [LINUX]: Declare rtc_ioctl. Fixes RH#58606.
/external/strace/defs.h
|
51d1ebc33a514719ed4fc3a18b70cc9967e752d3 |
|
07-Sep-2004 |
Michal Ludvig <mludvig@suse.cz> |
2004-09-07 Michal Ludvig <mludvig@suse.cz> * defs.h (nioctlents1, nsignals2): Fix typos in decls.
/external/strace/defs.h
|
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/defs.h
|
d9f816f60457930af27349fac3d23b3b78338036 |
|
04-Sep-2004 |
Roland McGrath <roland@redhat.com> |
2004-09-03 Roland McGrath <roland@redhat.com> * util.c (xlookup, printxval, addflags, printflags): Use const for struct xlat * argument. * defs.h (xlookup, printxval, addflags, printflags): Update decls. * bjm.c: Add const to all struct xlat defns. * desc.c: Likewise. * file.c: Likewise. * ipc.c: Likewise. * mem.c: Likewise. * net.c: Likewise. * proc.c: Likewise. * process.c: Likewise. * resource.c: Likewise. * signal.c: Likewise. * sock.c: Likewise. * stream.c: Likewise. * system.c: Likewise. * term.c: Likewise. * time.c: Likewise. * util.c: Likewise.
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
7b54a7ae61d0eda798575f77d898a24dda7a0952 |
|
04-Jun-2004 |
Roland McGrath <roland@redhat.com> |
2004-06-03 Roland McGrath <roland@redhat.com> * strace.c (main) [LINUX]: Expand TCBTAB as necessary for threads attached. Attach threads only under -f. Set TCB_FOLLOWFORK in them. (expand_tcbtab): New function, broken out of ... * process.c (fork_tcb): ... here, call that. * defs.h: Declare expand_tcbtab.
/external/strace/defs.h
|
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/defs.h
|
2843a4e1d2fca851be6e47e7ff2413b45903ac9a |
|
14-Nov-2003 |
Roland McGrath <roland@redhat.com> |
2003-09-06 Dmitry V. Levin <ldv@altlinux.org> * defs.h (ioctl_lookup): Prototype change. * ioctl.c (ioctl_next_match): New function. * defs.h: Declare it. * io.c (sys_ioctl): Use it, to display all possible ioctl names when there's more than one match. * ioctl.c (ioctl_lookup): Likewise. * stream.c (internal_stream_ioctl): Likewise. Patch from Solar Designer <solar@openwall.com>.
/external/strace/defs.h
|
6bc1220fe3f10e16919f182ad394c35619fe2e7f |
|
13-Nov-2003 |
Roland McGrath <roland@redhat.com> |
2003-09-06 Dmitry V. Levin <ldv@altlinux.org> * util.c (printuid): New function. * defs.h: Declare it. * file.c (sys_chown): Use it. * file.c (sys_fchown): Likewise. * process.c (sys_setreuid, sys_setregid, sys_setresuid, sys_setresgid): Likewise.
/external/strace/defs.h
|
c0f8bbda62139da801bb761d8c66724e12638087 |
|
21-Aug-2003 |
Roland McGrath <roland@redhat.com> |
2003-07-28 Daniel Jacobowitz <drow@mvista.com> * defs.h (ALIGN64): Define for MIPS. * io.c (PREAD_OFFSET_ARG): Define. (sys_pread, sys_pwrite): Use it. * process.c (struct_user_offsets) [SH]: Check whether REG_XDREG0 is defined. * linux/sh/syscallent.h (pread, pwrite): Take six arguments. (truncate64, ftruncate64): Pretty-print. * linux/mips/syscallent.h (pread, pwrite): Take six arguments. (truncate64, ftruncate64): Take four arguments.
/external/strace/defs.h
|
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/defs.h
|
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/defs.h
|
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/defs.h
|
0962345a5775e0eea75c3ec408fb4807e851e7f0 |
|
23-May-2003 |
Roland McGrath <roland@redhat.com> |
2003-05-22 Roland McGrath <roland@redhat.com> * defs.h (struct tcb): New member `nzombies'. * strace.c (alloctcb): Initialize it. (droptcb): Increment our parent's zombie count. * process.c (internal_wait): Don't go into TCB_SUSPENDED if the process has zombies it can reap. On the way out, if we reaped an untraced process, decrement the zombie count.
/external/strace/defs.h
|
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/defs.h
|
e6d3a2957c2bae7bde8ecd638892adc89aac1346 |
|
14-Jan-2003 |
Roland McGrath <roland@redhat.com> |
2003-01-14 Roland McGrath <roland@redhat.com> * defs.h (ALIGN64): Fix defn for PPC, same as FreeBSD one. * defs.h [_LARGEFILE64_SOURCE] (_LFS64_LARGEFILE): Define it. * linux/syscallent.h: Use sys_getdents64, sys_truncate64, sys_ftruncate64, instead of printargs, for those syscalls.
/external/strace/defs.h
|
f5c450d3c5353a74b0370b27594c70d3ad74ef47 |
|
14-Jan-2003 |
Roland McGrath <roland@redhat.com> |
2003-01-13 Roland McGrath <roland@redhat.com> * defs.h [POWERPC] (UESP, EIP, EAX, ORIG_EAX): Remove this cruft. [LINUX && POWERPC && !__powerpc64__] (ALIGN64): New macro. * io.c (sys_pread, sys_pwrite): Use ALIGN64. From Anton Blanchard <anton@samba.org>.
/external/strace/defs.h
|
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/defs.h
|
63d0146e83740af65b49b301772084c53c7d4598 |
|
30-Dec-2002 |
Roland McGrath <roland@redhat.com> |
2002-12-26 Roland McGrath <roland@redhat.com> * defs.h [LINUX && MIPS] (MAX_QUALS): Set to 5000, not 4999. From Daniel Jacobowitz <drow@false.org>.
/external/strace/defs.h
|
ee9d435275fd7abf736992f84b5053ee16ec4fc7 |
|
18-Dec-2002 |
Roland McGrath <roland@redhat.com> |
2002-12-17 Roland McGrath <roland@redhat.com> * strace.c (tcbtab): Make this a pointer to pointers, not an array. (tcbtabsize): New variable. (main): Initialize them using dynamic allocation. (alloctcb, main): Use tcbtabsize in place of MAX_PROCS; indirect. (pid2tcb, cleanup): Likewise. [USE_PROCFS] (pollv): Make this a pointer, not an array; make static. (rebuild_pollv): Dynamically allocate the vector. * defs.h (tcbtab): Update decls. (MAX_PROCS): Macro removed, no more static limit on this. * process.c (fork_tcb): New function. (internal_clone, internal_fork): Use it instead of checking nprocs.
/external/strace/defs.h
|
17f8fb3484e94976882f65b7a3aaffc6f24cd75d |
|
06-Nov-2002 |
Michal Ludvig <mludvig@suse.cz> |
Added switch for printing only succeeding syscalls.
/external/strace/defs.h
|
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/defs.h
|
38ae88d332acd9f86a30d58158e306d795d98977 |
|
23-May-2002 |
John Hughes <john@Calva.COM> |
Improve tracing of timod ioctls
/external/strace/defs.h
|
ccef63782c10d9ce9da77ef7530861a3d14b1300 |
|
01-May-2002 |
Wichert Akkerman <wichert@deephackmode.org> |
Merge patch from Greg Banks for Linux/SuperH support
/external/strace/defs.h
|
7ab47b63e3d58dfbe32ba909b222c1bc2a88c5c0 |
|
31-Mar-2002 |
Wichert Akkerman <wichert@deephackmode.org> |
Fix signed/unsigned problems
/external/strace/defs.h
|
5826589d8e210c2d34c8ce496d5b7a0f54188ef0 |
|
18-Oct-2001 |
John Hughes <john@Calva.COM> |
Merge SVR4/Linux printsiginfo
/external/strace/defs.h
|
7b3346be42d6a1f539e95d385ee498f8b3c529f8 |
|
10-Oct-2001 |
Wichert Akkerman <wichert@deephackmode.org> |
Import lots of ia64 related changes from David Mosberger
/external/strace/defs.h
|
1d08dcf46dd4b2cfe3e27723c05b0aec9955c591 |
|
10-Jul-2001 |
John Hughes <john@Calva.COM> |
Merge iov fixes from Richard Kettlewell
/external/strace/defs.h
|
b8a85a49ae738655cec81bd9e7bcb0bd6f5c9442 |
|
28-Mar-2001 |
John Hughes <john@Calva.COM> |
Check for endianness of long long
/external/strace/defs.h
|
c1652e2095fcd9ac62cf2669ef6aec5fd0052851 |
|
27-Mar-2001 |
Wichert Akkerman <wichert@deephackmode.org> |
Add Linux/hppa port, patch from Richard Hirst
/external/strace/defs.h
|
0c79e01d74a05476f90eb4815882181fecabe3f5 |
|
08-Mar-2001 |
John Hughes <john@Calva.COM> |
replace wimpy get64 by powerful LONG_LONG :-)
/external/strace/defs.h
|
5a826b8427383232940249ca16f543178fbeeba4 |
|
07-Mar-2001 |
John Hughes <john@Calva.COM> |
Fix off_t args on FreeBSD
/external/strace/defs.h
|
bdf48f55f264a9cd2eb1b3cac8f1f87c1acad008 |
|
06-Mar-2001 |
John Hughes <john@Calva.COM> |
Merge Harald B�hme's solaris patches
/external/strace/defs.h
|
252997128dcb73565fc95d6a22b60079c11005c6 |
|
06-Mar-2001 |
John Hughes <john@Calva.COM> |
Use pr_syscall on UW
/external/strace/defs.h
|
8c7122c9519dfd46ea7c8c026eab6f7aed74cf21 |
|
16-Feb-2001 |
Wichert Akkerman <wichert@deephackmode.org> |
Test for netinet/tcp.h and udp.h and use those
/external/strace/defs.h
|
2e4ffe59b588159eb80e236f068278ba47735932 |
|
04-Sep-2000 |
Wichert Akkerman <wichert@deephackmode.org> |
more FreeBSD updates
/external/strace/defs.h
|
bf79f2e16b090ffe59cd1e1820935680a2da7b78 |
|
01-Sep-2000 |
Wichert Akkerman <wichert@deephackmode.org> |
Add FreeBSD support
/external/strace/defs.h
|
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/defs.h
|
43a7482edbc7142b91e95d7aedeb9d121fc4880f |
|
27-Jun-2000 |
Wichert Akkerman <wichert@deephackmode.org> |
Merge changes from Ulrich
/external/strace/defs.h
|
5ae21ead9f83597452f9a0517e8a51fa4823f921 |
|
01-May-2000 |
Wichert Akkerman <wichert@deephackmode.org> |
The `too much stuff, just check the ChangeLog' update
/external/strace/defs.h
|
fd89ced0fcea2bce54d477fa528375c2c75e4b3d |
|
13-Apr-2000 |
Wichert Akkerman <wichert@deephackmode.org> |
Linux/MIPS uses syscalls up to >4k, so set MAX_QUALS to 4999
/external/strace/defs.h
|
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/defs.h
|
8b1b40cd8b49151374d0ac2a5b1a4b459f9e0ae5 |
|
03-Feb-2000 |
Wichert Akkerman <wichert@deephackmode.org> |
Merge Trillian patches (Linux ia64)
/external/strace/defs.h
|
7a0b649aeace5c1e1efe4a1d7b1ae6e3a87e0d44 |
|
23-Dec-1999 |
Wichert Akkerman <wichert@deephackmode.org> |
Begin work on supporting clone
/external/strace/defs.h
|
ea78f0f77185f7d6d0b2055805139d96e1be816c |
|
29-Nov-1999 |
Wichert Akkerman <wichert@deephackmode.org> |
Add UnixWare support to configure
/external/strace/defs.h
|
221f54f721a2f74e629bb70e34888205f68e95cc |
|
18-Nov-1999 |
Wichert Akkerman <wichert@deephackmode.org> |
Now it builds on alpha again...
/external/strace/defs.h
|
f5eeabb156641482abd504fb98b039e1aae4ae87 |
|
18-Nov-1999 |
Wichert Akkerman <wichert@deephackmode.org> |
Start merging linux-ip-routing fork
/external/strace/defs.h
|
f90da01fd19a7779d6ed9ad66605367ae43bb2fd |
|
31-Oct-1999 |
Wichert Akkerman <wichert@deephackmode.org> |
Add Linux MIPS support
/external/strace/defs.h
|
9ce1a63eb20b069607c06f9645ac5a17b418a5f3 |
|
30-Aug-1999 |
Wichert Akkerman <wichert@deephackmode.org> |
Catching up on my mail-backlog, see ChangeLog for details
/external/strace/defs.h
|
b859bea10a0945681ecc66a1aa06ae4cc5845af8 |
|
19-Apr-1999 |
Wichert Akkerman <wichert@deephackmode.org> |
Change number of personalities for Linux sparc to 2 Minor other fixes
/external/strace/defs.h
|
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/defs.h
|
76baf7c9f6dd61a15524ad43c1b690c252cf5b7c |
|
19-Feb-1999 |
Wichert Akkerman <wichert@deephackmode.org> |
Initial revision
/external/strace/defs.h
|