From: Daniel Jacobowitz <drow@false.org>
To: gdb@sourceware.org, GDB <gdb@sources.redhat.com>
Subject: Re: Does gdb support weak/normal symbols?
Date: Mon, 16 Jan 2006 18:53:00 -0000 [thread overview]
Message-ID: <20060116183456.GA8597@nevyn.them.org> (raw)
In-Reply-To: <20060116183213.GA12085@lucon.org>
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
WARNING: multiple messages have this Message-ID
From: Daniel Jacobowitz <drow@false.org>
To: gdb@sourceware.org, GDB <gdb@sources.redhat.com>
Subject: Re: Does gdb support weak/normal symbols?
Date: Mon, 16 Jan 2006 18:35:00 -0000 [thread overview]
Message-ID: <20060116183456.GA8597@nevyn.them.org> (raw)
Message-ID: <20060116183500.LpQ1U3WNDizJbq0aE5H0z9gOhgGMvi4VZs7ac7Xl29E@z> (raw)
In-Reply-To: <20060116183213.GA12085@lucon.org>
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
next prev parent reply other threads:[~2006-01-16 18:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-16 0:48 H. J. Lu
2006-01-16 1:49 ` Daniel Jacobowitz
2006-01-16 15:48 ` H. J. Lu
2006-01-16 15:58 ` Daniel Jacobowitz
2006-01-16 18:11 ` H. J. Lu
2006-01-16 18:30 ` Daniel Jacobowitz
2006-01-16 18:32 ` H. J. Lu
2006-01-16 18:53 ` Daniel Jacobowitz [this message]
2006-01-16 18:35 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060116183456.GA8597@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox