libunwind-devel
[Top][All Lists]
Advanced

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

[Libunwind-devel] Re: [PATCH 0/4] ARM enhancements


From: Henrik Grindal Bakken
Subject: [Libunwind-devel] Re: [PATCH 0/4] ARM enhancements
Date: Fri, 18 Mar 2011 11:35:56 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Ken Werner <address@hidden>
writes:

> Hi,
>
> These patches improve the libunwind support on ARM Linux. The first
> patch implements the unw_is_signal_frame function to enable signal
> frame detection. The second patch implements support for parsing the
> .ARM.exidx and .ARM.extab sections. These sections contain the
> unwind information as specified by the 'Exception Handling ABI for
> the ARM Architecture' document. The third patch adds
> UNW_ARM_METHOD_EXIDX as a new unwind method that uses the
> ARM-specific tables. The fourth patch implements a small unit test
> that uses the new libunwind internals directly - it may be dropped.

Hi, Ken,

We're using libunwind for providing stacktraces on crashes on a
product running on ARMs (TI DaVinci).  Previously, I've been having
problems with libunwind segfaulting if I don't have debugging symbols,
but these patches look very promising indeed.  I can't really get it
working, though.  It appears to not walk the stack at all, but always
find the same frame.

Here's my output:
[hgbsnoopy:/tmp] $ UNW_ARM_UNWIND_METHOD=4 UNW_DEBUG_LEVEL=1111 
LD_LIBRARY_PATH=/tmp ./backtrace 
Signal handlers done
bar(0)
foo(1)
 >_Uarm_init_local: (cursor=0xbe9819e0)
                >access_reg: reg = pc
            >access_reg: pc -> 891c
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
                >access_reg: reg = sp
            >access_reg: sp -> be9816e0
 >_Uarm_step: (cursor=0xbe9819e0)
Backtrace:
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
./backtrace() [0x891c]
End of backtrace:

The program in question is attached.

It was compiled like this:
arm-unknown-linux-gnueabi-gcc -o /tmp/backtrace /tmp/backtrace.c 
-funwind-tables -lunwind -lunwind-arm -rdynamic -g1 -fomit-frame-pointer 
-fasynchronous-unwind-tables -mapcs

(With appropriate -L and -I paths to find my cross-compiled
libunwind.)

It's gcc-4.5.1 with glibc-2.12.1, built for arm-dm6467.

Any ideas on how to attack this?

Attachment: backtrace.c
Description: Backtrace example code


-- 
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]