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: Mon, 6 Oct 2014 15:43:54 +0100

On 5 October 2014 23:07, Michael Walle <address@hidden> wrote:
> Am Sonntag, 5. Oktober 2014, 22:48:05 schrieb Peter Maydell:
>> 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.)
>
> Ah, now it makes sense :)
>
> Tested-by: Michael Walle <address@hidden> (for lm32)

Thanks to all for review/testing; applied to master.

-- PMM



reply via email to

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