This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Strange effect in GDB 6.8 when setting breakpoint on symbol with both strong and weak definitions
- From: Daniel Jacobowitz <drow at false dot org>
- To: Antony KING <antony dot king at st dot com>
- Cc: gdb at sourceware dot org
- Date: Tue, 14 Oct 2008 09:31:13 -0400
- Subject: Re: Strange effect in GDB 6.8 when setting breakpoint on symbol with both strong and weak definitions
- References: <48F49D68.2030701@st.com>
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