From: Antony KING <antony.king@st.com>
To: gdb@sourceware.org
Subject: Re: Strange effect in GDB 6.8 when setting breakpoint on symbol with both strong and weak definitions
Date: Tue, 14 Oct 2008 20:31:00 -0000 [thread overview]
Message-ID: <48F50172.40502@st.com> (raw)
In-Reply-To: <20081014133113.GA11370@caradoc.them.org>
Daniel Jacobowitz wrote:
> 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.
I have also just tried this with the CVS HEAD of GDB with the same
result. Could it be that GDB is re-evaluating the breakpoint after the
program is launched (since it is a pending breakpoint) and a different
instance of f() being found ?
BTW when I use our build of GDB 6.8 for use with remote SH-4 targets I
do not see this "shift" of breakpoint location.
Anyway, I think I will submit this behaviour as a bug.
>> 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.
OK. I do not remember seeing anything recently on the GDB list about
this, but is this an area being looked at as a future enhancement ?
next prev parent reply other threads:[~2008-10-14 20:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-14 13:24 Antony KING
2008-10-14 13:31 ` Daniel Jacobowitz
2008-10-14 20:31 ` Antony KING [this message]
2008-10-15 1:30 ` 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=48F50172.40502@st.com \
--to=antony.king@st.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