On 5 October 2014 23:07, Michael Walle <mich...@walle.cc> wrote:
> Am Sonntag, 5. Oktober 2014, 22:48:05 schrieb Peter Maydell:
>> On 5 October 2014 22:36, Peter Maydell <peter.mayd...@linaro.org> wrote:
>> > On 5 October 2014 22:00, Michael Walle <mich...@walle.cc> 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 <mich...@walle.cc> (for lm32)

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

-- PMM

Reply via email to