[hatari-devel] Debugger breakpoints for Hatari variables too?

Eero Tamminen eerot at users.berlios.de
Mon Aug 3 22:53:47 CEST 2009


Hi,

On Sunday 02 August 2009, Eero Tamminen wrote:
> On Friday 31 July 2009, npomarede at corp.free.fr wrote:
> > By the way, there's a possibility that I think would be quite useful :
> > to be able to use Hatari's variable as breakpoint condition.
> >
> > The 2 variables I'm thinking about for now are nVBLs and nHBL, as
> > sometimes you know a problem will happen after a certain time, or only
> > at a certain line, so doing something like :
> >
> > VBL=30 && HBL=263 && ( $ff820a ) = 0
> >
> > would be really cool.

Commited first version to repo.   Please test that it works properly.


> > Certainly some other variables could be exported this way, with a
> > simple table to associate a string to a pointer to that variable (we
> > could assume it's always 'int' size).
>
> Debugger already support 8, 16 & 32-bit variables, so that's not
> a problem.

Well, "int" is actually a problem because on 64-bit machines it's 64-bit.
Should the variables be changed to 32-bit or should I add support for
(potentially) 64-bit values to breakpoint code?

(Current breakcond code will give a compilation error on 64-bit.)


> > Would change the parser and the breakpoint evaluation function, so I'm
> > not sure if it could be done before release (Eero ?)
>
> I don't see why not. I just need a function that maps variable names to
> their addresses & sizes and call that if name didn't match to a register.
>
> First I'd like a bit more complete list of all the variables that you,
> Thomas, Laurent etc would want to be available to the debugger though...
> For the release this will support only global variables.

And if current version works fine, what other variables you'd like to
break on (which don't have corresponding ST registers)?


	- Eero



More information about the hatari-devel mailing list