<html>
<head>
<base href="http://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 lookup of bss variable in shared library does not match assembly"
href="http://llvm.org/bugs/show_bug.cgi?id=18734">18734</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>symbol lookup of bss variable in shared library does not match assembly
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</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>harry.weppner@gmx.net
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Hi,
I stumbled across a situation where the symbol lookup seems inconsistent.
The gist of the issue is described at
<a href="https://gist.github.com/HarryWeppner/946cac154d769cf6936c">https://gist.github.com/HarryWeppner/946cac154d769cf6936c</a>
In line <a href="https://gist.github.com/HarryWeppner/946cac154d769cf6936c#file-lldb-L14">https://gist.github.com/HarryWeppner/946cac154d769cf6936c#file-lldb-L14</a>
lldb prints that the address of variable 'a' is 0x800a1b820 within libbss.so.1
(the shared library created from mylib.c).
That value shows as 0 even after being set to 1, i.e. the expression a == i
(<a href="https://gist.github.com/HarryWeppner/946cac154d769cf6936c#file-lldb-L24">https://gist.github.com/HarryWeppner/946cac154d769cf6936c#file-lldb-L24</a>) is
false . However, the printout in line
<a href="https://gist.github.com/HarryWeppner/946cac154d769cf6936c#file-lldb-L28">https://gist.github.com/HarryWeppner/946cac154d769cf6936c#file-lldb-L28</a> is ok
again and shows 'a' with a value of 1.
The fact that lldb *and* gdb show this behavior may indicate that the root
cause is actually a backend bug but I've filed this bug here since the symptom
occurs in lldb.
Thanks & cheerio, Harry.</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>