-->

Equivalent of 'int 3' on ARM/iOS processor

2020-07-14 09:58发布

问题:

I'm looking for an equivalent of

__asm__ int 3
for ARM/iOS processors for when I'm debugging on a physical device. Is it BKPT? All I want to do is halt the processor so that I can then step past or continue execution at that point like I can with an int 3.

回答1:

According to an answer for the question Breaking into the debugger on iPhone the equivalent is asm("trap"). But see the other answers for different techniques.

Especially look into conditional breakpoints which is a less invasive method.