__cxa_rethrow

Richard Henderson rth at redhat.com
Wed Feb 28 07:33:17 UTC 2001


On Tue, Feb 27, 2001 at 10:40:16PM -0800, Richard Henderson wrote:
>    2.5.4
>    [__cxa_rethrow] then returns to the handler that called it, which
>    must call __cxa_end_catch(), perform any necessary cleanup, and
>    finally call _Unwind_Resume() to continue unwinding. 

It just ocurred to me that "returns to the handler" might be misleading
wording meaning "returns abnormally to the handler", and that things 
are already as I suggested at the end of my message.

I.e.  a more detailed list of events is

  (1) Check caughtExceptions stack and call terminate if needed.
  (2) Mark the rethrown exception in some implementation defined way.
  (3) Call _Unwind_RaiseException.
  (4) During Phase2 of the unwind, the cleanup handler for the
      catch block is invoked, which calls __cxa_end_catch,
      which notices the mark to do the right thing.
  (5) Unwinding proceeds as normal with _Unwind_Resume or whatever.
 

r~




More information about the cxx-abi-dev mailing list