Re: [hatari-devel] Re: Hatari debugging improvements / NatFeats Extension Patch

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


Hi,

I was thinking of some other potential debugging enhancements:

* Showing exception debugging indication in statusbar
  (maybe one letter per exception type)

* Keyboard shortcut for toggling exception debugging (AltGr + e)

* "autostart" setting for --debug-except option.  This would
  enable exception debugging automatically after TOS startup,
  if program autostarting is used.  It would be enabled at point
  when TOS loads the autostart modified INF file, exception
  generating TOS HW tests should then already have been done

* Loading debug symbols automatically when entering debugger, if:
  - there are no debug symbols
  - program counter is within program TEXT section
  - program has been started through GEMDOS emulation
    and its binary contains debug symbols

* Removing program's debug symbols when it terminates, if they
  had been loaded automatically or through "symbols prg"

Comments?

On keskiviikko 30 huhtikuu 2014, Nicolas Pomarède wrote:
> Le 30/04/2014 17:05, Mark Fechtner a écrit :
> > here's a small patch I'm using for quite some time now and that is (to
> > me at least) pretty helpfull while developing. Its a simple Native
> > Features command that allows the guest programm to control wether
> > Hatari is in fast forward mode or not.

Same functionality is provided also by XBios(255) which can be enabled
with "--bios-intercept".  Xbios(255) accepts string in same format as
Hatari control socket, and gives help on syntax errors.  These strings
can provide any debugger commands, for example with "setopt" command you
can set command line options like "--fast-forward".

Btw. natfeats.c code has NF_DEBUGGER command with same functionality as
Xbios(255).  However, NF_DEBUGGER is ifdeffed out, because I'm not sure
whether access to all debugger features actually gives too much control
for the emulated programs.  With debugger commands (e.g. for saving data
from RAM) it's possible to overwrite files on host file system etc.

I had though to replace XBios(255) with NF_DEBUGGER, but maybe it's better
to keep these APIs separate:
- Xbios(255) continues provide string based access to all debugger
  features
- NatFeats provides more standardized & structured access to most
  useful subset of Hatari functionality, but nothing that would allow
  emulated code to harm host

So, I think I'll remove NF_DEBUGGER stuff from natfeats.c, and add
instead there more explicit commands.  Any wishes on that front, what
you would think to be most useful?

Potentially useful NF commands for debugging could be for example for:
- setting tracing options
- setting (CPU) history tracking
- pausing [1]
- slowdown [2]
- screenshot [3]

Opinions?

[1] if program takes long time to get to the interesting point, it
    could automatically pause emulation when that has been reached
    so that you can go to coffee while waiting for that. :-)

[2] I was thinking that I could add a new option to slow down Hatari
    execution, which would do a small additional wait on each VBL.

[3] This causes file to be written to host disk, but as directory for
    that is predefined and fine name autogenerated, most it can do is
    fill the disk


	- Eero



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