Hacker News new | ask | show | jobs
by zootboy 875 days ago
I've been using this macro with GCC / GDB for years without running into the issue you're describing:

#define DEBUG_BREAK() do{__asm__("BKPT");} while(0)

I can continue just fine with it. Granted, this is on the various Cortex M0/M3/M4 chips, so I can't say for sure if it works on any of the bigger, fancier ARMs.

1 comments

I think it's a difference between ARMv8 and ARMv6/7 (I believe BKPT on ARMv6/7 sets the exception return address to `addr(instruction)+4`).