backtrace() depth
I've a question about the depth of a backtrace.
I've configured uClibc/Buildroot to build libubacktrace-0.9.33.2.so via the standard Buildroot menuconfigs:
Buildroot 2013.02, GCC 4.7.2 by Buildroot, uClibc-0.9.33
When I call backtrace() on a segfault, I only see the function where the segfault is produced, and not much more (only /lib/libc.so.0, and two more addresses). The function name could be demanded correctly, so I assume the compiler flags are ok (-rdynamic).
The segfault is not in the main thread (overall 4 threads, /lib/libpthread-0.9.33.2.so) And the bt looks equal for debug and release builds.
A build with crosstool-ng and eglibc produces the same bad backtrace.
Is there a way to get a more complete backtrace?
Many thanks,
Peter
Peter,
2013/9/10 Peter K?mmel <[email protected]>
Quoted 11 lines
I've a question about the depth of a backtrace.
I've configured uClibc/Buildroot to build libubacktrace-0.9.33.2.so via the standard Buildroot menuconfigs:
Buildroot 2013.02, GCC 4.7.2 by Buildroot, uClibc-0.9.33When I call
backtrace()on a segfault, I only see the function where the segfault is produced, and not much more (only/lib/libc.so.0, and two more addresses). The function name could be demanded correctly, so I assume the compiler flags are ok (-rdynamic).
Quoted 8 lines
The segfault is not in the main thread (overall 4 threads,
/lib/libpthread-0.9.33.2.so) And the bt looks equal for debug and release builds.A build with crosstool-ng and eglibc produces the same bad backtrace.
Is there a way to get a more complete backtrace?
Is the strip command set to none (under the "Build options" menu)? if not, then you should certainly added the binaries you are debgging to the BR2_STRIP_EXCLUDE_FILES or BR2_STRIP_EXCLUDE_DIRS lists.
Regards,
Signature · 4 lines
Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130910/22183164/attachment.html>
Quoted 4 lines
Is the strip command set to none (under the "Build options" menu)? if not, then you should certainly added the binaries you are debgging to the
BR2_STRIP_EXCLUDE_FILESorBR2_STRIP_EXCLUDE_DIRSlists.
Hi Samuel,
I even selected sstrip for the compiler and rootfs, but the the application itself is not stripped, it's not build by buildroot.
Does the bt stop at the first stripped lib it reaches?
Peter