Attached is a patch to add the case for interrupting the gdbstub and
sending the correct signal to gdb.
The gdb serial protocol states that if you interrupt the stub with a
"control-c" in gdb that it should stop with S02 (SIGINT) to indicate
that it was interrupted. I also added the tlb flush so that
breakpoints can be written in correctly. I found that if I ran a
pentium qemu instance and broke in with gdb and planted a breakpoint at
do_fork() that it was not immediately hit due to the lack of the
flush. With the patch, it reliably stops all the time now when a
breakpoint is planted after interrupting the stub.
Thanks,
Jason.
Index: Changelog
===================================================================
RCS file: /sources/qemu/qemu/Changelog,v
retrieving revision 1.111
diff -u -r1.111 Changelog
--- Changelog 12 Apr 2006 21:09:31 -0000 1.111
+++ Changelog 17 Apr 2006 13:05:57 -0000
@@ -2,6 +2,7 @@
- USB tablet support (Brad Campbell, Anthony Liguori)
- win32 host serial support (Kazu)
+ - Fix SIGINT handler for gdbstub
version 0.8.0:
Index: gdbstub.c
===================================================================
RCS file: /sources/qemu/qemu/gdbstub.c,v
retrieving revision 1.34
diff -u -r1.34 gdbstub.c
--- gdbstub.c 5 Dec 2005 19:55:19 -0000 1.34
+++ gdbstub.c 17 Apr 2006 13:05:57 -0000
@@ -654,6 +654,9 @@
if (reason == EXCP_DEBUG) {
tb_flush(s->env);
ret = SIGTRAP;
+ } else if (reason == EXCP_INTERRUPT) {
+ tb_flush(s->env);
+ ret = SIGINT;
}
else
ret = 0;
_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel