From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0l6V-0005yG-Um for qemu-devel@nongnu.org; Thu, 13 Nov 2008 17:56:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0l6U-0005xb-9M for qemu-devel@nongnu.org; Thu, 13 Nov 2008 17:55:59 -0500 Received: from [199.232.76.173] (port=58891 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0l6U-0005xX-4i for qemu-devel@nongnu.org; Thu, 13 Nov 2008 17:55:58 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:37459) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L0l6T-0000BY-Ib for qemu-devel@nongnu.org; Thu, 13 Nov 2008 17:55:57 -0500 Message-ID: <491CB07B.6050906@web.de> Date: Thu, 13 Nov 2008 23:55:55 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <20081103103558.213902776@mchn012c.ww002.siemens.net> <20081103103558.776161757@mchn012c.ww002.siemens.net> <491C91EA.4000102@codemonkey.ws> In-Reply-To: <491C91EA.4000102@codemonkey.ws> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig86C3CB699B53F3A9F6399DD3" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH 02/12] Return appropriate watch message to gdb Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jan Kiszka This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig86C3CB699B53F3A9F6399DD3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Anthony Liguori wrote: > Jan Kiszka wrote: >> Return the appropriate type prefix (r, a, none) when reporting >> watchpoint hits to the gdb front-end. >> =20 >=20 > This doesn't build on it's own (there is no flags field in watchpoint).= Oh, typo while once moving this to the head of the queue: s/flags/type/. Will fix, or reorder. Jan >=20 > Regards, >=20 > Anthony Liguori >=20 >> Signed-off-by: Jan Kiszka >> --- >> gdbstub.c | 17 +++++++++++++++-- >> 1 file changed, 15 insertions(+), 2 deletions(-) >> >> Index: b/gdbstub.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- a/gdbstub.c >> +++ b/gdbstub.c >> @@ -1493,6 +1493,7 @@ static void gdb_vm_stopped(void *opaque, >> { >> GDBState *s =3D opaque; >> char buf[256]; >> + const char *type; >> int ret; >> =20 >> if (s->state =3D=3D RS_SYSCALL) >> @@ -1503,8 +1504,20 @@ static void gdb_vm_stopped(void *opaque, >> =20 >> if (reason =3D=3D EXCP_DEBUG) { >> if (s->env->watchpoint_hit) { >> - snprintf(buf, sizeof(buf), "T%02xwatch:" TARGET_FMT_lx ";= ", >> - SIGTRAP, >> + switch (s->env->watchpoint[s->env->watchpoint_hit - >> 1].flags & >> + (PAGE_READ | PAGE_WRITE)) { >> + case PAGE_READ: >> + type =3D "r"; >> + break; >> + case PAGE_READ | PAGE_WRITE: >> + type =3D "a"; >> + break; >> + default: >> + type =3D ""; >> + break; >> + } >> + snprintf(buf, sizeof(buf), "T%02x%swatch:" TARGET_FMT_lx >> ";", >> + SIGTRAP, type, >> s->env->watchpoint[s->env->watchpoint_hit - >> 1].vaddr); >> put_packet(s, buf); >> s->env->watchpoint_hit =3D 0; >> >> >> >> =20 >=20 >=20 >=20 >=20 --------------enig86C3CB699B53F3A9F6399DD3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkcsHsACgkQniDOoMHTA+nHRgCeMqBCjzE46VSCWInqkLNGgyIK SzYAoIEqjBxCEn7kJt+/PnSaWSd/KaeC =dUqT -----END PGP SIGNATURE----- --------------enig86C3CB699B53F3A9F6399DD3--