[Lldb-commits] [lldb] [lldb] Step over non-lldb breakpoints (PR #174348)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 9 03:58:30 PST 2026


DavidSpickett wrote:

Some more variations, what if I remove the breakpoint?

This one I remove it before I issue a continue:
```
$ ./bin/lldb /tmp/test.o
(lldb) target create "/tmp/test.o"
Current executable set to '/tmp/test.o' (aarch64).
(lldb) b main
Breakpoint 1: where = test.o`main + 12 at test.c:2:3, address = 0x0000000000000720
(lldb) run
Process 36475 launched: '/tmp/test.o' (aarch64)
Process 36475 stopped
* thread #1, name = 'test.o', stop reason = breakpoint 1.1
    frame #0: 0x0000aaaaaaaa0720 test.o`main at test.c:2:3
   1   	int main() {
-> 2   	  __builtin_debugtrap();
   3   	  return 0;
   4   	}
(lldb) breakpoint delete 1
1 breakpoints deleted; 0 breakpoint locations disabled.
(lldb) c
Process 36475 resuming
Process 36475 stopped
* thread #1, name = 'test.o', stop reason = signal SIGTRAP
    frame #0: 0x0000aaaaaaaa0724 test.o`main at test.c:3:3
   1   	int main() {
   2   	  __builtin_debugtrap();
-> 3   	  return 0;
   4   	}
(lldb) c
Process 36475 resuming
Process 36475 exited with status = 0 (0x00000000)
```
And it's able to resume and get the sigtrap caused by the inferior.

If I try to continue once before removing the breakpoint, it gets stuck:
```
$ ./bin/lldb /tmp/test.o
(lldb) target create "/tmp/test.o"
Current executable set to '/tmp/test.o' (aarch64).
(lldb) b main
Breakpoint 1: where = test.o`main + 12 at test.c:2:3, address = 0x0000000000000720
(lldb) run
Process 36564 launched: '/tmp/test.o' (aarch64)
Process 36564 stopped
* thread #1, name = 'test.o', stop reason = breakpoint 1.1
    frame #0: 0x0000aaaaaaaa0720 test.o`main at test.c:2:3
   1   	int main() {
-> 2   	  __builtin_debugtrap();
   3   	  return 0;
   4   	}
(lldb) c
Process 36564 resuming
Process 36564 stopped
* thread #1, name = 'test.o', stop reason = breakpoint 1.1
    frame #0: 0x0000aaaaaaaa0720 test.o`main at test.c:2:3
   1   	int main() {
-> 2   	  __builtin_debugtrap();
   3   	  return 0;
   4   	}
(lldb) breakpoint delete 1
1 breakpoints deleted; 0 breakpoint locations disabled.
(lldb) c
Process 36564 resuming
Process 36564 stopped
* thread #1, name = 'test.o', stop reason = trace
    frame #0: 0x0000aaaaaaaa0720 test.o`main at test.c:2:3
   1   	int main() {
-> 2   	  __builtin_debugtrap();
   3   	  return 0;
   4   	}
```
I would have thought removing the breakpoint would fix the issue in both cases.


https://github.com/llvm/llvm-project/pull/174348


More information about the lldb-commits mailing list