Gdb support for exceptions (Re: using backtrace() in exception throwing?)
Stephan Bergmann
sbergman at redhat.com
Thu May 30 00:28:46 PDT 2013
On 02/20/2013 10:28 PM, Tom Tromey wrote:
> FWIW we have the same problem in reverse: the gdb group at Red Hat is,
> among other things, tasked with improving the C++ debugging experience.
> However, most of us don't actually debug C++ programs on a regular
> basis. We do know some issues, via bugzilla and other discussions, but
> I feel sure we are also missing things.
One related thing that struck me now is how
__gnu_cxx::__verbose_terminate_handler prints out a helpful message to
stderr, but if all you have is a gdb backtrace upon the resulting
SIGABRT (like in thread 1 of
<https://bugzilla.redhat.com/attachment.cgi?id=754479> attached to
<https://bugzilla.redhat.com/show_bug.cgi?id=968424> ABRT report), you
cannot see what that message was.
It would be cool if there were a way to see that message in the gdb
backtrace. Like __gnu_cxx::__verbose_terminate_handler assembling the
message and then calling a not-optimized-away helper function with the
message as argument, which in turn calls fputs and abort (though I
notice that __verbose_terminate_handler currently "assembles" messages
through multiple calls to fputs, which saves it from malloc hassles).
Stephan
More information about the LibreOffice
mailing list