https://bugs.kde.org/show_bug.cgi?id=452058

Mark Wielaard <m...@klomp.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REPORTED                    |CONFIRMED
     Ever confirmed|0                           |1

--- Comment #2 from Mark Wielaard <m...@klomp.org> ---
Even though I cannot easily replicate it I can see how this happens.
For inlined functions we only store the (demangled) name we get from the
DW_AT_name attribute.
See the DiInlLoc in coregrind/m_debuginfo/storage.h:
      const HChar* inlinedfn;    /* inlined function name */

This is filled in by ML_(addInlInfo) in coregrind/m_debuginfo/storage.c.

Which is called by parse_inl_DIE using the results from get_inlFnName in
coregrind/m_debuginfo/readdwarf3.c.

get_inlFnName essentially looks up the DW_AT_name attribute, which is the
demangled, human/source name.

What we want is the DW_AT_linkage_name (or old style DW_AT_MIPS_linkage_name).

What you could try is something like:

diff --git a/coregrind/m_debuginfo/readdwarf3.c
b/coregrind/m_debuginfo/readdwarf3.c
index 5489f8d13..c800a921c 100644
--- a/coregrind/m_debuginfo/readdwarf3.c
+++ b/coregrind/m_debuginfo/readdwarf3.c
@@ -3129,7 +3129,7 @@ static const HChar* get_inlFnName (Int absori, CUConst*
cc, Bool td3)
       nf_i++;
       if (attr == 0 && form == 0) break;
       get_Form_contents( &cts, cc, &c, False/*td3*/, nf );
-      if (attr == DW_AT_name) {
+      if (attr == DW_AT_linkage_name || attr == DW_AT_MIPS_linkage_name) {
          HChar *fnname;
          if (cts.szB >= 0)
             cc->barf("get_inlFnName: expecting indirect string");

But I suspect that is not always available where DW_AT_name is. So we will have
less information sometimes. Also everywhere inlinedfn is now used that expects
it to already be demangled would need to explicitly demangle the name.

So maybe we need to keep both?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to