Jump to content
IGNORED

Dump var values in Altirra debugger


Recommended Posts

;##TRACE just sets a conditional breakpoint for you with the .printf command and takes the same arguments. In this case, you'll probably want:

;##TRACE "x = %02x" db(x)

Use ".help .printf" to get detailed help on the argument format; almost all C printf() formatting options are supported. Careful with the accumulator, you'll need to use (a) or @a to force the debugger to interpret as the register and not an abbreviated hex value. There are a bunch of examples in the Altirra BASIC source code within the emulator source package.

 

For this to work, the debugger has to see an MADS listing file and be able to parse it well enough to spot the address for the next instruction to tag the trace to it. MADS listings are a bit schizophrenic in format and tricky to parse, so occasionally the debugger will have problems, especially with lots of banks and segments involved. All of the tracepoints end up in a hidden directives group that you can list with "bl -a", and clear with "bc directives.*" if they annoy you too much during a session. You can also use the bt command to manually insert new tracepoints as needed.

 

To output into a log file, use the .logopen command to clone the console output to a file of your choosing.

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...