<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - lldb not stopped at an executed return statement"
href="https://bugs.llvm.org/show_bug.cgi?id=48381">48381</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>lldb not stopped at an executed return statement
</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@lists.llvm.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>yangyibiao@nju.edu.cn
</td>
</tr>
<tr>
<th>CC</th>
<td>jdevlieghere@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=24232" name="attach_24232" title="the binary 'a.out'">attachment 24232</a> <a href="attachment.cgi?id=24232&action=edit" title="the binary 'a.out'">[details]</a></span>
the binary 'a.out'
$ clang -O1 -g small.c
$ lldb a.out
(lldb) target create "a.out"
Current executable set to '/root/DeVIL/a.out' (x86_64).
(lldb) b main
Breakpoint 1: where = a.out`main at small.c:14:10, address = 0x00000000004004a0
(lldb) run
-> 14 for (; d < 1; d++)
(lldb) step
-> 15 for (; b < 1; b++)
(lldb) step
-> 16 *c[b][d + 1] = 0;
(lldb) step
-> 15 for (; b < 1; b++)
(lldb) step
-> 14 for (; d < 1; d++)
(lldb) step
-> 18 return 0;
(lldb)
$ lldb a.out
(lldb) target create "a.out"
Current executable set to '/root/DeVIL/a.out' (x86_64).
(lldb) b 18
Breakpoint 1: where = a.out`main + 10 at small.c:18:3, address =
0x00000000004004aa
(lldb) run
Process 27027 launched: '/root/DeVIL/a.out' (x86_64)
Process 27027 exited with status = 0 (0x00000000)
(lldb)
$ cat small.c
struct S
{
volatile int f;
} a;
unsigned int b;
static int *c[1][2] = {{0, (int *)&a.f}};
static unsigned int d;
int
main ()
{
for (; d < 1; d++)
for (; b < 1; b++)
*c[b][d + 1] = 0;
return 0;
}</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>