From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20438 invoked by alias); 16 Jan 2006 18:11:37 -0000 Received: (qmail 20422 invoked by uid 22791); 16 Jan 2006 18:11:35 -0000 X-Spam-Check-By: sourceware.org Received: from smtp102.sbc.mail.mud.yahoo.com (HELO smtp102.sbc.mail.mud.yahoo.com) (68.142.198.201) by sourceware.org (qpsmtpd/0.31) with SMTP; Mon, 16 Jan 2006 18:11:34 +0000 Received: (qmail 22869 invoked from network); 16 Jan 2006 18:11:31 -0000 Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@71.138.13.192 with login) by smtp102.sbc.mail.mud.yahoo.com with SMTP; 16 Jan 2006 18:11:31 -0000 Received: by lucon.org (Postfix, from userid 1000) id 0DF6C64909; Mon, 16 Jan 2006 10:11:31 -0800 (PST) Date: Mon, 16 Jan 2006 18:11:00 -0000 From: "H. J. Lu" To: GDB Subject: Re: Does gdb support weak/normal symbols? Message-ID: <20060116181130.GA11897@lucon.org> References: <20060116004831.GA1186@lucon.org> <20060116014904.GA20402@nevyn.them.org> <20060116154754.GA10336@lucon.org> <20060116155846.GA3580@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060116155846.GA3580@nevyn.them.org> User-Agent: Mutt/1.4.2.1i 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-01/txt/msg00147.txt.bz2 On Mon, Jan 16, 2006 at 10:58:46AM -0500, Daniel Jacobowitz wrote: > On Mon, Jan 16, 2006 at 07:47:54AM -0800, H. J. Lu wrote: > > On Sun, Jan 15, 2006 at 08:49:04PM -0500, Daniel Jacobowitz wrote: > > > On Sun, Jan 15, 2006 at 04:48:31PM -0800, H. J. Lu wrote: > > > > foo in weak.c isn't in the symbol table. But gdb sets the breakpoint > > > > of foo on it. Shouldn't gdb be clever enough to know to check the > > > > other one? > > > > > > GDB uses the debug information in preference to the ELF symbol table. > > > That one says this is a definition of foo. > > > > > > Eventually "break foo" will breakpoint both of them. > > > > What did you mean by "Eventually"? Were you saying that it was a bug > > and would be fixed in the future? Is anyone working on it? I'd like > > to help. > > Please read the archives for the last few days. This is covered by the > same general problem description as "break FILE:LINE" - you have asked > for an ambiguous breakpoint, and instead of properly placing multiple > breakpoints or prompting GDB has picked one at random. > "break foo" may be slightly different from "break FILE:LINE". For the global symbol, foo, there will be only one definition. It is a matter of picking the right foo for "break foo". There is no need to set multiple breakpoints nor prompt user. H.J.