I think the patch you posted doesn't really address the core problem. (For example, it might not help if there are already two single-step breakpoint outstanding.)
The underlying issue seems to rather be that handle_inferior_event does not always clean up single-step breakpoints as it should. I've noticed and fixed a couple of such problems a while ago here: http://sourceware.org/ml/gdb-patches/2010-06/msg00481.html
but this patch still did not handle the TARGET_WAITKIND_VFORK_DONE case. It seems that this case also should remove the single-step breakpoints.
I think the patch you posted doesn't really address the core problem. (For example, it might not help if there are already two single-step breakpoint outstanding.)
The underlying issue seems to rather be that handle_ inferior_ event does not always clean up single-step breakpoints as it should. I've noticed and fixed a couple of such problems a while ago here: sourceware. org/ml/ gdb-patches/ 2010-06/ msg00481. html
http://
but this patch still did not handle the TARGET_ WAITKIND_ VFORK_DONE case. It seems that this case also should remove the single-step breakpoints.