maziac / DeZog

Visual Studio Code Debugger for Z80/ZX Spectrum.
MIT License
212 stars 35 forks source link

remoteType=cspect: watchpoints, unit tests #18

Open maziac opened 4 years ago

maziac commented 4 years ago

DeZog/CSpect (v2.12.22):

maziac commented 4 years ago

Here is a way to reproduce the problem even without DeZog or the DeZog plugin involved. z80-sample-program.nex.zip

    org $8000
main:
    ; Disable interrupts
    ;di
    ei
    defb 0xDD, 0x01 ; CSpect break
    ld sp,stack_top

    ; CLS
    call clear_screen

Now I start CSpect (2.12.22): mono CSpect.exe -w4 -exit -brk -tv z80-sample-program.nex

And set a read-breakpoint at 0x8023.

Bildschirmfoto_2020-04-30_um_10 46 51

Then I step (F8). The debugger right away jumps into the interrupt. And I step over (F8) the complete interrupt.

image

And step-out.

image

Now it becomes interesting. The next step (F8) does not step-over the "LD SP,..." but again brings me to the ISR:

image

Stepping out and trying to step-over "LD SP,..." again leads to the same result: It is not possible to step-over "LD SP,...".

If I use the same program but disable the interrupts at the start (DI) then the debugger doesn't enter the ISR but it is also not possible to step-over the "LD SP,...".

Note: "LD SP,..." is here just by accident, I experienced this behavior also for other instructions.

maziac commented 3 years ago

Watchpoint are disabled for cspect and unit tests now. Still the issue remains in cspect.

maziac commented 1 year ago

The described behavior (screen shots) is different with CSpect 2.16.6. Anyhow I ran into a similar problem (was not able to step over an instruction) when enabling watchpoints. So, the problem seems to remain. The Watchpoints keep being disabled also for DeZog 3.0 for CSpect.