qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] gdbstub: allow killing QEMU via vKill comman


From: Luc Michel
Subject: Re: [Qemu-devel] [PATCH v2] gdbstub: allow killing QEMU via vKill command
Date: Thu, 31 Jan 2019 17:15:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 1/30/19 8:24 PM, Max Filippov wrote:
> With multiprocess extensions gdb uses 'vKill' packet instead of 'k' to
> kill the inferior. Handle 'vKill' the same way 'k' was handled in the
> presence of single process.
> 
> Fixes: 7cf48f6752e5 ("gdbstub: add multiprocess support to
> (f|s)ThreadInfo and ThreadExtraInfo")
> 
> Cc: Luc Michel <address@hidden>
> Signed-off-by: Max Filippov <address@hidden>
Reviewed-by: Luc Michel <address@hidden>

> ---
> Changes v1->v2:
> - terminate QEMU in the vKill packet handler regardless of whatever the
>   PID is or how many processes are attached [Luc Michel]
> 
>  gdbstub.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/gdbstub.c b/gdbstub.c
> index bfc7afb50968..96ffcd9d9d1d 100644
> --- a/gdbstub.c
> +++ b/gdbstub.c
> @@ -1383,6 +1383,10 @@ static int gdb_handle_packet(GDBState *s, const char 
> *line_buf)
>  
>              put_packet(s, buf);
>              break;
> +        } else if (strncmp(p, "Kill;", 5) == 0) {
> +            /* Kill the target */
> +            error_report("QEMU: Terminated via GDBstub");
> +            exit(0);
>          } else {
>              goto unknown_command;
>          }
> 

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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