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.
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.
When dealing with macOS ARM:
__builtin_debugtrap();
function should generate necessary break instruction.asm("brk #0x1");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With