libunwind-devel
[Top][All Lists]
Advanced

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

Re: [Libunwind-devel] libunwind with LD_PRELOAD option


From: Ken Werner
Subject: Re: [Libunwind-devel] libunwind with LD_PRELOAD option
Date: Wed, 07 Sep 2011 14:00:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110906 Thunderbird/7.0

On 09/07/2011 10:32 AM, Ken Werner wrote:
On 09/06/2011 08:33 PM, Shan Shan wrote:

for a simple

> application compiled with default gcc options.

Those are ARM specific unwind mechanisms. On x64, we just use dwarf +
.eh_frame. Ken seems to have a wiki on some of these topics:

https://wiki.linaro.org/KenWerner/Sandbox/libunwind


Thanks. Yes, i looked at that and then only got to this stage.
However, when i checked it again, in the presentation slides Ken
compiles his app with -funwind-tables option.

I had a unit test program which still uses the C++ framework used by
main App. I quickly changed it to add this option for all the libraries
it builds.

It works fine and even unwinds stack properly :-). This unit test app
was crashing before even when i just link with -lunwind. Is this
something specific to "-funwind-tables" option? Do all app needs to be
compiled with this option? or may be out of the 4 options tried by
libunwind (arm) only this option is stable?

Hi,

Sorry for being late. My laptop died on Monday morning and I'm in the
middle of setting up a new one.

Libunwind on ARM can unwind the stack via:
1) DWARF information (-g)
2) ARM specific unwind tables (-f-unwind-tables)
3) APCS frame parsing (-mapcs-frame)
By default libunwind looks at the DWARF info first because it's more
accurate and if that fails libunwind will use the ARM specific unwind
tables. In case everything fails it falls back on APCS frame parsing.
Since modern ARM-Linux systems are using the ARM EABI rather than the
APCS this code won't help there. But from looking at the sources I could
imagine that the APCS parsing could cause crashes (just a wild guess).
Could you try running with the environment variable UNW_ARM_METHOD_DWARF
set to "5" and check if it still crashes?

Sorry, I meant:
UNW_ARM_UNWIND_METHOD=5

Regards
Ken



reply via email to

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