* [Qemu-devel] [PATCH v2] gdbstub: allow killing QEMU via vKill command
@ 2019-01-30 19:24 Max Filippov
2019-01-31 16:15 ` Luc Michel
2019-02-04 17:40 ` Peter Maydell
0 siblings, 2 replies; 4+ messages in thread
From: Max Filippov @ 2019-01-30 19:24 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, KONRAD Frederic, Max Filippov, Luc Michel
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 <luc.michel@greensocs.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
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;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] gdbstub: allow killing QEMU via vKill command
2019-01-30 19:24 [Qemu-devel] [PATCH v2] gdbstub: allow killing QEMU via vKill command Max Filippov
@ 2019-01-31 16:15 ` Luc Michel
2019-02-01 10:44 ` KONRAD Frederic
2019-02-04 17:40 ` Peter Maydell
1 sibling, 1 reply; 4+ messages in thread
From: Luc Michel @ 2019-01-31 16:15 UTC (permalink / raw)
To: Max Filippov, qemu-devel; +Cc: Peter Maydell, KONRAD Frederic
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
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 <luc.michel@greensocs.com>
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
> ---
> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] gdbstub: allow killing QEMU via vKill command
2019-01-31 16:15 ` Luc Michel
@ 2019-02-01 10:44 ` KONRAD Frederic
0 siblings, 0 replies; 4+ messages in thread
From: KONRAD Frederic @ 2019-02-01 10:44 UTC (permalink / raw)
To: Max Filippov; +Cc: Luc Michel, qemu-devel, Peter Maydell
Le 1/31/19 à 5:15 PM, Luc Michel a écrit :
> 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 <luc.michel@greensocs.com>
>> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> Reviewed-by: Luc Michel <luc.michel@greensocs.com>
Reviewed-by: KONRAD Frederic <frederic.konrad@adacore.com>
Tested-By: KONRAD Frederic <frederic.konrad@adacore.com>
Thanks!
Fred
>
>> ---
>> 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;
>> }
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] gdbstub: allow killing QEMU via vKill command
2019-01-30 19:24 [Qemu-devel] [PATCH v2] gdbstub: allow killing QEMU via vKill command Max Filippov
2019-01-31 16:15 ` Luc Michel
@ 2019-02-04 17:40 ` Peter Maydell
1 sibling, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2019-02-04 17:40 UTC (permalink / raw)
To: Max Filippov; +Cc: QEMU Developers, KONRAD Frederic, Luc Michel
On Wed, 30 Jan 2019 at 19:24, Max Filippov <jcmvbkbc@gmail.com> 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 <luc.michel@greensocs.com>
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
> Changes v1->v2:
> - terminate QEMU in the vKill packet handler regardless of whatever the
> PID is or how many processes are attached [Luc Michel]
>
Thanks; I'll take this via target-arm.next since I took the
multiprocess-support gdbstub patches.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-04 17:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-30 19:24 [Qemu-devel] [PATCH v2] gdbstub: allow killing QEMU via vKill command Max Filippov
2019-01-31 16:15 ` Luc Michel
2019-02-01 10:44 ` KONRAD Frederic
2019-02-04 17:40 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).