qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoin


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag
Date: Sun, 5 Oct 2014 22:48:05 +0100

On 5 October 2014 22:36, Peter Maydell <address@hidden> wrote:
> On 5 October 2014 22:00, Michael Walle <address@hidden> wrote:
>> I can confirm that your patch makes qemu stop one instruction earlier. 
>> Without
>> your patch the program is stopped at (3). With your patch applied the program
>> is stopped at (2). But I guess the correct point to stop is (1), right?
>
> No, gdb wants execution to stop with the PC just after the
> instruction which issued the memory access, with whatever
> effects the instruction had having already taken place.
> So (2) is correct. (I think nicer UI would indeed be to
> stop at (1) but you can't get that effect on CPUs like
> x86 which only stop after the wp insn has executed, and
> they'd rather be consistent.)

...and incidentally the way it achieves this for "stop before
wp insn" CPU targets is that it unsets the watchpoint
and automatically steps one instruction before returning
control to the gdb user. (You can see this if you turn
gdb's remote-protocol debug on.)

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]