]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Fix to 'gdb detach' stub
authorDaniel Gutson <dgutson@codesourcery.com>
Fri, 26 Feb 2010 17:13:50 +0000 (14:13 -0300)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 27 Feb 2010 15:10:41 +0000 (16:10 +0100)
With this patch, 'gdb detach' correctly resumes the inferior execution
after detaching the debugger.
The bug was caused by qemu asking gdb to execute a syscall (isatty)
after the detach, and then waiting (forever) for the reply. I fixed this
by properly setting gdb_syscall_mode appropriately in the 'detach'
packet handling, so subsequent syscalls are solved by qemu rather than gdb.

Signed-off-by: Daniel Gutson <dgutson@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
gdbstub.c

index 7c271f012c86c07dde71814e6baec504f1440a34..7fb0fd3ca5848cd6483c4b6c73996a32b33b18d1 100644 (file)
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1868,6 +1868,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
     case 'D':
         /* Detach packet */
         gdb_breakpoint_remove_all();
+        gdb_syscall_mode = GDB_SYS_DISABLED;
         gdb_continue(s);
         put_packet(s, "OK");
         break;