条件断点如下:br com add 1>po (char *)$r0>c>DONE
运行效果如下:
(lldb) po (char *)$r0
“hook1”
(lldb) c
Process 26623 resuming
Command #2 ‘c’ continued the target.
(lldb) po (char *)$r0
“hook2”
(lldb) c
Process 26623 resuming
Command #2 ‘c’ continued the target.
(lldb) po (char *)$r0
“hook3”
(lldb) c
Process 26623 resuming
Command #2 ‘c’ continued the target.
Process 26623 stopped
- thread #1: tid = 0x2d5ed, 0x2cba03a4 CoreFoundation
__CFRunLoopServiceMachPort + 284, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_ARM_BREAKPOINT, subcode=0xdefe) frame #0: 0x2cba03a4 CoreFoundation
__CFRunLoopServiceMachPort + 284
CoreFoundation`__CFRunLoopServiceMachPort:
→ 0x2cba03a4 <+284>: trap
0x2cba03a6 <+286>: nop
CoreFoundation`CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE:
0x2cba03a8 <+0>: push {r7, lr}
0x2cba03aa <+2>: mov r7, sp
(lldb)
后面就直接崩溃了,每次都这样 为啥呢?