From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19437 invoked by alias); 22 Apr 2006 08:06:30 -0000 Received: (qmail 19429 invoked by uid 22791); 22 Apr 2006 08:06:29 -0000 X-Spam-Check-By: sourceware.org Received: from astro.systems.pipex.net (HELO astro.systems.pipex.net) (62.241.163.6) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 22 Apr 2006 08:06:28 +0000 Received: from [192.168.123.106] (81-86-64-188.dsl.pipex.com [81.86.64.188]) by astro.systems.pipex.net (Postfix) with ESMTP id ED892E00028A for ; Sat, 22 Apr 2006 09:06:25 +0100 (BST) Message-ID: <4449E3F8.3020408@greglaw.net> Date: Sat, 22 Apr 2006 13:00:00 -0000 From: Greg Law User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: gdb@sourceware.org Subject: decode_variable's use of not_found_ptr Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00287.txt.bz2 Hi all, I tried to send this to gdb-prs, but to no avail - hopefully mmore luck here. Anyway, sometimes when I restart a program. I get error messages telling me that a breakpoint in a shared library can't be found: Error in re-setting breakpoint 2: Function "foo" not defined. Error in re-setting breakpoint 2: Function "foo" not defined. Error in re-setting breakpoint 2: Function "foo" not defined. Error in re-setting breakpoint 2: Function "foo" not defined. Error in re-setting breakpoint 2: Function "foo" not defined. Error in re-setting breakpoint 2: Function "foo" not defined. Error in re-setting breakpoint 2: Function "foo" not defined. I've had a quick look at the source, and the message seems to be coming from decode_variable() The comment for this function says: /* Decode a linespec that's a variable. If FILE_SYMTAB is non-NULL, look in that symtab's static variables first. If NOT_FOUND_PTR is not NULL and the function cannot be found, store boolean true in the location pointed to and do not issue an error message. */ 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? Cheers, Greg