+diff -u bochs-2.2.6.orig/gdbstub.cc bochs-2.2.6/gdbstub.cc
+--- bochs-2.2.6.orig/gdbstub.cc
++++ bochs-2.2.6/gdbstub.cc
+@@ -466,19 +466,19 @@ static void debug_loop(void)
+
+ BX_INFO (("stepping"));
+ stub_trace_flag = 1;
++ bx_cpu.ispanic = 0;
+ bx_cpu.cpu_loop(-1);
+ DEV_vga_refresh();
+ stub_trace_flag = 0;
+ BX_INFO (("stopped with %x", last_stop_reason));
+ buf[0] = 'S';
+- if (last_stop_reason == GDBSTUB_EXECUTION_BREAKPOINT ||
+- last_stop_reason == GDBSTUB_TRACE)
++ if (last_stop_reason == GDBSTUB_TRACE && !bx_cpu.ispanic)
+ {
+ write_signal(&buf[1], SIGTRAP);
+ }
+ else
+ {
+- write_signal(&buf[1], SIGTRAP);
++ write_signal(&buf[1], SIGSEGV);
+ }
+ put_reply(buf);
+ break;