Arun Sharma <[email protected]> writes: > On Wed, Feb 2, 2011 at 1:19 AM, Henrik Grindal Bakken <[email protected]> wrote: >> Program received signal SIGSEGV, Segmentation fault. >> 0x4026da98 in __errno_location () from /lib/libc.so.6 >> >> (gdb) bt >> #0 0x4026da98 in __errno_location () from /lib/libc.so.6 >> #1 0x40294d0c in vfprintf () from /lib/libc.so.6 >> #2 0x40299284 in ?? () from /lib/libc.so.6 >> #3 0x40299284 in ?? () from /lib/libc.so.6 > > gdb is not able to unwind probably for the same reason why libunwind > is not able to. Where did this libc.so.6 come from? You might have to > use readelf -wf to figure out if there is missing unwind info around > 0x40299284.
The libc is from my cross-compiled toolchain (built using crosstool-ng). I'm not all that experienced in interpreting readelf output, I'm afraid. <URL:http://folk.uio.no/hgb/readelf.output.gz> is the output of readelf on the libc-2.12.1.so (aka libc.so.6). Actually, a second attempt now, I had the following results: [hgbsnoopy:~] $ gdb backtrace GNU gdb (GDB) 7.1 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-unknown-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /tools/backtrace...Reading symbols from /tools/backtrace.debug...done. done. (gdb) run Starting program: /tools/backtrace warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. Thread dummytask has TID 26713 foo: 1 zot: 2 bar: 2 foo: 3 zot: 4 bar: 4 foo: 5 zot: 6 bar: 6 foo: 7 zot: 8 bar: 8 Thread dummytask has TID 26712 [New LWP 26713] Program received signal SIGSEGV, Segmentation fault. [Switching to LWP 26713] 0x0000b540 in bar (i=8) at product/backtrace/cfg/bar.c:10 10 product/backtrace/cfg/bar.c: No such file or directory. in product/backtrace/cfg/bar.c (gdb) sig SIGSEGV Continuing with signal SIGSEGV. Received signal SIGSEGV (11) in thread 0x00031460, TID 26713 Illegal memory access at: 0x8 Registers: R0: 00000007 R1: 00000000 R2: 00000001 R3: 00000008 R4: 00006859 R5: 00000001 R6: 00031674 R7: 00000000 R8: 00000000 R9: befe7a98 R10: 00000001 FP: 00030bec PC: 0000b540 IP: 00030638 SP: 00030bd0 LR: 402467e4 ERR: 00000817 CPSR: 20000010 FAULT: 00000008 TRAP: 0000000e OLDMSK: 00000000 Program received signal SIGSEGV, Segmentation fault. 0x4028392c in __sigprocmask (how=2, set=0x400a35a4, oset=0x357d0) at ../sysdeps/unix/sysv/linux/sigprocmask.c:42 42 ../sysdeps/unix/sysv/linux/sigprocmask.c: No such file or directory. in ../sysdeps/unix/sysv/linux/sigprocmask.c (gdb) bt #0 0x4028392c in __sigprocmask (how=2, set=0x400a35a4, oset=0x357d0) at ../sysdeps/unix/sysv/linux/sigprocmask.c:42 #1 0x4006e7ac in ?? () from /extra/lib/libunwind-arm.so.7 #2 0x4006f248 in ?? () from /extra/lib/libunwind-arm.so.7 #3 0x40072a60 in _Uarm_step () from /extra/lib/libunwind-arm.so.7 #4 0x0000bdec in obtain_backtrace (dest=0x39bf4, destsize=32, context=0x39d10) at platform/backtrace/libunwind/obtain_backtrace.c:31 #5 0x0000ba64 in sig_handler_bt_exit (sig=11, psi=0x39c90, ctxarg=0x39d10) at platform/signal_handler/linux/signal_handler.c:333 #6 <signal handler called> #7 0x0000b540 in bar (i=8) at product/backtrace/cfg/bar.c:10 #8 0x0000b470 in zot (i=8) at product/backtrace/cfg/foo.c:7 #9 0x0000b4d8 in foo (i=8) at product/backtrace/cfg/foo.c:13 #10 0x0000b558 in bar (i=7) at product/backtrace/cfg/bar.c:11 #11 0x0000b470 in zot (i=6) at product/backtrace/cfg/foo.c:7 #12 0x0000b4d8 in foo (i=6) at product/backtrace/cfg/foo.c:13 #13 0x0000b558 in bar (i=5) at product/backtrace/cfg/bar.c:11 #14 0x0000b470 in zot (i=4) at product/backtrace/cfg/foo.c:7 #15 0x0000b4d8 in foo (i=4) at product/backtrace/cfg/foo.c:13 #16 0x0000b558 in bar (i=3) at product/backtrace/cfg/bar.c:11 #17 0x0000b470 in zot (i=2) at product/backtrace/cfg/foo.c:7 #18 0x0000b4d8 in foo (i=2) at product/backtrace/cfg/foo.c:13 #19 0x0000b2a0 in t (arg=0x0) at product/backtrace/cfg/main.c:102 ---Type <return> to continue, or q <return> to quit--- #20 0x0000cd1c in pthread_wrapper (varg=0x1e478) at platform/ttos/linux/task.c:275 #21 0x4023dc4c in ?? () from /lib/libpthread.so.0 #22 0x4023dc4c in ?? () from /lib/libpthread.so.0 #23 0x4023dc4c in ?? () from /lib/libpthread.so.0 >> Has anyone else had any luck using libunwind with multithreaded arm >> applications? > > Works just fine on x86. Yes, that's my experience too. But not on arm. -- Henrik Grindal Bakken <[email protected]> PGP ID: 8D436E52 Fingerprint: 131D 9590 F0CF 47EF 7963 02AF 9236 D25A 8D43 6E52 _______________________________________________ Libunwind-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/libunwind-devel
