News for hackers. Stuff that matters.
Re:Two handy GDB breakpoint tricks by zootboy on Monday January 29, 2024 @02:07AM (#39173574)
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.

Re:Two handy GDB breakpoint tricks by zyedidia on Monday January 29, 2024 @03:24AM (#39174028)
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`).