* [Qemu-devel] [PATCH] gdbstub: Do not kill target in system emulation mode
@ 2012-03-06 17:32 Jan Kiszka
2012-03-11 16:08 ` Blue Swirl
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2012-03-06 17:32 UTC (permalink / raw)
To: qemu-devel, Anthony Liguori
Too many VM kittens were killed since 7d03f82f81. Another one just died
under my fat fingers.
When you quit a kgdb session, does the Linux kernel power off? Or when
you terminate gdb attached to a hardware debugger, does your board
vanish in space? No.
So let's stop terminating QEMU when the gdbstub receives a kill commando
in system emulation mode. Real termination can still be achieved via
"monitor quit". We keep the behavior for user mode emulation which is
arguably more like a gdbserver scenario.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
gdbstub.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gdbstub.c b/gdbstub.c
index 7d470b6..ef95ac2 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -2062,9 +2062,11 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
goto unknown_command;
}
case 'k':
+#ifdef CONFIG_USER_ONLY
/* Kill the target */
fprintf(stderr, "\nQEMU: Terminated via GDBstub\n");
exit(0);
+#endif
case 'D':
/* Detach packet */
gdb_breakpoint_remove_all();
--
1.7.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] gdbstub: Do not kill target in system emulation mode
2012-03-06 17:32 [Qemu-devel] [PATCH] gdbstub: Do not kill target in system emulation mode Jan Kiszka
@ 2012-03-11 16:08 ` Blue Swirl
0 siblings, 0 replies; 2+ messages in thread
From: Blue Swirl @ 2012-03-11 16:08 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel
Thanks, applied. I've been an accidental killer myself countless times.
On Tue, Mar 6, 2012 at 17:32, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Too many VM kittens were killed since 7d03f82f81. Another one just died
> under my fat fingers.
>
> When you quit a kgdb session, does the Linux kernel power off? Or when
> you terminate gdb attached to a hardware debugger, does your board
> vanish in space? No.
>
> So let's stop terminating QEMU when the gdbstub receives a kill commando
> in system emulation mode. Real termination can still be achieved via
> "monitor quit". We keep the behavior for user mode emulation which is
> arguably more like a gdbserver scenario.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> gdbstub.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/gdbstub.c b/gdbstub.c
> index 7d470b6..ef95ac2 100644
> --- a/gdbstub.c
> +++ b/gdbstub.c
> @@ -2062,9 +2062,11 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
> goto unknown_command;
> }
> case 'k':
> +#ifdef CONFIG_USER_ONLY
> /* Kill the target */
> fprintf(stderr, "\nQEMU: Terminated via GDBstub\n");
> exit(0);
> +#endif
> case 'D':
> /* Detach packet */
> gdb_breakpoint_remove_all();
> --
> 1.7.3.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-11 16:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06 17:32 [Qemu-devel] [PATCH] gdbstub: Do not kill target in system emulation mode Jan Kiszka
2012-03-11 16:08 ` Blue Swirl
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.