qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Fabien Chouteau <chouteau@adacore.com>
Subject: Re: [Qemu-devel] [PATCH v4] Add GDB qAttached support
Date: Wed, 01 May 2013 16:18:38 +0200	[thread overview]
Message-ID: <5181243E.7080305@web.de> (raw)
In-Reply-To: <51422A3D.7000308@siemens.com>

[-- Attachment #1: Type: text/plain, Size: 1630 bytes --]

On 2013-03-14 20:51, 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.
> 

Ping for this and the revert of "gdbstub: Do not kill target in system
emulation mode".

Jan

> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> 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
> +
>  #ifndef TARGET_CPU_MEMORY_RW_DEBUG
>  static inline int target_memory_rw_debug(CPUArchState *env, target_ulong addr,
>                                           uint8_t *buf, int len, int is_write)
> @@ -2491,6 +2497,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;
>  
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  parent reply	other threads:[~2013-05-01 14:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12 17:31 [Qemu-devel] [PATCH V3 0/3] Add GDB qAttached support Fabien Chouteau
2013-03-12 17:31 ` [Qemu-devel] [PATCH V3 1/3] " Fabien Chouteau
2013-03-14 19:51   ` [Qemu-devel] [PATCH v4] " Jan Kiszka
2013-03-14 21:07     ` Jesse Larrew
2013-03-15 12:02       ` Fabien Chouteau
2013-03-19 10:37         ` Fabien Chouteau
2013-05-01 14:18     ` Jan Kiszka [this message]
2013-03-12 17:31 ` [Qemu-devel] [PATCH V3 2/3] Revert "gdbstub: Do not kill target in system emulation mode" Fabien Chouteau
2013-03-14 19:52   ` Jan Kiszka
2013-03-12 17:31 ` [Qemu-devel] [PATCH V3 3/3] New option -gdb-opts Fabien Chouteau
2013-03-14  8:44   ` Markus Armbruster
2013-03-14 10:59     ` Fabien Chouteau
2013-03-14 12:34       ` Markus Armbruster
2013-03-14 16:33         ` Fabien Chouteau
2013-03-19 14:31           ` Markus Armbruster

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=5181243E.7080305@web.de \
    --to=jan.kiszka@web.de \
    --cc=aliguori@us.ibm.com \
    --cc=chouteau@adacore.com \
    --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).