From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6780 invoked by alias); 16 Jan 2006 18:35:02 -0000 Received: (qmail 6714 invoked by uid 22791); 16 Jan 2006 18:35:01 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 16 Jan 2006 18:34:58 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EyZBw-0002Fo-Al; Mon, 16 Jan 2006 13:34:56 -0500 Date: Mon, 16 Jan 2006 18:53:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org, GDB Subject: Re: Does gdb support weak/normal symbols? Message-ID: <20060116183456.GA8597@nevyn.them.org> Mail-Followup-To: gdb@sourceware.org, GDB References: <20060116004831.GA1186@lucon.org> <20060116014904.GA20402@nevyn.them.org> <20060116154754.GA10336@lucon.org> <20060116155846.GA3580@nevyn.them.org> <20060116181130.GA11897@lucon.org> <20060116183052.GA8425@nevyn.them.org> <20060116183213.GA12085@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060116183213.GA12085@lucon.org> User-Agent: Mutt/1.5.8i 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/msg00151.txt.bz2 On Mon, Jan 16, 2006 at 10:32:13AM -0800, H. J. Lu wrote: > On Mon, Jan 16, 2006 at 01:30:52PM -0500, Daniel Jacobowitz wrote: > > On Mon, Jan 16, 2006 at 10:11:31AM -0800, H. J. Lu wrote: > > > "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. > > > > This is wrong. You're still thinking about a compiler and a linker, > > not about a debugger. There may also be a dozen static functions named > > "foo", and one of them may happen to be in the current file and the > > How can a static function be global? This is not C++. There's no One Definition Rule. The existence of a global function "foo" somewhere in the executable does not preclude the existence of a static function "foo" somewhere else, in the same binary, in a dynamically loaded library, et cetera. In fact it's passably likely. -- Daniel Jacobowitz CodeSourcery From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6749 invoked by alias); 16 Jan 2006 18:35:02 -0000 Received: (qmail 6713 invoked by uid 22791); 16 Jan 2006 18:35:01 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 16 Jan 2006 18:34:58 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EyZBw-0002Fo-Al; Mon, 16 Jan 2006 13:34:56 -0500 Date: Mon, 16 Jan 2006 18:35:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org, GDB Subject: Re: Does gdb support weak/normal symbols? Message-ID: <20060116183456.GA8597@nevyn.them.org> Mail-Followup-To: gdb@sourceware.org, GDB References: <20060116004831.GA1186@lucon.org> <20060116014904.GA20402@nevyn.them.org> <20060116154754.GA10336@lucon.org> <20060116155846.GA3580@nevyn.them.org> <20060116181130.GA11897@lucon.org> <20060116183052.GA8425@nevyn.them.org> <20060116183213.GA12085@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060116183213.GA12085@lucon.org> User-Agent: Mutt/1.5.8i 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/msg00150.txt.bz2 Message-ID: <20060116183500.LpQ1U3WNDizJbq0aE5H0z9gOhgGMvi4VZs7ac7Xl29E@z> On Mon, Jan 16, 2006 at 10:32:13AM -0800, H. J. Lu wrote: > On Mon, Jan 16, 2006 at 01:30:52PM -0500, Daniel Jacobowitz wrote: > > On Mon, Jan 16, 2006 at 10:11:31AM -0800, H. J. Lu wrote: > > > "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. > > > > This is wrong. You're still thinking about a compiler and a linker, > > not about a debugger. There may also be a dozen static functions named > > "foo", and one of them may happen to be in the current file and the > > How can a static function be global? This is not C++. There's no One Definition Rule. The existence of a global function "foo" somewhere in the executable does not preclude the existence of a static function "foo" somewhere else, in the same binary, in a dynamically loaded library, et cetera. In fact it's passably likely. -- Daniel Jacobowitz CodeSourcery