 |
|
|
|
Actions
|
|
[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
Re: [cxx-abi-dev] Re: gcc unwind ABI change for forced unwind
- To: Jason Merrill <jason@xxxxxxxxxx>
- Subject: Re: [cxx-abi-dev] Re: gcc unwind ABI change for forced unwind
- From: Cary Coutant <cary@xxxxxxxxxx>
- Date: Thu, 22 May 2003 11:40:05 -0700
Cleanups resulting from local automatic objects that need destruction
are
easy, but the problem is what to do about catch(...) blocks. Richard's
approach was to end such blocks with a call to the new API,
"_Unwind_Resume_or_Rethrow()", if the block did not already end with a
rethrow.
Rather, a rethrow at the end of a catch(...) block uses that API
instead of
the usual rethrow code. If the block doesn't end with a rethrow,
nothing
is changed.
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.
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. 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. Is there another reason?
-cary
|
|