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 17:56:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110906 Thunderbird/7.0

On 09/07/2011 03:37 PM, Shan Shan wrote:
        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)

Thanks. If none of these options are specified, will it still be able to
unwind. I guess this is the case with my main application.

If there is insufficient unwind data available the result is undefined I guess (I wouldn't expect libunwind to crash though). On modern ARM-Linux systems you'll need either DWARF (-g) or the ARM specific unwind tables (-funwind-tables) to be able to backtrace. The latter takes less space but is not as accurate as DWARF in some corner cases (for example in case an async signal interrupted a prologue or epilogue).

Also, is there any clue on why the app crashes just with linking and no
attempts made to get backtrace?

No, not from the top of my head. It could be a symbol collision as Arun mentioned.

        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

I just tried this option and it still crashes :-(. I am yet to try the
option of having "-funwind-tables" with my main app because with this
option, my unit test app worked fine. I will update you all soon on
that. Got tied up with another issue :(

Ok, adding -funwind-tables sounds like a good plan if you want to backtrace but I'm not sure it'll fix your crashes. : )

Regards
Ken



reply via email to

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