From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF11v-0001pm-SG for qemu-devel@nongnu.org; Mon, 11 Mar 2013 07:36:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UF11r-0005AU-KP for qemu-devel@nongnu.org; Mon, 11 Mar 2013 07:36:35 -0400 Received: from mout.web.de ([212.227.15.3]:61588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF11r-0005AA-B8 for qemu-devel@nongnu.org; Mon, 11 Mar 2013 07:36:31 -0400 Message-ID: <513DC1B8.5000801@web.de> Date: Mon, 11 Mar 2013 12:36:24 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1362499399-19475-1-git-send-email-chouteau@adacore.com> <513C3F11.5060501@web.de> <513DBE81.2060001@adacore.com> In-Reply-To: <513DBE81.2060001@adacore.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2CPUKTPFKVRXSUOACNCCN" Subject: Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fabien Chouteau Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2CPUKTPFKVRXSUOACNCCN Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2013-03-11 12:22, Fabien Chouteau wrote: > On 03/10/2013 09:06 AM, Jan Kiszka wrote: >>> @@ -2491,6 +2493,10 @@ static int gdb_handle_packet(GDBState *s, cons= t char *line_buf) >>> break; >>> } >>> #endif >>> + if (strncmp(p, "Attached", 8) =3D=3D 0) { >>> + put_packet(s, gdb_attached ? "1" : "0"); >>> + break; >>> + } >> >> This works as expected for system mode, but now inverts the behaviour >> for user mode - that's unexpected and not ok. >> >=20 > OK, I can change the default value for user mode. >=20 >>> diff --git a/qemu-options.hx b/qemu-options.hx >>> index 6f9334a..026d3eb 100644 >>> --- a/qemu-options.hx >>> +++ b/qemu-options.hx >>> @@ -2988,6 +2988,13 @@ property must be set. These objects are place= d in the >>> '/objects' path. >>> ETEXI >>> >>> +DEF("gdb-not-attached", 0, QEMU_OPTION_gdb_not_attached, >>> + "-gdb-not-attached\n" >>> + " Do not set Gdb remote server in attached mode.\= n" >>> + " When exiting debugging session, Gdb will send a= 'kill'\n" >>> + " command instead of a 'detach'.\n", >>> + QEMU_ARCH_ALL) >>> + >> >> First of all, why do we need this configurable? In which use cases do >> you want attached mode for user emulation or kill mode for system >> emulation/virtualization? >> >=20 > It's more convenient for us, we expect QEMU to terminate at the end of > debugging session because we do not run big systems/kernels but short > test programs. It used to be the default behavior of QEMU, and our > test-suites, IDE, developers and users are expecting this. And it's not possible to replace 'q' with 'k' in your gdb control scripts? That gives you a well-defined behaviour, and we don't need to tweak QEMU, specifically its command line, for this special case. Jan ------enig2CPUKTPFKVRXSUOACNCCN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlE9wbsACgkQitSsb3rl5xQP+wCgw4oisFnl4rqvNxSDHtyIF7+Q kT4An3di73vScI7EIP9Ow0IVJ7HzqssR =EokN -----END PGP SIGNATURE----- ------enig2CPUKTPFKVRXSUOACNCCN--