From: Denis PILAT <denis.pilat@st.com>
To: gdb-patches <gdb-patches@sourceware.org>
Subject: [Fwd: multiple location in C++ constructors]
Date: Thu, 16 Oct 2008 12:46:00 -0000 [thread overview]
Message-ID: <48F7377B.3070603@st.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: multiple location in C++ constructors.eml --]
[-- Type: message/rfc822, Size: 4160 bytes --]
From: Denis PILAT <denis.pilat@st.com>
To: gdb@sourceware.org
Subject: multiple location in C++ constructors
Date: Tue, 14 Oct 2008 17:12:55 +0200
Message-ID: <48F4B6F7.2010109@st.com>
We (at ST) have a compiler that generates DW_AT_MIPS_linkage_name
attributes for constructors.
Unfortunately, that prevents breakpoint in constructor to have multiple
locations since the gdb heuristics eliminates one location in the
expand_line_sal_maybe() function of breakpoint.c: see bellow, we go thru
the remove_sal () line.
(from breakpoint.c)
struct symtabs_and_lines
expand_line_sal_maybe (struct symtab_and_line sal)
...
if (find_pc_partial_function (pc, &this_function,
&func_addr, &func_end))
{
if (this_function &&
strcmp (this_function, original_function) != 0)
{
remove_sal (&expanded, i);
--i;
}
else if (func_addr == pc)
...
If present into dwarf2 debug information, the find_pc_partial_function()
returns the DW_AT_MIPS_linkage_name in this_function, which is alway
different from the original_function. Therefore there is always only one
location for constructor breakpoints since the DW_AT_MIPS_linkage_name
is filled with the mangled function name.
My question is:
Is the GDB heuristic to find multiple location for breakpoint wrong ?
Or is the DW_AT_MIPS_linkage_name attribute for constructors useless in
debug informations ?
Thanks for your feedback
Denis
next reply other threads:[~2008-10-16 12:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-16 12:46 Denis PILAT [this message]
2008-10-16 12:54 ` 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=48F7377B.3070603@st.com \
--to=denis.pilat@st.com \
--cc=gdb-patches@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