*** gdbstub.cc.orig Thu Oct 18 18:44:38 2007 --- gdbstub.cc Sat Jan 12 17:25:22 2008 *************** static void debug_loop(void) *** 489,494 **** --- 489,498 ---- { write_signal(&buf[1], SIGTRAP); } + else if (last_stop_reason == GDBSTUB_STOP_NO_REASON) + { + write_signal(&buf[1], SIGSEGV); + } else { write_signal(&buf[1], 0);