Gdb support for exceptions (Re: using backtrace() in exception throwing?)

Tom Tromey tromey at redhat.com
Thu May 30 13:24:37 PDT 2013


>>>>> "Stephan" == Stephan Bergmann <sbergman at redhat.com> writes:

Stephan> It would be cool if there were a way to see that message in the gdb
Stephan> backtrace.  Like __gnu_cxx::__verbose_terminate_handler assembling the
Stephan> message and then calling a not-optimized-away helper function with the
Stephan> message as argument, which in turn calls fputs and abort (though I
Stephan> notice that __verbose_terminate_handler currently "assembles" messages
Stephan> through multiple calls to fputs, which saves it from malloc hassles).

I think it may be fixable in GCC.  Right now the issue is that 't'
is optimized away; but in a local build I can see:

    (gdb) info local
    terminating = true
    t = 0x601060 <_ZTIi@@CXXABI_1.3>

... which, while not completely readable, is at least transformable with
c++filt or "maint demangle".

I pinged a local GCC hacker, I'll let you know if he thinks this is
fixable.

Tom


More information about the LibreOffice mailing list