<feed xmlns='http://www.w3.org/2005/Atom'>
<title>android_external_strace/configure.ac, branch stable/cm-12.0-YNG3C</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_strace/'/>
<entry>
<title>Add -k option to print stack trace after each syscall</title>
<updated>2014-05-30T22:24:31+00:00</updated>
<author>
<name>Luca Clementi</name>
<email>luca.clementi@gmail.com</email>
</author>
<published>2013-07-23T07:11:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_strace/commit/?id=327064b63722a4400058e0e7e9b39d9e34b14b57'/>
<id>327064b63722a4400058e0e7e9b39d9e34b14b57</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>sysctl: update CTL_*, KERN_*, NET_*, and VM_* constants</title>
<updated>2014-05-30T22:10:21+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2014-04-26T13:54:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_strace/commit/?id=6dbbe0737a76c1bae5b0995025a9b0843781a393'/>
<id>6dbbe0737a76c1bae5b0995025a9b0843781a393</id>
<content type='text'>
* configure.ac (AC_CHECK_DECLS): Add CTL_*, KERN_*, NET_*, and
VM_* constants.
* system.c (CTL_PROC, CTL_CPU): Remove definitions.
* xlat/sysctl_*.in: Update.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* configure.ac (AC_CHECK_DECLS): Add CTL_*, KERN_*, NET_*, and
VM_* constants.
* system.c (CTL_PROC, CTL_CPU): Remove definitions.
* xlat/sysctl_*.in: Update.
</pre>
</div>
</content>
</entry>
<entry>
<title>Check for constants used by waitid function</title>
<updated>2014-05-30T22:10:21+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2014-04-26T15:22:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_strace/commit/?id=d8ad1ddc76eba4ad0f70b4f52a9d222e7e6c557b'/>
<id>d8ad1ddc76eba4ad0f70b4f52a9d222e7e6c557b</id>
<content type='text'>
* configure.ac (AC_CHECK_DECLS): Add P_* constants.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* configure.ac (AC_CHECK_DECLS): Add P_* constants.
</pre>
</div>
</content>
</entry>
<entry>
<title>Check for LO_FLAGS_READ_ONLY constant</title>
<updated>2014-05-30T22:10:21+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2014-04-26T14:12:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_strace/commit/?id=baf60d92f1f5328ee1a277ef35ec3692bc10d2a0'/>
<id>baf60d92f1f5328ee1a277ef35ec3692bc10d2a0</id>
<content type='text'>
* configure.ac (AC_CHECK_DECLS): Add LO_FLAGS_READ_ONLY.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* configure.ac (AC_CHECK_DECLS): Add LO_FLAGS_READ_ONLY.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix {get,set}rlimit decoding with unreliable SIZEOF_RLIM_T</title>
<updated>2014-05-21T00:22:07+00:00</updated>
<author>
<name>James Hogan</name>
<email>james.hogan@imgtec.com</email>
</author>
<published>2014-05-02T13:15:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_strace/commit/?id=3b09ebe724b1ee233ce2314a8b70a4dfdf9d2b07'/>
<id>3b09ebe724b1ee233ce2314a8b70a4dfdf9d2b07</id>
<content type='text'>
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 &lt;james.hogan@imgtec.com&gt;
Signed-off-by: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;james.hogan@imgtec.com&gt;
Signed-off-by: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor LDT decoding</title>
<updated>2014-04-10T15:29:13+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2014-04-10T14:10:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_strace/commit/?id=99a0544f010cfaade3f42d08656285555bec60db'/>
<id>99a0544f010cfaade3f42d08656285555bec60db</id>
<content type='text'>
* configure.ac (AC_CHECK_TYPES): Remove struct user_desc.
* ldt.c: New file.
* Makefile.am (strace_SOURCES): Add ldt.c.
* mem.c: Do not include &lt;asm/ldt.h&gt;.
(print_ldt_entry): Remove.
(sys_modify_ldt, sys_set_thread_area, sys_get_thread_area): Move...
* ldt.c: ... here.
* process.c: Do not include &lt;asm/ldt.h&gt;.
(sys_clone) [I386 || X86_64 || X32]: Use print_user_desc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* configure.ac (AC_CHECK_TYPES): Remove struct user_desc.
* ldt.c: New file.
* Makefile.am (strace_SOURCES): Add ldt.c.
* mem.c: Do not include &lt;asm/ldt.h&gt;.
(print_ldt_entry): Remove.
(sys_modify_ldt, sys_set_thread_area, sys_get_thread_area): Move...
* ldt.c: ... here.
* process.c: Do not include &lt;asm/ldt.h&gt;.
(sys_clone) [I386 || X86_64 || X32]: Use print_user_desc.
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM EABI: disable OABI support by default</title>
<updated>2014-03-20T22:21:51+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2014-03-18T23:37:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_strace/commit/?id=0160e161081c08480bb4fd63a292040c7611f6ec'/>
<id>0160e161081c08480bb4fd63a292040c7611f6ec</id>
<content type='text'>
OABI is rarely used in ARM EABI systems nowadays, so disable its support
by default.  Add --enable-arm-oabi option to enable ARM OABI support.

* configure.ac: New option --enable-arm-oabi.
* syscall.c (get_scno) [ARM]: Check ENABLE_ARM_OABI macro defined by
configure instead of undocumented STRACE_KNOWS_ONLY_EABI macro.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OABI is rarely used in ARM EABI systems nowadays, so disable its support
by default.  Add --enable-arm-oabi option to enable ARM OABI support.

