[Bug 14540] New: Backtrace command does not display c++ member function names on Linux


             Bug #: 14540
           Summary: Backtrace command does not display c++ member function
                    names on Linux
           Product: lldb
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
        AssignedTo: lldb-dev@cs.uiuc.edu
        ReportedBy: daniel.malea@intel.com
    Classification: Unclassified

Doing a backtrace during a c++ program sometimes does not display the names of
member functions correctly.

For example, on Linux, lldb reports:

frame #0: 0x0000000000400a72 a.out`C + 50 at main.cpp:93
frame #1: 0x00000000004008f7 a.out`C + 39 at main.cpp:94
frame #2: 0x0000000000400727 a.out`main + 87 at main.cpp:121
frame #3: 0x00007f04ab6b676d libc.so.6`__libc_start_main + 237
frame #4: 0x0000000000400609 a.out`_start + 41

The name of C's constructor "C::C" is not displayed in any frame.

To reproduce the above, build lldb (with clang) and run:

./dotest.py -A x86_64 -C /home/pulse_agent/bin/clang -v -t -f


This bug might be because the linux compiler is using DW_AT_linkage_name instead of the old DW_AT_MIPS_linkage_name that our compiler uses. I just submitted this fix:

% svn commit
Sending source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
Sending source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
Sending source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
Sending source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Transmitting file data ....
Committed revision 169657.

Let me know if that fixes the bug.

Greg Clayton

Hi Greg,

The test-case is still failing in the same way in r169759 (which includes your fix below) so I don't think it's the linkage_name bug that's causing it..

Thanks anyways,