qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH] Fix to 'gdb detach' stub


From: Kevin Wolf
Subject: Re: [Qemu-devel] Re: [PATCH] Fix to 'gdb detach' stub
Date: Tue, 23 Feb 2010 11:30:53 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1

Am 22.02.2010 22:22, schrieb Daniel Gutson:
> [Re-done with git.]
> 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 <address@hidden>
> ---
>   gdbstub.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/gdbstub.c b/gdbstub.c
> index 91c5f68..92bb36d 100644
> --- a/gdbstub.c
> +++ b/gdbstub.c
> @@ -1848,6 +1848,7 @@ static int gdb_handle_packet(GDBState *s, const 
> char *line_buf)

This line wrap corrupts the patch. Have you tried git send-email?

>       case 'D':
>           /* Detach packet */
>           gdb_breakpoint_remove_all();
> +       gdb_syscall_mode = GDB_SYS_DISABLED;

And indentation is off here (qemu uses four spaces, no tabs).

Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]