From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3485 invoked by alias); 27 Jan 2008 02:19:09 -0000 Received: (qmail 3469 invoked by uid 22791); 27 Jan 2008 02:19:07 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 27 Jan 2008 02:18:41 +0000 Received: from kahikatea.snap.net.nz (194.31.255.123.static.snap.net.nz [123.255.31.194]) by viper.snap.net.nz (Postfix) with ESMTP id 2FB333DA194; Sun, 27 Jan 2008 15:18:34 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id C52618FC6D; Sun, 27 Jan 2008 15:18:32 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18331.59896.89303.672856@kahikatea.snap.net.nz> Date: Sun, 27 Jan 2008 07:53:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Rethrow exception properly. In-Reply-To: <200801262257.36197.vladimir@codesourcery.com> References: <200801262257.36197.vladimir@codesourcery.com> X-Mailer: VM 7.19 under Emacs 23.0.50.37 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: 2008-01/txt/msg00631.txt.bz2 > Such rethrowing is just wrong -- if we fully delegate handling of > the error to our caller, we should just throw the original exception. > > The attached patch switches to using throw_exception and gets us > back to sane MI error message. OK? There is still the anomaly between break_command_really returning int and gdb_breakpoint returning enum gdb_rc. Currently it looks like the return value of break_command_1 is not used, so this could presumably be void. If the exception handling is all done in break_command_really perhaps we don't need the return value of gdb_breakpoint. >... > +proc test_error {} { > + global mi_gdb_prompt > + > + mi_gdb_test "-break-insert function_that_does_not_exit" \ function_that_does_not_exist > + ".*\\^error,msg=\"Function \\\\\"function_that_does_not_exit\\\\\" not defined.\"" \ function_that_does_not_exist > + "breakpoint at nonexistent function" > +} >... -- Nick http://www.inet.net.nz/~nickrob