[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libunwind-devel] Stack not completely resolved
From: |
Eugen-Andrei Gavriloaie |
Subject: |
Re: [Libunwind-devel] Stack not completely resolved |
Date: |
Fri, 25 Apr 2014 21:24:56 +0300 |
I’ve ended up implementing my own stack unwinder based on the SP register which
is delivered via signal handler.
Here is the info I have used:
http://www.sivachandran.in/2006/12/backtracing-from-code-in-arm.html
And I’ve hit the same problem: couldn’t get past the signal handler. Than I
have searched all over the places and found a piece of information about
CONF_ARM_UNWIND kernel option. I have activated that and everything worked like
a charm! No debug symbols needed anywhere.
For the entire thing to work, I had to add -fno-omit-frame-pointer to both libc
and my apps.
Everything works as expected, I have a <1KB text file with the stack trace if
things are going haywire in production.
I guess that putting that option on kernel and -fno-omit-frame-pointer on apps
will make libunwind perform as expected as well
Best regards,
Andrei
On Apr 25, 2014, at 5:59, Arun Sharma <address@hidden> wrote:
> On Thu, Apr 24, 2014 at 10:28 AM, Eugen-Andrei Gavriloaie
> <address@hidden> wrote:
>
>>
>> What needs to be done to get past libc and further into the stack?
>>
>
> I'm not familiar with your platform, but in general, you could compile
> with --enable-debug and run with UNW_DEBUG_LEVEL=n to get additional
> info.
> Things to check: objdump the libc to make sure that it has the unwind
> info (.eh_frame section or .debug_info). Sometimes the debug info is
> packaged separately.
>
> -Arun