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