[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] gdbstub: Do not kill target in system emulation
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH] gdbstub: Do not kill target in system emulation mode |
Date: |
Tue, 22 Jan 2013 15:59:58 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2013-01-22 15:04, Fabien Chouteau wrote:
> Hello Qemu folks,
>
> I'm sorry to be (very) late, but I do not agree with this patch.
>
> Your modification just makes the "kill" command behave like "detach", so
> why not use "detach" instead?
gdb automatically issues kill when you quite. This is where most
casualties came from.
>
> "kill" has its own semantic and it's important to keep it. So I suggest
> we revert this patch.
Nack, see below why it does make sense now.
Jan
>
> Regards,
>
>> 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 <address@hidden>
>> ---
>> 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
>
--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux