[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 02/12] Return appropriate watch message to gdb
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] Re: [PATCH 02/12] Return appropriate watch message to gdb |
Date: |
Thu, 13 Nov 2008 23:55:55 +0100 |
User-agent: |
Thunderbird 2.0.0.17 (Windows/20080914) |
Anthony Liguori wrote:
> Jan Kiszka wrote:
>> Return the appropriate type prefix (r, a, none) when reporting
>> watchpoint hits to the gdb front-end.
>>
>
> 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
>
> Regards,
>
> Anthony Liguori
>
>> 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
>> @@ -1493,6 +1493,7 @@ static void gdb_vm_stopped(void *opaque,
>> {
>> GDBState *s = opaque;
>> char buf[256];
>> + const char *type;
>> int ret;
>>
>> if (s->state == RS_SYSCALL)
>> @@ -1503,8 +1504,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;
>>
>>
>>
>>
>
>
>
>
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH 04/12] Set mem_io_vaddr on io_read, Jan Kiszka, 2008/11/03