[lldb-dev] [Bug 45609] New: lldb wrongly stopped at abort() function within a nested for loop
via lldb-dev
lldb-dev at lists.llvm.org
Sun Apr 19 10:03:11 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45609
Bug ID: 45609
Summary: lldb wrongly stopped at abort() function within a
nested for loop
Product: lldb
Version: 9.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
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 9.0.1
$ clang -g small.c; lldb ./a.out
(lldb) target create "./a.out"
Current executable set to './a.out' (x86_64).
(lldb) b small.c:5
Breakpoint 1: where = a.out`main + 49 at small.c:5:12, address =
0x0000000000001171
(lldb) run
Process 45684 launched: '/home/yibiao/cv-gcov/a.out' (x86_64)
Process 45684 stopped
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
frame #0: 0x0000555555555171 a.out`main at small.c:5:12
2 {
3 for (int x = 1; x < 2; x++)
4 for (int y = -1; y <= 0; y++)
-> 5 if ((x - y) != (x - y))
6 __builtin_abort ();
7 return 0;
8 }
(lldb) step
Process 45684 stopped
* thread #1, name = 'a.out', stop reason = step in
frame #0: 0x000055555555518f a.out`main at small.c:4:31
1 int main ()
2 {
3 for (int x = 1; x < 2; x++)
-> 4 for (int y = -1; y <= 0; y++)
5 if ((x - y) != (x - y))
6 __builtin_abort ();
7 return 0;
(lldb) step
Process 45684 stopped
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
frame #0: 0x0000555555555171 a.out`main at small.c:5:12
2 {
3 for (int x = 1; x < 2; x++)
4 for (int y = -1; y <= 0; y++)
-> 5 if ((x - y) != (x - y))
6 __builtin_abort ();
7 return 0;
8 }
(lldb) step
Process 45684 stopped
* thread #1, name = 'a.out', stop reason = step in
frame #0: 0x000055555555518f a.out`main at small.c:4:31
1 int main ()
2 {
3 for (int x = 1; x < 2; x++)
-> 4 for (int y = -1; y <= 0; y++)
5 if ((x - y) != (x - y))
6 __builtin_abort ();
7 return 0;
(lldb) step
Process 45684 stopped
* thread #1, name = 'a.out', stop reason = step in
frame #0: 0x000055555555519d a.out`main at small.c:6:25
3 for (int x = 1; x < 2; x++)
4 for (int y = -1; y <= 0; y++)
5 if ((x - y) != (x - y))
-> 6 __builtin_abort ();
7 return 0;
8 }
/***
In the last step, lldb stopped at __builtin_abort(); statement.
When we directly setting breakpoint at small.c:6, lld is not stopped as
follows:
***/
$ lldb ./a.out
(lldb) target create "./a.out"
Current executable set to './a.out' (x86_64).
(lldb) b small.c:6
Breakpoint 1: where = a.out`main + 69 at small.c:6:8, address =
0x0000000000001185
(lldb) run
Process 45740 launched: '/home/yibiao/cv-gcov/a.out' (x86_64)
Process 45740 exited with status = 0 (0x00000000)
$ cat small.c
int main ()
{
for (int x = 1; x < 2; x++)
for (int y = -1; y <= 0; y++)
if ((x - y) != (x - y))
__builtin_abort ();
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/20200419/58a01735/attachment.html>
More information about the lldb-dev
mailing list