Two handy GDB breakpoint tricks
January 28, 2024
nullprogram.com/blog/2024/01/28/
Over the past couple months I’ve discovered a couple of handy tricks for
working with GDB breakpoints. I figured these out on my own, and I’ve not
seen either discussed elsewhere, so I really ought to share them.
Continuable assertions
The assert macro in typical C implementations leaves a lot to be
desired, and so I’ve suggested alternative definitions that
behave better under debuggers:
#define assert(c) while (!(c)) __builtin_trap()
#define a...
Read more at nullprogram.com