This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Does gdb support weak/normal symbols?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]