[lldb-dev] [Bug 45921] New: lldb not directly stopped at a specified statement
via lldb-dev
lldb-dev at lists.llvm.org
Wed May 13 21:01:33 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45921
Bug ID: 45921
Summary: lldb not directly stopped at a specified statement
Product: lldb
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: yangyibiao at hust.edu.cn
CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org
$ 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;
}
--
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/20200514/07b1f970/attachment-0001.html>
More information about the lldb-dev
mailing list