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)
commit2dc9776f829785b20795131c23e00aa30b264fa1
tree681cede804239696dace6fe0ccae0a2dee98edd4
parent8816302fbe757bbd1d0782c98de3120e443ef09f
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>
gdbstub.c