This is the mail archive of the gdb-prs@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]

[Bug c++/11734] break c::bar() broken, can't find bar


------- Additional Comments From keiths at redhat dot com  2010-06-21 21:00 -------
I've looked at this a bit, and here is what I've discovered.

This bug occurs as a result of the dwarf2_physname patch committed (by me)
several months ago. The problem is not really that dwarf2_physname is being
used, however. The problem is that this never really worked to begin with; it
just appeared to!

For the method "void c::foo()", partial_die_full_name will store the name
"c::foo" into the partial symbol. When the dwarf information for class "c" is
expanded (since gdb will first look for the symtab for "c" so that it can search
for the method "foo()"), it calls dwarf2_physname to build the physname of the
method. This is "c::foo()" (=TYPE_FN_FIELD_PHYSNAME).

Now we look for "c::foo()". gdb searches through the list of partial symbols.
But since partial_die_full_name has stored "c::foo", the psymtab search fails.
[This behavior is in all versions of gdb.]

gdb tries to fallback to comparing the linkage name (after demangling it), and
since gdb 7.1, we no longer store/use linkage names (from
DW_AT_MIPS_linkage_name) for C++/Java, this fallback search also fails, and the
symbol is now no longer found.

If you manage to expand the psymtab before searching, then the search of the
symtabs will successfully find "c::foo()", since that is exactly the name that
is stored in the full symbol (from dwarf2_physname).

I am investigating solutions now. I hope to have a patch for this shortly.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11734

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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