From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28325 invoked by alias); 18 Mar 2010 17:35:22 -0000 Received: (qmail 28317 invoked by uid 22791); 18 Mar 2010 17:35:22 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Mar 2010 17:35:17 +0000 Received: (qmail 17854 invoked from network); 18 Mar 2010 17:28:34 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 18 Mar 2010 17:28:34 -0000 From: Pedro Alves To: gdb-patches@sourceware.org, tromey@redhat.com Subject: Re: RFC: finish_command_continuation and errors Date: Thu, 18 Mar 2010 17:35:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-19-generic; KDE/4.3.2; x86_64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003181728.30450.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00670.txt.bz2 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 > > * infcmd.c (finish_command_continuation): Wrap print_return_value > in TRY_CATCH. Okay. Thanks. -- Pedro Alves