[lldb-dev] [Bug 23946] New: Symbol name display when multiple symbol present at the same address

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 25 07:19:04 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23946

            Bug ID: 23946
           Summary: Symbol name display when multiple symbol present at
                    the same address
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at cs.uiuc.edu
          Reporter: tberghammer at google.com
    Classification: Unclassified

When the "Identical Code Folding" link time optimization is turned on then
several symbol (function) can have the same code address. In this case LLDB
displays one of the symbol names when displaying a backtrace or when displaying
some disassembly. It would be much nicer if we display all of the symbols
located at the given address to the user so he/she can understand what is
happening.

Test case (requires g++ and gold):

int foo1(int x) { return x + 1; }
int foo2(int x) { return x + 1; }
int main() { foo1(1); foo2(1); }

g++ -g -ffunction-sections -fuse-ld=gold -Wl,--icf -Wl,all main.cpp

./lldb a.out
(lldb) breakpoint set -n main
(lldb) process launch
(lldb) expression &foo1
(lldb) expression &foo2
// Verify they are at the same address
(lldb) disassemble -n foo1
(lldb) disassemble -n foo2
// In each disassemble instruction we should see the name of the correct
function

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150625/d79042a8/attachment.html>


More information about the lldb-dev mailing list