[LLVMbugs] [Bug 14569] New: debug info for thunks using mangled name

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Dec 10 23:49:56 PST 2012


             Bug #: 14569
           Summary: debug info for thunks using mangled name
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: googler
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dblaikie at gmail.com
                CC: dgregor at apple.com, echristo at gmail.com,
                    llvmbugs at cs.uiuc.edu
            Blocks: 14395
    Classification: Unclassified

Clang produces DW_TAG_subprograms for virtual call thunks that include
DW_AT_name containing the mangled name of the thunk. GDB diligently renders
this mangled name to the user when printing out "info vtbl" results.

The GDB test suite isn't expecting this (in gdb.cp/virtfunc.exp) and fails.

The test's expected output is the demangled form of the name as you might get
from c++filt ("non-virtual thunk to E::vg"). GDB produces this output when the
thunk has no DW_TAG_subprogram at all, as is the case for GCC's debug info
output. It's possible there are other solutions (producing the demangled name
in the DW_AT_name field in the first place, for example).

Writing down some existing discussion with Eric:
* DW_AT_trampoline might be the right device for this, but even if we do that
we'll probably still need to address the naming issue - either not emitting it
(& letting GDB find the symbol name & demangle it) or emitting the demangled

* the possibility that GDB should be demangling this name itself was raised. I
don't think this is viable because we're emitting this as the DW_AT_name field
& if GDB demangled names found there it could demangle already demangled names.

* there shouldn't be any concern about symbolizers needing a legible name for
this address because the address should never appear in a backtrace, being a
thunk, not the actual function, we'll never be doing anything interesting while
the pc is within the range of the thunk itself

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list