This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: finish_command_continuation and errors
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org, tromey at redhat dot com
- Date: Thu, 18 Mar 2010 17:28:30 +0000
- Subject: Re: RFC: finish_command_continuation and errors
- References: <m3bpel36f9.fsf@fleche.redhat.com>
On Thursday 18 March 2010 17:07:06, Tom Tromey wrote:
> This can happen if gdb calls error while printing the return value.
For the record, can you show us which error was that?
> In this case, the finish breakpoint is never deleted.
>
> This patch fixes the problem by wrapping the call to print_return_value
> in a TRY_CATCH. Other fixes are possible, but I chose this one because
> it is small and occurs at the point in the code that must be
> exception-safe.
>
> Built and regtested on x86-64 (compile farm).
> I also tried it again on my test case, provoked the error, and used
> "maint info b" to verify that the finish breakpoint was deleted.
This probably also fixes frontends: the normal_stop observers notification
call just a bit below was skipped too, which means the MI *stopped
notification must have gone missing; a frontend was being left with no
idea the thread had stopped. Could you check with your test, but running
with -i=mi, that mi_on_normal_stop also isn't throwing an exception too
in your case? I suspect not, but just in case. You can issue the normal
CLI commands while in -i=mi to test this.
> 2010-03-18 Tom Tromey <tromey@redhat.com>
>
> * infcmd.c (finish_command_continuation): Wrap print_return_value
> in TRY_CATCH.
Okay. Thanks.
--
Pedro Alves