[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/13] Return appropriate watch message to gdb
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH 01/13] Return appropriate watch message to gdb |
Date: |
Tue, 14 Oct 2008 11:12:24 +0200 |
User-agent: |
quilt/0.46_cvs20080326-19.1 |
Return the appropriate type prefix (r, a, none) when reporting
watchpoint hits to the gdb front-end.
Signed-off-by: Jan Kiszka <address@hidden>
---
gdbstub.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
Index: b/gdbstub.c
===================================================================
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1495,6 +1495,7 @@ static void gdb_vm_stopped(void *opaque,
{
GDBState *s = opaque;
char buf[256];
+ const char *type;
int ret;
if (s->state == RS_SYSCALL)
@@ -1505,8 +1506,20 @@ static void gdb_vm_stopped(void *opaque,
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].flags &
+ (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;
- [Qemu-devel] [PATCH 00/13] Enhance debugging support - 3rd take, Jan Kiszka, 2008/10/14
- [Qemu-devel] [PATCH 01/13] Return appropriate watch message to gdb,
Jan Kiszka <=
- [Qemu-devel] [PATCH 05/13] Introduce next_cflags, Jan Kiszka, 2008/10/14
- [Qemu-devel] [PATCH 06/13] Switch self-modified code recompilation to next_cflags, Jan Kiszka, 2008/10/14
- [Qemu-devel] [PATCH 03/13] Set mem_io_vaddr on io_read, Jan Kiszka, 2008/10/14
- [Qemu-devel] [PATCH 10/13] Introduce BP_WATCHPOINT_HIT flag, Jan Kiszka, 2008/10/14
- [Qemu-devel] [PATCH 12/13] Introduce BP_CPU as a breakpoint type, Jan Kiszka, 2008/10/14
- [Qemu-devel] [PATCH 02/13] Refactor and enhance break/watchpoint API, Jan Kiszka, 2008/10/14