[Top][All Lists]

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

Re: [Libunwind-devel] unwinding from signal handler (ARM)

From: Sven Neumann
Subject: Re: [Libunwind-devel] unwinding from signal handler (ARM)
Date: Mon, 22 Aug 2011 11:41:57 +0200


On Fri, 2011-08-19 at 17:24 +0200, Ken Werner wrote:

> Attached is a simple testcase that works on my PandaBoard. How does it 
> look on your system? The output should look like this:
>    standard frame     ip:     0x8988, sp: 0xbeffadd0   sig_handler
>    signal frame       ip: 0x40113740, sp: 0xbefff2f0   
> __default_rt_sa_restorer_v2
>    standard frame     ip:     0x8c4e, sp: 0xbefff660   main
>    standard frame     ip: 0x40104623, sp: 0xbefff668   __libc_start_main
>    standard frame     ip:     0x88b7, sp: 0xbefff7a8   _start

The test-case works for me as well and it seems that the compiler flags
are what make it work. We used to use the --enable-debug-frames option
with libunwind and compiled our software stack with "-g1" in order to
get executables with debug frames. We did not use -funwind-tables
though. As far as I understand libunwind did not support those on the
ARM platform back then.

So with -funwind-tables your test-case results in this output:

standard frame  ip:     0x89d4, sp: 0xbed59308   sig_handler
signal frame    ip: 0x400fb5fc, sp: 0xbed5d7a0   __default_rt_sa_restorer
standard frame  ip:     0x8990, sp: 0xbed5db10   main
standard frame  ip: 0x401352f4, sp: 0xbed5db88   __uClibc_main

And without it, it isn't able to unwind:

standard frame  ip:     0x88e8, sp: 0xbed18308   sig_handler

This provides a solution for us on the ARM platform. Now we also have an
x86 device, an AMD Geode to be more precise. It would be nice if the
same code worked on this platform as well. But it appears to crash:

# ./main 
standard frame  ip:  0x80488f3, sp: 0xbfbcea00   sig_handler
Segmentation fault

I will try to find some time to debug this further...


reply via email to

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