From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24296 invoked by alias); 22 Apr 2006 21:21:46 -0000 Received: (qmail 24271 invoked by uid 22791); 22 Apr 2006 21:21:45 -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; Sat, 22 Apr 2006 21:21:43 +0000 Received: from farnswood.snap.net.nz (p202-124-114-16.snap.net.nz [202.124.114.16]) by viper.snap.net.nz (Postfix) with ESMTP id 35687755815; Sun, 23 Apr 2006 09:21:39 +1200 (NZST) Received: by farnswood.snap.net.nz (Postfix, from userid 500) id D57D362A99; Sat, 22 Apr 2006 22:21:40 +0100 (BST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17482.40548.6370.963304@farnswood.snap.net.nz> Date: Sun, 23 Apr 2006 10:22:00 -0000 To: Greg Law Cc: gdb@sourceware.org Subject: Re: decode_variable's use of not_found_ptr In-Reply-To: <444A5AD3.5020201@greglaw.net> References: <02e201c66607$98e13ca0$a501a8c0@CAM.ARTIMI.COM> <444A5AD3.5020201@greglaw.net> X-Mailer: VM 7.19 under Emacs 22.0.50.40 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00291.txt.bz2 > >> but at the bottom of the function it says: > >> > >> > >> if (not_found_ptr) > >> *not_found_ptr = 1; > >> throw_error (NOT_FOUND_ERROR, _("Function \"%s\" not defined."), copy); > >> > >> > >> Now, I must confess gdb's internal exception mechanism is deeply > >> mysterious to me, but that code looks to me like it doesn't do what the > >> comment claims. i.e. if not_found_ptr is non-NULL, it still issues the > >> error message. > >> > >> What's wrong - my reading of the code, or the code? I think this part is right and the clue is in the macro NOT_FOUND_ERROR. > Had a quick look at 6.3's code, and that is indeed different: > > if (not_found_ptr) > { > *not_found_ptr = 1; > /* The caller has indicated that it wishes quiet notification of any > error where the function or file is not found. A call to > error_silent causes an error to occur, but it does not issue > the supplied message. The message can be manually output by > the caller, if desired. This is used, for example, when > attempting to set breakpoints for functions in shared libraries > that have not yet been loaded. */ > error_silent ("Function \"%s\" not defined.", copy); > } > > For some reason the error_silent seems to have got chopped in version > 6.4. I'll submit a problem report. Looking at the Changelog error_silent has been deleted and replaced with throw_error. I think the problem is elsewhere, in break_command_1 in breakpoint.c maybe: case NOT_FOUND_ERROR: /* If called to resolve pending breakpoint, just return error code. */ if (pending_bp) return e.reason; exception_print (gdb_stderr, e); I guess that pending_bp is NULL in your case and you need to debug GDB to see why. It would probably also help (those more knowledgable than me) if you said how your GDB has been configured. -- Nick http://www.inet.net.nz/~nickrob