Re: [hatari-devel] "next" and "step" commands to Hatari debugger?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On sunnuntai 04 marraskuu 2012, Thomas Huth wrote:
> schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> > "step" would basically be same as "c 1", so it's not useful unless
> > it can have a debugger shortcut command.  However, "s" shortcut
> > 
> > is currently used for:
> > 	savebin ( s) : save memory to a file
> > 
> > Would somebody object if I would change that shortcut?
> 
> Sounds like a very good idea to me! I was also annoyed already by always
> having to type "c 1" to single step through a program, so a "s" command
> for single-stepping would be highly appreciated! (savebin is certainly
> not needed so often, so it does not need a shortcut)

Commited.  The output seems a bit "plain" though as it outputs just
the normal debugger entry line and nothing else:
-----------
CPU=$e00cb6, VBL=435, FrameCycles=116, HBL=0, LineCycles=116, DSP=$51
> s

CPU=$e00cbc, VBL=435, FrameCycles=126, HBL=0, LineCycles=126, DSP=$51
> s

CPU=$e00cc0, VBL=435, FrameCycles=132, HBL=0, LineCycles=132, DSP=$51
> s

CPU=$e00cc4, VBL=435, FrameCycles=196, HBL=0, LineCycles=196, DSP=$51
>
-----------

> > "next" (continue to next instruction, used for passing subroutines)
> > would be done with current conditional breakpoints, I just need
> > to add an option to them to silence their output on creation,
> > hitting and removal of a temporary internal breakpoint...
> 
> That could be useful, too!

When you need it, very much so.  m68k instructions are variable
lenght so you cannot use something like:
	b pc = "pc+2" :once

And get that from history, currently you need either:
    b pc > "pc" && pc < "pc+8" :once		[1]
    c

Or each time check the next instruction address from disassembly and use:
	b pc = <exact value> :once
	c

And the output from creating, hitting and removal of these breakpoints
is hugely verbose.


	- Eero

[1] Assumes max. instruction legth is 8 bytes, I don't remember
    what's the actual max instruction len on m68k.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/