I'm trying to implement an assert macro that breaks into gdb, but does not call abort(). I would like to be able to continue running after the assert debugger break, which abort() will not allow me to do.
My Linux desktop code uses raise(SIGTRAP) and it works perfectly. But SIGTRAP on the Android emulator kills the signaling thread and *then* breaks into the debugger. I can't get a stack backtrace or continue running. I've found some web forums that say this as a known limitation of QEMU, but they don't provide any other suggestions.
I then tried using asm("bkpt") to break into gdb. This pauses the thread that hits the asm("bkpt"), but it does not break into gdb.
Are there any alternatives for implementing a software breakpoint?
thanks,
chris