Re: Customizing uncaught exception messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yang Zhang <yanghatespam@xxxxxxxxx> writes:

> I guess my question boils down to: how do I do the first thing you
> mentioned - that is, cause all throws to trigger my own code (which
> e.g. calls backtrace())?  I've used backtrace() and addr2line before,
> but I just don't know enough about how C++ exceptions work.

Use the standard set_terminate function to create your own terminate
handler.  It will be called for exceptions which aren't caught.

If you want to be called for exception which are caught, you need to
hook into __cxa_throw.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux