Message ID | 20120730151840.0bf5eb81@octopus |
---|---|
State | New |
Headers | show |
On 07/30/2012 03:18 PM, Julian Brown wrote: > There are two issues in play here: > > 1. Exception-handling is handled in a target-specific way for ARM, > defined in the EHABI document ("Exception handling ABI for the ARM > architecture", IHI 0038A). However, no mention of "forced unwinding" is > made in this document. > > 2. Backtracing in particular isn't even the "normal" use case for > forced unwinding: e.g., > > http://www.ucw.cz/~hubicka/papers/abi/node25.html#SECTION00923200000000000000 > > suggests that forced unwinding is "a single-phase process (phase 2 of > the normal exception-handling process)", whereas for producing a > backtrace, something more like a phase 1 lookup is done (no cleanup > handlers are called -- we're merely observing the state of the stack). That's right. I wrote that code. I think I didn't realize that forced unwinding was a single-phase process. It looks to me like checking for _US_VIRTUAL_UNWIND_FRAME and _US_FORCE_UNWIND, as you have done, is right. Andrew. P.S. The ARM unwinder data was never intended for all the things we do with it, and it's pretty much a matter of luck that it works. I don't really know why we didn't adopt DWARF unwinder data for ARM, given that the ARM unwinder data is really only intended for exceptions, and we need a lot more.
commit eafec6ead2e5a5a5a1b6504311a6a7ec6f0420af Author: Julian Brown <jbrown@build6-lucid-cs.sje.mentorg.com> Date: Wed Jul 25 11:43:08 2012 -0700 Backtrace through throw. diff --git a/libstdc++-v3/libsupc++/eh_personality.cc b/libstdc++-v3/libsupc++/eh_personality.cc index 72f596e..3322b6c 100644 --- a/libstdc++-v3/libsupc++/eh_personality.cc +++ b/libstdc++-v3/libsupc++/eh_personality.cc @@ -380,6 +380,8 @@ PERSONALITY_FUNCTION (int version, switch (state & _US_ACTION_MASK) { case _US_VIRTUAL_UNWIND_FRAME: + if (state & _US_FORCE_UNWIND) + CONTINUE_UNWINDING; actions = _UA_SEARCH_PHASE; break;