Re: [hatari-devel] AES/VDI breakpoints (was: Add some NVDI function names)

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


Hi,

On 10/11/20 11:54 PM, Eero Tamminen wrote:
On 10/11/20 11:01 PM, Eero Tamminen wrote:
...
Btw. Using breakpoints for this is currently
pretty awkward because VDI_Info() relies on
variables set only after VDI opcode is processed
by Hatari, but breakpoints are triggered before
trap opcodes are processed by Hatari.

Therefore one needs to do it like this:
[...]

I think better approach would be to simplify this,
so that something like this would be enough:
--------------------------------
b VdiOpcode = $64 :quiet :trace :info vdi_opcode
--------------------------------

(Where ":info" doesn't require changing debugger
entry information, and "vdi_opcode" calls a
function that:
- barfs if PC is not at VDI opcode
- unlike VDI_Info(), works when execution is *at*
   the opcode, not after it

(I.e. it gets VDI control info from the m68k regs
& memory instead of stored Hatari variables, and
doesn't have the extra info of what "pc" is.)

After thinking a bit more, I think the current
AES_Info() & VDI_Info() functions should be
changed.

They should work without AES/VDI tracing being enabled, if they're called while PC is on VDI trap instruction, and store the necessary values so that it will work also later (similarly how
they now work with AES/VDI tracing).

That way separate info functions aren't needed,
it's enough to add (per-breakpoint) support for
directly calling specified info function when
breakpoint is hit.

I'll try to get this working before the release.

I have this working now, but at the same time I
removed breakpoint :lock option.

However, I wonder whether I should leave ":lock" option in place, although that's debugger
global thing, instead of something one can
specify per breakpoint.

Because one can do things like this with it:
-------------------------------------
# Show disassembly from address in A0
# whenever debugger is entered:
lock regaddr disasm a0

# Track when GEMDOS Dgetdrv() is called:
breakpoint  GemdosOpcode = 0x19  :lock

# (Causes disassembly from (a0) to be
# shown every time above breakpoint is hit)
-------------------------------------

With the ":info <name>" option, one cannot
setup more complex operations like above.


	- Eero



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