[RFC] print stack trace after each syscall

Mike Frysinger vapier at gentoo.org
Mon Jun 24 15:42:40 UTC 2013


On Monday 24 June 2013 03:18:58 Luca Clementi wrote:
> --- a/configure.ac
> +++ b/configure.ac
> 
> +dnl  libunwind tests
> +AC_CHECK_HEADERS([libunwind-ptrace.h libunwind.h])

add a proper --with/--enable flag for this.  the default should be to 
autodetect the headers and not fail if support isn't found.

> +if test "x$ac_cv_header_libunwind_ptrace_h" == "xyes" &&
> +	test "x$ac_cv_header_libunwind_h" == "xyes"; then :

"==" is not POSIX shell.  use "=" instead.  that trailing ":" is pointless

> +	AC_CHECK_LIB([unwind], [backtrace],[],[
> +		AC_MSG_FAILURE([Unable to find libunwind])
> +		])
> +        AC_CHECK_LIB([unwind-$arch], [_U${arch}_create_addr_space],[], [
> +	                      AC_MSG_FAILURE([Unable to find libunwind-$arch])
> +	])

is the $arch stuff really necessary ?  isn't linking to -lunwind sufficient ?

> --- a/defs.h
> +++ b/defs.h
> 
> +struct mmap_cache_t {
> +	// example entry:
> +	// 7fabbb09b000-7fabbb09f000 r--p 00179000 fc:00 1180246
> /lib/libc-2.11.1.so

we use /* comments */ rather than // comments
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20130624/e53d6298/attachment.bin>


More information about the Strace-devel mailing list