This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Inferior function calls and out-of-frame exception handlers


Phil Muldoon <pmuldoon@redhat.com> writes:

> That being said, I'm a little at a loss on how this can fixed. The
> unwinder and exception raising mechanisms are working as designed
> and the inferior function frame is being correctly assembled for the
> command. I was pondering catching the exception with a GDB supplied
> implementation-specific handler for the purposes of the inferior
> function call. But not sure if this is even possible. Suggestions?

One possibility: have gdb start by calling set_terminate in the
inferior passing a magic address.  Set a breakpoint on that address.
Make sure that the exception handler can not trace the stack past the
inferior function frame.  If an exception occurs, the new breakpoint
will be hit.  Call set_terminate again after the function call.

When using libstdc++, you don't need to call set_terminate, you can
just set a breakpoint on the value of the global variable
__terminate_handler.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]