Open joshop opened 4 years ago
@llvm/issue-subscribers-lldb
We'll need a bit more information to diagnose this issue. What version of lldb are you using? What system are you on? Where did you get lldb from? A little reproducer like the one below would also be helpful to make sure we're looking at the same issue.
Here's an example of stop hooks working fine for me:
$ lldb /bin/ls
(lldb) target create "/bin/ls"
Current executable set to '/bin/ls' (arm64e).
(lldb) target stop-hook add -o 'script "STOP HOOK FIRED"'
Stop hook #1 added.
(lldb) b malloc
Breakpoint 1: 3 locations.
(lldb) r
Process 14246 launched: '/bin/ls' (arm64e)
'STOP HOOK FIRED'
Process 14246 stopped
* thread #1, stop reason = breakpoint 1.2
frame #0: 0x00000001968f7028 libsystem_malloc.dylib`malloc
libsystem_malloc.dylib`malloc:
-> 0x1968f7028 <+0>: mov x1, x0
0x1968f702c <+4>: adrp x0, 364729
0x1968f7030 <+8>: add x0, x0, #0x0 ; virtual_default_zone
0x1968f7034 <+12>: mov w2, #0x1
Target 0: (ls) stopped.
(lldb) c
Process 14246 resuming
'STOP HOOK FIRED'
Process 14246 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.2
frame #0: 0x00000001968f7028 libsystem_malloc.dylib`malloc
libsystem_malloc.dylib`malloc:
-> 0x1968f7028 <+0>: mov x1, x0
0x1968f702c <+4>: adrp x0, 364729
0x1968f7030 <+8>: add x0, x0, #0x0 ; virtual_default_zone
0x1968f7034 <+12>: mov w2, #0x1
Target 0: (ls) stopped.
I recently started looking at lldb instead of gdb and it seems like it has some interesting features (plus it solved a CTF challenge that gdb couldn't). I haven't been using it much but I installed Voltron and noticed that the voltron stop hook did not run. Upon further inspection no stop hooks whatsoever will run (although they show up on the list).