<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW " title="NEW --- - Symbol name display when multiple symbol present at the same address" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23946&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=DDUMf06MYELAe1Nlv7KChiwJLLHbYha4jtK_AOiWqwQ&m=YmGQYCYi5jB3WChqVaMo5E0Vqk0PiP3APvQI4c7-8I4&s=ingtMRxt2WEqMut6UVZyjr0JvKBT_z-JOP4nCZqMxig&e=">23946</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Symbol name display when multiple symbol present at the same address
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Reporter</th>
<td>tberghammer@google.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>