https://llvm.org/bugs/show_bug.cgi?id=24235
Bug ID: 24235
Summary: Thunk function appears in debugger call stack
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Created attachment 14638
--> https://llvm.org/bugs/attachment.cgi?id=14638&action=edit
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs