[cxx-abi-dev] Re: gcc unwind ABI change for forced unwind

Richard Henderson rth at redhat.com
Thu May 22 19:06:16 UTC 2003


On Thu, May 22, 2003 at 11:40:05AM -0700, Cary Coutant wrote:
> Thanks for the correction. I thought I understood it, but now it looks 
> like I missed something fundamental. So it's not to make sure that a 
> rethrow happens during a forced unwind -- it's to make sure that a 
> forced unwind continues rather than simply raising a new exception.

Exactly.

> The logic for _Unwind_Resume_or_Rethrow(), then,  is to see if we're in 
> a forced unwind or not. If we're not, it just calls 
> _Unwind_RaiseException() like it always used to.

Yes.

> If we are, it continues with the forced unwind. Why couldn't this
> logic simply have been added to _Unwind_RaiseException()? I think I
> know the answer: because the private fields in the exception object
> that indicate whether or not a forced unwind is in progress won't
> have been initialized on a first throw.

Yes.

Alternatly, _Unwind_Resume could have noted that the previous throw
was complete (as defined by _Unwind_RaiseException seeing 
_URC_HANDLER_FOUND, *and* having unwound to that point in phase2),
and started a new throw.

> Is there another reason?

Nope.  Simply that neither function provided either of the required
semantics, and retroactively changing one of the functions seemed 
less friendly wrt compatibility with released libgcc's than adding
a new function.


r~



More information about the cxx-abi-dev mailing list