libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] Re: Backtrace from signal handler on arm from threads


From: Henrik Grindal Bakken
Subject: [Libunwind-devel] Re: Backtrace from signal handler on arm from threads
Date: Wed, 02 Feb 2011 10:19:03 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Paul Pluzhnikov <address@hidden>
writes:

>> Does anyone have any ideas?
>
> Run your program under gdb. When GDB stops with the intentional
> SIGSEGV or SIGABRT, do "sig SIGSEGV" or "sig SIGABRT", which should
> continue the program into the sigal handler, into obtain_backtrace
> and into libunwind, and then GDB should stop with another crash. At
> that point you'll know where this is crashing, and perhaps why. Use
> the usual debugging techniques if the reason for the crash is not
> obvious.

Thanks for the tip.  Doing this, the program immediately
SIGSEGV/SIGABRTs in __errno_location.

(gdb) run
Starting program: /tmp/backtrace 
warning: Unable to find libthread_db matching inferior's thread
library, thread debugging will not be available.
warning: the debug information found in "/lib/libc-2.12.1.so.debug"
does not match "/lib/libc.so.6" (CRC mismatch).

warning: Unable to find libthread_db matching inferior's thread
library, thread debugging will not be available.

         I'm a bit confused about those messages.  I'm sure it's a bad
         thing, but I don't really understand why it's there.  The
         .so.debug file is made with the relevant objcopy utility
         using --only-keep-debug from the libc-2.12.1.so file, which
         is then stripped (--strip-unneeded), and with objcopy
         --add-gnu-debuglink.

         libthread_db is on target, so I don't really understand why
         gdb doesn't like it.

(gdb) sig SIGABRT
Continuing with signal SIGABRT.
Received signal SIGABRT (6) in thread 0x00031460, TID 1933
Registers:
R0:     00000007 R1:   00000000 R2:    00000001 R3:   00000008
R4:     0000078d R5:   00000001 R6:    00031674 R7:   00000000
R8:     00000000 R9:   bef26a98 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.
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

    [and it goes on forever]


Has anyone else had any luck using libunwind with multithreaded arm
applications?


-- 
Henrik Grindal Bakken <address@hidden>
PGP ID: 8D436E52
Fingerprint: 131D 9590 F0CF 47EF 7963  02AF 9236 D25A 8D43 6E52




reply via email to

[Prev in Thread] Current Thread [Next in Thread]