<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 directly stopped at a specified statement"
href="https://bugs.llvm.org/show_bug.cgi?id=45921">45921</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>lldb not directly stopped at a specified 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>enhancement
</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@hust.edu.cn
</td>
</tr>
<tr>
<th>CC</th>
<td>jdevlieghere@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>$ lldb --version
lldb version 11.0.0
clang revision 871beba234a83a2a02da9dedbd59b91a1bfbd7af
llvm revision 871beba234a83a2a02da9dedbd59b91a1bfbd7af
$ clang --version
clang version 11.0.0 (/home/yibiao/.cache/yay/llvm-git/llvm-project
871beba234a83a2a02da9dedbd59b91a1bfbd7af)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$ clang -g small.c
$ lldb a.out
(lldb) target create "a.out"
Current executable set to '/home/yibiao/Debugger/a.out' (x86_64).
(lldb) b 5
Breakpoint 1: where = a.out`sig + 13 at small.c:5:3, address =
0x000000000040114d
(lldb) r
Process 15731 launched: '/home/yibiao/Debugger/a.out' (x86_64)
Process 15731 stopped
* thread #1, name = 'a.out', stop reason = signal SIGFPE: integer divide by
zero
frame #0: 0x0000000000401193 a.out`main at small.c:10:9
7
8 int main () {
9 signal(8, sig);
-> 10 k = i / j;
11 return 0;
12 }
(lldb) s
Process 15731 stopped
* thread #1, name = 'a.out', stop reason = step in
frame #0: 0x0000000000401141 a.out`sig(s=0) at small.c:4
1 #include <signal.h>
2
3 static int i, j, k;
-> 4 void sig (int s) {
5 exit(0);
6 }
7
(lldb) s
Process 15731 stopped
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
frame #0: 0x000000000040114d a.out`sig(s=8) at small.c:5:3
2
3 static int i, j, k;
4 void sig (int s) {
-> 5 exit(0);
6 }
7
8 int main () {
(lldb)
/************************
As shows, LLDB not directly stopped at the specified statement Line 5. When
continue stepping, it will stopped at Line 5 again.
*************************/
$ cat small.c
#include <signal.h>
static int i, j, k;
void sig (int s) {
exit(0);
}
int main () {
signal(8, sig);
k = i / j;
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>