This is the mail archive of the
mailing list for the GCC project.
SV: ARM Linux EABI: unwinding through a segfault handler
- From: mads_bn <madsbn at mail dot dk>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 4 Oct 2015 01:50:47 -0700 (MST)
- Subject: SV: ARM Linux EABI: unwinding through a segfault handler
- Authentication-results: sourceware.org; auth=none
Nice work !
Some time ago I was in a project, where we would like to get more context in
syslog when e.g. SIGSEGV occurred (embedded Linux).
On x86 this was working fine, and I hope a change like this for ARM will
allow it to work here as well (as long as stack is still valid).
I don't have access to such an ARM setup currently.
Can somebody try if e.g. backtrace_symbols () will show where the offending
code was called from?
Also I really like the idea to get this back into the mainstream version, so
we all will benefit from it in future ;-)
Fra: Matthijs van Duin [via gcc]
Sendt: 3. oktober 2015 22:42
Til: mads_bn <email@example.com>
Emne: Re: ARM Linux EABI: unwinding through a segfault handler
A shiny revised version of my unwind-through-signal code for ARM EABI:
For actual unwinding it now uses sigreturn as a cleanup handler (after
diddling the ucontext to make it land right onto a call to
_Unwind_Resume), which means that all state should get properly
restored by the kernel.
Virtual unwinding still only restores core registers, but hopefully
that isn't too big a problem in practice.
A small test is included that confirms throwing exceptions out of
SEGV, checks VFP is restored properly, and that returning normally
from an async signal handler still works (my original patch accidently
I'd finally like to take a moment to say this was hell to figure
out.... this shit is really documented nowhere properly since it
appears to be a magic blend of ARM EABI and IA64 C++ ABI (meaning
neither documentation quite applies) and I had to plow through the
innards of libgcc and libsupc++ to figure out how things *actually*
Anyhow, it only took four years, but you can now throw
NullPointerExceptions on ARM. Enjoy. ;-)
Matthijs van Duin
If you reply to this email, your message will be added to the discussion
To unsubscribe from ARM Linux EABI: unwinding through a segfault handler,
View this message in context: http://gcc.1065356.n5.nabble.com/SV-ARM-Linux-EABI-unwinding-through-a-segfault-handler-tp1191260.html
Sent from the gcc - Dev mailing list archive at Nabble.com.