From: "Andreas Färber" <afaerber@suse.de>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>,
Fabien Chouteau <chouteau@adacore.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/2] Add GDB qAttached support
Date: Wed, 12 Mar 2014 17:58:06 +0100 [thread overview]
Message-ID: <5320921E.2080307@suse.de> (raw)
In-Reply-To: <51F2BF4F.8030107@siemens.com>
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 <jan.kiszka@siemens.com>
> ---
>
> 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
next prev parent reply other threads:[~2014-03-12 16:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-17 8:10 [Qemu-devel] [PATCH 1/2][RESENT] Add GDB qAttached support Jan Kiszka
2013-07-17 8:11 ` [Qemu-devel] [PATCH 2/2][RESENT] Revert "gdbstub: Do not kill target in system emulation mode" Jan Kiszka
2013-07-26 18:26 ` [Qemu-devel] [PATCH v2 1/2] Add GDB qAttached support Jan Kiszka
2014-03-12 16:58 ` Andreas Färber [this message]
2014-03-12 17:31 ` Jan Kiszka
2014-03-12 17:50 ` Peter Maydell
2014-03-12 7:37 ` [Qemu-devel] [PATCH 1/2][RESENT] " Jan Kiszka
2014-03-12 16:47 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5320921E.2080307@suse.de \
--to=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=chouteau@adacore.com \
--cc=jan.kiszka@siemens.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).