<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 --- - Thunk function appears in debugger call stack" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24235&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=ko17HlZd-6oiy9R61oMThQPZcf2Q4NTUYeLp4uYQEtM&s=Pvp6WDZgGkPGfHgYcVqSpSl3iW2c1SQZ6pHukdvaS6E&e=">24235</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Thunk function appears in debugger call stack
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>amjad.aboud@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=14638" name="attach_14638" title="Source file to reproduce the issue">attachment 14638</a> <a href="attachment.cgi?id=14638&action=edit" title="Source file to reproduce the issue">[details]</a></span>
Source file to reproduce the issue
To reproduce the issue build the attached source file:
1. run the following command line:
clang -cc1 -triple x86_64-pc-linux -emit-obj -g -O0 -o thunk-call-stack.o
thunk-call-stack.cpp
2. link the object file "thunk-call-stack.o" into executable thunk-call-stack
4. run: gdb thunk-call-stack
5. add a breakpoint at line 10 and run ("b 10" --> "r")
6. show the call stack ("bt")
It will look like this:
(gdb) bt
#0 C::foo() () at dbgThunk.cpp:10
#1 0x00000000004008bb in virtual thunk to C::foo() () at dbgThunk.cpp:10
#2 0x00000000004007e7 in main () at dbgThunk.cpp:16
while it should look like this:
#0 C::foo() () at dbgThunk.cpp:10
#1 0x00000000004007e7 in main () at dbgThunk.cpp:16
The root cause for this is that the thunk function is being generated with a
call instruction to the original function rather than a jump instruction.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>