Re: [hatari-devel] Re: Debugger

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


Hi,

On sunnuntai 24 helmikuu 2013, Miro Kropáček wrote:
> OK, so I did a few experiments with the debugger. A lot of pain, a lot of
> tears but I see it coming. I guess over the time I'll come up with other
> questions, for now I'd be interested if it's possible to customize
> disassembly output somehow.

There are already some (commandline & debugger) options for disassembly
output.  But your comments below seem to be about disassembly input. :-)


> AFAIK, now I can enter only something "pc-'pc+20'" where +20 means
> +20 bytes what is not very user friendly.  I'm interested in:
> 
> - whole function ('d main' => list main())

As disassembly continues with enter, I don't think that's really
needed.   If you have symbols loaded (for 'main'), you see when
next function starts.

Gdb does that neither.


> - given number of instructions (something as 'd 20' => list next 20
> instructions)

This sounds reasonable & useful, but the syntax needs to be something
that works with what is already there and is consistent with other
commands.  Number given to "d" is address from which it should start
disassembling.

Maybe if it would be given as an extra number:
	d pc 20
?

How then this should be interpreted:
	d pc-"pc+40" 20

As an error?


> - list till the first jump command

With what syntax?


> (this would be cool by default)

IMHO better to be consistent with other commands and have fixed default
number of items to show at the same time.


> On the other hand, scrolling by 'ENTER', that's pretty cool (I imagine
> how great this were if I would skip by 'ENTER' to the next branch in the
> code..)

Debugger has large amount of commands.  I don't think binding
empty line to 'd' command would really be appreciated... :-)

Debugger has history, so you can just use Up + Enter, to repeat
previous command.


> Also, it's only coincidence or the disassembler ignores labels in jump
> commands? I can see "main:" at the top but for some reason I have never
> seen anything as "jsr PanelOpen" or so.

Markus Fritze contributed the currently used disassembler to Hatari,
but he used his own symbol code & files and completely ignored my requests
to support the symbol code that was already in Hatari debugger.  While his
code works great, I don't really like working with it (wierd TAB width
& indenting etc).

As he hasn't done anything for that code after his nice contribution in 
2010, patches to integrate debugger symbols with it would be appreciated.
:-)


On sunnuntai 24 helmikuu 2013, Miro Kropáček wrote:
> Another feature idea. Now I have to type:
> 
> b XbiosOpcode = $58
> 
> but 'info xbios' provides a nice list of XBIOS functions, so what about:
> 
> b XbiosOpcode = VsetMode
> 
> (first I tried 'b pc = VsetMode' but then I realized it's not a symbol
> but for XbiosOpcode I don't see a reason why it shouldn't work)

Problem with that is that symbols are visible to every command,
not just breakpoints, and e.g. symbols for XBios function numbers
make sense only as rvalues for that single virtual debugger variable.

Adding symbols for all the hundred(s) of TOS OS calls (there are a lot
of VDI ones), would really obfuscate things.  If they would be visible
only for corresponding virtual debugger OS opcode variable it would be
a great feature, but that would need too much changes to already complex
breakpoint code. :-/


	- Eero



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