This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: exceptions and gdb
- To: nbecker at fred dot net
- Subject: Re: exceptions and gdb
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Thu, 15 Mar 2001 15:16:33 -0500 (EST)
- cc: gcc at gcc dot gnu dot org
On 15 Mar 2001 nbecker@fred.net wrote:
> I noticed that if there are uncaught C++ exceptions, gdb is unable to
> provide any useful info as to the source of the exception. Tracing
> through stack frames doesn't provide any useful information AFAIK. I
> wonder if it would be possible to improve this.
>From except.c:
Future directions:
Currently __throw makes no differentiation between cleanups and
user-defined exception regions. While this makes the implementation
simple, it also implies that it is impossible to determine if a
user-defined exception handler exists for a given exception without
completely unwinding the stack in the process. This is undesirable
from the standpoint of debugging, as ideally it would be possible
to trap unhandled exceptions in the debugger before the process of
unwinding has even started.
Meanwhile setting a breakpoint on __throw is perhaps the best workaround.
Jeff