[lldb-dev] [Bug 15415] New: Backtrace fails when frame pointers are omitted
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Mar 1 15:36:10 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=15415
Bug ID: 15415
Summary: Backtrace fails when frame pointers are omitted
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: samueldotj at gmail.com
Classification: Unclassified
Created attachment 10124
--> http://llvm.org/bugs/attachment.cgi?id=10124&action=edit
Test C Program Source
Backtrace is incomplete when -fomit-frame-pointer is used.
Please see the test source file attached when it is compiled with the following
comamnd "gcc -g -fomit-frame-pointer ~/test.c", lldb is not able to unwind the
stack completely. The CFI seems to be correct and gdb is able to unwind the
stack fully,
$lldb a.out
Current executable set to 'a.out' (x86_64).
(lldb) run
Process 13804 launched: '/dbc/pa-dbc1027/jacobs/pycdb/pycdb/test/a.out'
(x86_64)
Process 13804 stopped
* thread #1: tid = 0x35ec, 0x00000000004004e1 a.out`recursive_function(i=10) +
45 at test.c:10, stop reason = invalid address
frame #0: 0x00000000004004e1 a.out`recursive_function(i=10) + 45 at
test.c:10
7 else
8 {
9 char *null=0;
-> 10 *null = 0;
11 }
12 }
13
bt
* thread #1: tid = 0x35ec, 0x00000000004004e1 a.out`recursive_function(i=10) +
45 at test.c:10, stop reason = invalid address
frame #0: 0x00000000004004e1 a.out`recursive_function(i=10) + 45 at
test.c:10
frame #1: 0x00000000004004d1 a.out`recursive_function(i=9) + 29 at test.c:5
---------------------------------------------------------------
When it is compiled without -fomit-frame-pointer option it works fine in lldb.
$lldb a.out
Current executable set to 'a.out' (x86_64).
(lldb) run
Process 13754 launched: '/dbc/pa-dbc1027/jacobs/pycdb/pycdb/test/a.out'
(x86_64)
Process 13754 stopped
* thread #1: tid = 0x35ba, 0x00000000004004e0 a.out`recursive_function(i=10) +
44 at test.c:10, stop reason = invalid address
frame #0: 0x00000000004004e0 a.out`recursive_function(i=10) + 44 at
test.c:10
7 else
8 {
9 char *null=0;
-> 10 *null = 0;
11 }
12 }
13
bt
* thread #1: tid = 0x35ba, 0x00000000004004e0 a.out`recursive_function(i=10) +
44 at test.c:10, stop reason = invalid address
frame #0: 0x00000000004004e0 a.out`recursive_function(i=10) + 44 at
test.c:10
frame #1: 0x00000000004004d2 a.out`recursive_function(i=9) + 30 at test.c:5
frame #2: 0x00000000004004d2 a.out`recursive_function(i=8) + 30 at test.c:5
frame #3: 0x00000000004004d2 a.out`recursive_function(i=7) + 30 at test.c:5
frame #4: 0x00000000004004d2 a.out`recursive_function(i=6) + 30 at test.c:5
frame #5: 0x00000000004004d2 a.out`recursive_function(i=5) + 30 at test.c:5
frame #6: 0x00000000004004d2 a.out`recursive_function(i=4) + 30 at test.c:5
frame #7: 0x00000000004004d2 a.out`recursive_function(i=3) + 30 at test.c:5
frame #8: 0x00000000004004d2 a.out`recursive_function(i=2) + 30 at test.c:5
frame #9: 0x00000000004004d2 a.out`recursive_function(i=1) + 30 at test.c:5
frame #10: 0x00000000004004d2 a.out`recursive_function(i=0) + 30 at
test.c:5
frame #11: 0x00000000004004fe a.out`main(argc=1, argv=0x00007fffe559c4c8) +
25 at test.c:16
frame #12: 0x00007f3f8848176d libc.so.6`__libc_start_main + 237
frame #13: 0x00000000004003f9 a.out`_start + 41
--
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/20130301/e1157662/attachment.html>
More information about the lldb-dev
mailing list