A Hardware Debugger stub for your ZX Spectrum.
It allows you to debug speccy on "C" level with help of z88dk-gdb.
It requires Spectranet because it operates over the network.
Despite Spectranet requirement, it can be run on Fuse for win or FuseX for mac emulator. Note that the link refers to fork that supports gdbserver stub on its own, so for emulation with Fuse this might be unnecessary.
Spectranet releases past R1002
already have this module preinstalled.
It's a Spectranet module, once installed,
a BASIC extension %gdbserver
becomes available.
- When such command is run, it overrides NMI button handler.
- When NMI is pressed, it takes over and awaits for z88dk-gdb to connect. The NMI button could be pressed mid-execution of your program to examine stuff.
- z88dk-gdb can do pretty much anything expected from a gdb-alike client.
Have z88dk installed, and then do make
.
- Download ethup tool for linux, mac, win32, if you haven't already.
- Launch your spectrum (with spectranet), press the NMI button
- Select "B", then select "B" (replace) and Enter number of existing gdbserver module (for example, 9)
- Upload the binary using ethup:
ethup <spectrum ip> build/gdbserver__.bin
- Restart spectrum
Done, you can launch the gdbserver using basic %gdbserver
command.
Seeing an error? Make sure you've upgraded your spectranet first to at least R1002
revision!
- You can not place a breakpoint on read-only memory
- Programs that use Spectranet need to use non-paging version, e.g. page in and page out every time Spectranet functions are needed. Otherwise, breakpoints will only work one time and would need to be placed again after each break, if Spectranet is always paged in.
- 128K mode is not supported yet.