* configure.ac: New option --enable-arm-oabi.
* syscall.c (get_scno) [ARM]: Check ENABLE_ARM_OABI macro defined by
configure instead of undocumented STRACE_KNOWS_ONLY_EABI macro.
</pre>
</div>
</content>
</entry>
<entry>
<title>printsiginfo: add SIGSYS decoding</title>
<updated>2014-03-11T22:18:40+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2014-03-11T22:18:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_strace/commit/?id=bc091e3ce1481615568ef6e35636fc45262250ff'/>
<id>bc091e3ce1481615568ef6e35636fc45262250ff</id>
<content type='text'>
* configure.ac (AC_CHECK_MEMBERS): Check for siginfo_t.si_syscall.
* signal.c (SYS_SECCOMP): Define if not yet defined.
(sigsys_codes): new xlat structure.
(printsiginfo): Decode SIGSYS.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* configure.ac (AC_CHECK_MEMBERS): Check for siginfo_t.si_syscall.
* signal.c (SYS_SECCOMP): Define if not yet defined.
(sigsys_codes): new xlat structure.
(printsiginfo): Decode SIGSYS.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix fcntl decoding</title>
<updated>2014-03-03T23:30:04+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2014-03-03T23:09:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_strace/commit/?id=54cabefc753cc72417bb610cb9f7873f4389e9f5'/>
<id>54cabefc753cc72417bb610cb9f7873f4389e9f5</id>
<content type='text'>
Assume that F_SETLK64, F_SETLKW64, and F_GETLK64 are either defined or
not defined altogether.
Do not assume that sizeof(off_t) &lt; sizeof(long long) when F_SETLK64 is
undefined.

This change fixes build with musl libc on x86.

* configure.ac: Define SIZEOF_OFF_T.
* desc.c (USE_PRINTFLOCK64): New macro.
(struct flock64, printflock64): Do not define on X32.
(printflock): Replace X32 specific workaround with SIZEOF_OFF_T check.
Fix printing off_t members of struct flock.
(sys_fcntl): Use USE_PRINTFLOCK64.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Assume that F_SETLK64, F_SETLKW64, and F_GETLK64 are either defined or
not defined altogether.
Do not assume that sizeof(off_t) &lt; sizeof(long long) when F_SETLK64 is
undefined.

This change fixes build with musl libc on x86.

* configure.ac: Define SIZEOF_OFF_T.
* desc.c (USE_PRINTFLOCK64): New macro.
(struct flock64, printflock64): Do not define on X32.
(printflock): Replace X32 specific workaround with SIZEOF_OFF_T check.
Fix printing off_t members of struct flock.
(sys_fcntl): Use USE_PRINTFLOCK64.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rewrite signal mask decoding without sigset_t</title>
<updated>2014-02-27T00:28:39+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2014-02-26T16:51:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_external_strace/commit/?id=38593e942ad4b16b2c3c43ea521167368771cbfb'/>
<id>38593e942ad4b16b2c3c43ea521167368771cbfb</id>
<content type='text'>
The sigset_t provided by libc is not quite convenient.
In glibc, sigset_t is an array with space for 1024 bits, which is much
more than required: all architectures supported by Linux have only 64
signals except MIPS, which has 128.
In bionic libc, LP32 sigset_t is only 4 bytes long, which is less than
necessary.

With this change, signal mask is decoded without use of intermediate
sigset_t structure, which saves us some cpu cycles in case of glibc with
its inflated sigset_t, and enables build with libcs where sigset_t is
broken.

Old implementation used to check each signal number in the given signal
mask twice using sigismember().
New implementation is based on popcount and next_set_bit() so it's
noticeably faster.

* configure.ac: Check for __builtin_popcount.
* signal.c: Ensure that NSIG &gt;= 32.
(sprintsigmask, sprintsigmask_long, printsigmask): Remove.
(popcount32, sprintsigmask_n): New functions.
(tprintsigmask_addr, sprintsigmask_val, tprintsigmask_val): New macros.
(print_sigset_addr_len, sys_sigsetmask, sys_sigreturn, sys_siggetmask,
sys_sigsuspend, sys_sigprocmask, decode_new_sigaction): Update to use
new signal mask decoding interface.
* tests/sigaction.c (main): Add a test with almost filled signal mask.
* tests/sigaction.awk: Update.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The sigset_t provided by libc is not quite convenient.
In glibc, sigset_t is an array with space for 1024 bits, which is much
more than required: all architectures supported by Linux have only 64
signals except MIPS, which has 128.
In bionic libc, LP32 sigset_t is only 4 bytes long, which is less than
necessary.

With this change, signal mask is decoded without use of intermediate
sigset_t structure, which saves us some cpu cycles in case of glibc with
its inflated sigset_t, and enables build with libcs where sigset_t is
broken.

Old implementation used to check each signal number in the given signal
mask twice using sigismember().
New implementation is based on popcount and next_set_bit() so it's
noticeably faster.

* configure.ac: Check for __builtin_popcount.
* signal.c: Ensure that NSIG &gt;= 32.
(sprintsigmask, sprintsigmask_long, printsigmask): Remove.
(popcount32, sprintsigmask_n): New functions.
(tprintsigmask_addr, sprintsigmask_val, tprintsigmask_val): New macros.
(print_sigset_addr_len, sys_sigsetmask, sys_sigreturn, sys_siggetmask,
sys_sigsuspend, sys_sigprocmask, decode_new_sigaction): Update to use
new signal mask decoding interface.
* tests/sigaction.c (main): Add a test with almost filled signal mask.
* tests/sigaction.awk: Update.
</pre>
</div>
</content>
</entry>
</feed>
