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: Strange effect in GDB 6.8 when setting breakpoint on symbol with both strong and weak definitions


On Tue, Oct 14, 2008 at 02:23:52PM +0100, Antony KING wrote:
> As you can see the location of the breakpoint at f() has been shifted
> from its definition in b.c (which is what I expected) before the program
> is run, to its definition in a.c after the program stopped in main()
> (which is not what I would expect). This shift of location seems wrong
> to me and quite unexpected. Is this a bug ?

I don't know why this happens.

> Another problem is that although there are 2 definitions of f() in the
> program, only 1 breakpoint is being set. My understanding is that GDB
> should set multiple breakpoints on f(). Is this correct (or is this only
> a feature that is enabled when debugging C++ applications) ?

It would be nice if this worked, but it doesn't; so far it's only
based on line number.  So it works for inlined or templated code.

-- 
Daniel Jacobowitz
CodeSourcery


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