<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 --- - Backtrace fails when frame pointers are omitted"
href="http://llvm.org/bugs/show_bug.cgi?id=15415">15415</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Backtrace fails when frame pointers are omitted
</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>samueldotj@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=10124" name="attach_10124" title="Test C Program Source">attachment 10124</a> <a href="attachment.cgi?id=10124&action=edit" title="Test C Program Source">[details]</a></span>
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</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>