verbose terminate_handler

Phil Edwards pedwards@disaster.jaj.com
Thu Nov 1 18:23:00 GMT 2001


On Thu, Nov 15, 2001 at 01:30:00PM +0000, Jason Merrill wrote:
> I just whipped this up for a customer who requested that a call to
> terminate() print some information about the exception which caused it, as
> apparently the SunPro C++ does.  It prints the demangled name of the
> exception type and, for objects derived from exception, the result of
> what().

Sweet.

> 1) Nothing.  Let anyone who wants this functionality reinvent it
>    themselves.  This is complicated by its reliance on ABI internals.

In that case, we should at least document how a user would go about doing it.

> 2) Install unwind-cxx.h and unwind.h so that users can get at them without
>    keeping GCC source trees around.

That seems like a good thing to do in any case.

> 2) Add current_exception_type to libsupc++, perhaps to the ABI
>    specification.  This would avoid the need to look at the unwinder
>    headers.

Likewise, although I'm not very familiar with ABI issues.

> 3) Add verbose_terminate_handler to libsupc++ or libstdc++ and document it;
>    people would still need to activate it with set_terminate.

That's got my vote; plus we should put verbose_terminate_handler in the
extensions namespace (__gnu_cxx).


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams



More information about the Libstdc++ mailing list