summaryrefslogtreecommitdiff
path: root/gdbstub.c
diff options
context:
space:
mode:
authorDaniel Gutson <dgutson@codesourcery.com>2010-02-26 14:13:50 -0300
committerAurelien Jarno <aurelien@aurel32.net>2010-02-27 16:10:41 +0100
commit7ea06da32be0d590dd4b4f3174d450431d1af0f1 (patch)
tree681cede804239696dace6fe0ccae0a2dee98edd4 /gdbstub.c
parentaa375206189b7de7c23ad9de66413fb7d4497940 (diff)
downloadqemu-7ea06da32be0d590dd4b4f3174d450431d1af0f1.tar.gz
Fix to 'gdb detach' stub
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>
Diffstat (limited to 'gdbstub.c')
-rw-r--r--gdbstub.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdbstub.c b/gdbstub.c
index 7c271f012c..7fb0fd3ca5 100644
--- 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;