* [Qemu-devel] [5737] gdbstub: Return appropriate watch message to gdb (Jan Kiszka)
@ 2008-11-18 19:55 Anthony Liguori
0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2008-11-18 19:55 UTC (permalink / raw)
To: qemu-devel
Revision: 5737
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5737
Author: aliguori
Date: 2008-11-18 19:55:44 +0000 (Tue, 18 Nov 2008)
Log Message:
-----------
gdbstub: Return appropriate watch message to gdb (Jan Kiszka)
Return the appropriate type prefix (r, a, none) when reporting
watchpoint hits to the gdb front-end.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Modified Paths:
--------------
trunk/gdbstub.c
Modified: trunk/gdbstub.c
===================================================================
--- trunk/gdbstub.c 2008-11-18 19:46:41 UTC (rev 5736)
+++ trunk/gdbstub.c 2008-11-18 19:55:44 UTC (rev 5737)
@@ -1493,6 +1493,7 @@
{
GDBState *s = opaque;
char buf[256];
+ const char *type;
int ret;
if (s->state == RS_SYSCALL)
@@ -1503,8 +1504,20 @@
if (reason == 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].type &
+ (PAGE_READ | PAGE_WRITE)) {
+ case PAGE_READ:
+ type = "r";
+ break;
+ case PAGE_READ | PAGE_WRITE:
+ type = "a";
+ break;
+ default:
+ type = "";
+ 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 = 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-18 19:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-18 19:55 [Qemu-devel] [5737] gdbstub: Return appropriate watch message to gdb (Jan Kiszka) Anthony Liguori
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).