[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/2] Add GDB qAttached support
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/2] Add GDB qAttached support |
Date: |
Wed, 12 Mar 2014 17:58:06 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
Am 26.07.2013 20:26, schrieb Jan Kiszka:
> With this patch QEMU handles qAttached request from gdb. When QEMU
"With this patch" is always weird to read in Git history, also a
"gdbstub: " prefix would've been nice for consistency.
> 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.
If this is based on code by Fabien, shouldn't it carry his Signed-off-by
before yours?
Since "GDB stub" is in "Odd Fixes" state, maybe just step up as
maintainer and send a pull like for SLIRP? :)
Cheers,
Andreas
>
> Signed-off-by: Jan Kiszka <address@hidden>
> ---
>
> v2: Rebase over master
>
> gdbstub.c | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/gdbstub.c b/gdbstub.c
> index 35ca7c2..4a6cc51 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
> +
> static inline int target_memory_rw_debug(CPUState *cpu, target_ulong addr,
> uint8_t *buf, int len, bool
> is_write)
> {
> @@ -2489,6 +2495,10 @@ static int gdb_handle_packet(GDBState *s, const char
> *line_buf)
> break;
> }
> #endif
> + if (strncmp(p, "Attached", 8) == 0) {
> + put_packet(s, GDB_ATTACHED);
> + break;
> + }
> /* Unrecognised 'q' command. */
> goto unknown_command;
>
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- Re: [Qemu-devel] [PATCH v2 1/2] Add GDB qAttached support,
Andreas Färber <=