Re: [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag

2014-10-06 Thread Peter Maydell
On 5 October 2014 23:07, Michael Walle wrote: > Am Sonntag, 5. Oktober 2014, 22:48:05 schrieb Peter Maydell: >> On 5 October 2014 22:36, Peter Maydell wrote: >> > On 5 October 2014 22:00, Michael Walle wrote: >> >> I can confirm that your patch makes qemu stop one instruction earlier. >> >> With

Re: [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag

2014-10-05 Thread Michael Walle
Am Sonntag, 5. Oktober 2014, 22:48:05 schrieb Peter Maydell: > On 5 October 2014 22:36, Peter Maydell wrote: > > On 5 October 2014 22:00, Michael Walle wrote: > >> I can confirm that your patch makes qemu stop one instruction earlier. > >> Without your patch the program is stopped at (3). With yo

Re: [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag

2014-10-05 Thread Peter Maydell
On 5 October 2014 22:36, Peter Maydell wrote: > On 5 October 2014 22:00, Michael Walle 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 th

Re: [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag

2014-10-05 Thread Peter Maydell
On 5 October 2014 22:00, Michael Walle wrote: > i've tested your patch on the lm32 target. > > My test program was like the following: > > mvhi r1, hi(0x1000) > ori r1, r1, lo(0x1000) > nop > nop > nop > nop > sw (r1+0), r0 ; (1) store some value to 0x1000 > nop; (2) > nop

Re: [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag

2014-10-05 Thread Michael Walle
Am Freitag, 12. September 2014, 19:04:17 schrieb Peter Maydell: > GDB assumes that watchpoint set via the gdbstub remote protocol will > behave in the same way as hardware watchpoints for the target. In > particular, whether the CPU stops with the PC before or after the insn > which triggers the wa

Re: [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag

2014-09-29 Thread Max Filippov
On Tue, Sep 16, 2014 at 9:16 AM, Max Filippov wrote: > On Mon, Sep 15, 2014 at 9:15 PM, Peter Maydell > wrote: >> On 15 September 2014 20:59, Max Filippov wrote: >>> I've tested xtensa part and have noticed no difference with or without >>> this patch: >>> gdb connected to qemu gdbstub always s

Re: [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag

2014-09-16 Thread Edgar E. Iglesias
On Fri, Sep 12, 2014 at 07:04:17PM +0100, Peter Maydell wrote: > GDB assumes that watchpoint set via the gdbstub remote protocol will > behave in the same way as hardware watchpoints for the target. In > particular, whether the CPU stops with the PC before or after the insn > which triggers the wat

Re: [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag

2014-09-15 Thread Max Filippov
On Mon, Sep 15, 2014 at 9:15 PM, Peter Maydell wrote: > On 15 September 2014 20:59, Max Filippov wrote: >> I've tested xtensa part and have noticed no difference with or without >> this patch: >> gdb connected to qemu gdbstub always stops right after the watched >> instruction. >> I guess that w

Re: [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag

2014-09-15 Thread Peter Maydell
On 15 September 2014 20:59, Max Filippov wrote: > I've tested xtensa part and have noticed no difference with or without > this patch: > gdb connected to qemu gdbstub always stops right after the watched > instruction. > I guess that without this patch I should have seen gdb stopping not right >

Re: [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag

2014-09-15 Thread Max Filippov
Hi Peter, On Fri, Sep 12, 2014 at 11:04 AM, Peter Maydell wrote: > GDB assumes that watchpoint set via the gdbstub remote protocol will > behave in the same way as hardware watchpoints for the target. In > particular, whether the CPU stops with the PC before or after the insn > which triggers the

[Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag

2014-09-12 Thread Peter Maydell
GDB assumes that watchpoint set via the gdbstub remote protocol will behave in the same way as hardware watchpoints for the target. In particular, whether the CPU stops with the PC before or after the insn which triggers the watchpoint is target dependent. Allow guest CPU code to specify which beha