[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4] Add GDB qAttached support
From: |
Fabien Chouteau |
Subject: |
Re: [Qemu-devel] [PATCH v4] Add GDB qAttached support |
Date: |
Fri, 15 Mar 2013 13:02:04 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 |
On 03/14/2013 10:07 PM, Jesse Larrew wrote:
> On 03/14/2013 02:51 PM, Jan Kiszka wrote:
>> With this patch QEMU handles qAttached request from gdb. When QEMU
>> replies 1, GDB sends a "detach" command at the end of a debugging
>> session otherwise GDB sends "kill".
>>
>> The default value for qAttached is 1 on system emulation and 0 on user
>> emulation.
>>
>> Based on original version by Fabien Chouteau.
>>
>> Signed-off-by: Jan Kiszka <address@hidden>
>> ---
>>
>> As Fabien dropped his attempt to make this configurable, let's
>> preserve the value of exposing this feature to gdb statically.
>>
>> gdbstub.c | 10 ++++++++++
>> 1 files changed, 10 insertions(+), 0 deletions(-)
>>
>> diff --git a/gdbstub.c b/gdbstub.c
>> index e414ad9..9daee86 100644
>> --- a/gdbstub.c
>> +++ b/gdbstub.c
>> @@ -42,6 +42,12 @@
>> #include "sysemu/kvm.h"
>> #include "qemu/bitops.h"
>>
>> +#ifdef CONFIG_USER_ONLY
>> +#define GDB_ATTACHED "0"
>> +#else
>> +#define GDB_ATTACHED "1"
>> +#endif
>> +
>
> Yes, I like the #define better.
Right, since we drop reconfigurability, this is more appropriate.
--
Fabien Chouteau
- [Qemu-devel] [PATCH V3 2/3] Revert "gdbstub: Do not kill target in system emulation mode", (continued)
[Qemu-devel] [PATCH V3 1/3] Add GDB qAttached support, Fabien Chouteau, 2013/03/12