How do I set a software breakpoint on an ARM processor?

arm, assembly, debugging, gdb

Solution

Using arm-none-eabi-gdb.exe cross compiler, this works great for me (thanks to Igor's answer):

__asm__("BKPT");

Problem

How do I do the equivalent of an x86 software interrupt: ``` asm( "int $3" ) ``` on an ARM processor (specifically a Cortex A8) to generate an event that will break execution under gdb?

Original source

Related problems