On Thu, 09 Sep 2010 17:50:47 +0200, Oleg Nesterov wrote: > Probably I need to implement G/P first, otherwise gdb can't change ip. > > Still, I'd appreciate if someone can explain me what gdb needs/expects > to handle breakpoints before I start to read the sources.
Yes, GDB tries to set PC to PC-1 to skip back after the hit of 0xCC. As it fails to fix-up PC then PC is wrong and trap_expected is then 0 (it should be 1) and everything fails. BTW ugdb needs one simple fix. :-) (gdb) p/x done=0x5a $1 = 0xa5 Thanks, Jan