* [Fwd: multiple location in C++ constructors]
@ 2008-10-16 12:46 Denis PILAT
2008-10-16 12:54 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Denis PILAT @ 2008-10-16 12:46 UTC (permalink / raw)
To: gdb-patches
[-- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Fwd: multiple location in C++ constructors]
2008-10-16 12:46 [Fwd: multiple location in C++ constructors] Denis PILAT
@ 2008-10-16 12:54 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2008-10-16 12:54 UTC (permalink / raw)
To: Denis PILAT; +Cc: gdb-patches
On Thu, Oct 16, 2008 at 02:45:47PM +0200, Denis PILAT wrote:
> Date: Tue, 14 Oct 2008 17:12:55 +0200
> From: Denis PILAT <denis.pilat@st.com>
> Subject: multiple location in C++ constructors
> To: gdb@sourceware.org
This isn't a patch, so gdb@ was the right list. I just haven't had
time to think through a response yet; I am hoping Vladimir will have a
chance to look at this, since IIRC he knew more about it.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-16 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-16 12:46 [Fwd: multiple location in C++ constructors] Denis PILAT
2008-10-16 12:54 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox