Re: [hatari-devel] OT: My dream about Hatari |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On torstai 18 heinäkuu 2013, Miro Kropáček wrote:
> On Thu, Jul 18, 2013 at 7:45 AM, Miro Kropáček
<miro.kropacek@xxxxxxxxx>wrote:
> > OK, but how do you *modify* memory, regs, PC, ... ? Maybe it's just me
> > being so strange but I love to modify these things in place, i.e. I see
> > something went wrong, I directly inject the right value into the
> > regs/mem to see whether my algorithm is wrong or input data. Also, is
> > there a function like "step over" / "step skip" ? Again, sometimes is
> > very useful to skip some subroutines to avoid memory/register trashing
If you don't want to execute some routine, you can set PC to address after
its branch.
Debugger has nowadays a variable for next PC address named "NextPC",
so you could use following to skip executing current instruction [1]:
r pc = "nextpc"
And then continue stepping the code.
However, I don't think this use-case is very common, you would do it just
for some specific case, so having easy shortcut for it is IMHO less
important.
If you want to disable specific call sites at run-time without recompiling
code or manual stepping, you can automate that. Just set breakpoint for
the address where calling happens, and make that parse file doing above:
b pc = callsite :trace :file skip-call.ini
In that "skip-call.ini" file you can, besides manipulating pc to skip
the call, also set other register values to simulate some other effects
of that call.
> > or just execute the routine but still being able to go step by step.
Use "n" command.
> I'll reply to myself: RTFM :-) So after reading TFM, I see that apart
> from "step skip" it seems to be there, even dsp memory/reg write, hmm.
"Run until" convenience command from Most is also missing.
In Hatari you need to use this instead:
a <address> :once
c
Now that we have "next" command that internally uses breakpoints,
I could maybe add support to "n" command for running until next
specific instruction is encountered, for example:
n jsr
n rts
n trap
n rte
Alternatively these shortcuts could be for certain categories
of instructions. Then their names would be different, e.g:
- "branch" would match jmp, bra, bcc, dbcc, fbcc, fdbcc
- "subcall" would match jsr & bsr
- "subreturn" would match rts, rtr, rtd
- "exception" could match trap, trapv, ftrapcc, stop, illg, chk, chk2, bkpt
- "exreturn" would match rte
(And similar functionality for DSP, except for exception calls.)
> LOD support as well, hmm. It seems everything is in there but very well
> hidden
- Eero
[1] Admittedly use of '"' for indicating that given string's value should
be evaluated differs from other Atari debuggers, e.g. Monst uses {} for
the same thing.
It's probably too late to change it now though.