[hatari-devel] saving/restoring memory state from debugger
Eero Tamminen
eerot at users.berlios.de
Mon Feb 8 22:31:46 CET 2010
Hi,
On Monday 08 February 2010, npomarede at corp.free.fr wrote:
> while using the debugger, I wanted to reach a certain breakpoint, then
> save the exact content of Hatari at that point (to be able to reload it
> later using --memstate + lots of traces).
>
> This is not possible with current code, as I would need to return to
> emulation and quickly press F12 to save Hatari's memory state, which
> means 68000 would not be in the same state it was at the time of my
> breakpoint.
>
> Eero, could you add a "savestate/loadstate" (or whatever you prefer) to
> be able to take a memory snapshot of Hatari
Sure, I commited support for that.
> (I'm not sure loading the memory state from the debugger is that useful,
> so maybe "loadstate" can be forgotten) ?
That was only few trivial lines more, so I added it for symmetry's sake. :-)
Btw. the debugger has now also support for things like:
b pc > pc
Where it will replace the right side of the comparison with the current
value of the expression (in this case, current value of PC) when the
breakpoint is added. '!' comparison will still track (output & break on)
changes to previous value, '<', '>' & '=' will break based on the original
value.
For example if you want to track loop execution, use something like
this:
trace cpu_disasm
b pc = pc
c
and it will break once on each loop round.
Whereas the first example ("b pc>pc") can be used to get out of the loop
when it's given at the last instruction/branch.
- Eero
More information about the hatari-devel
mailing list