From f177aed814dd75d0a40515b9840d584714f54a6c Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Thu, 6 Jul 2017 19:45:12 -0230 Subject: [PATCH] Fix debugger trap documentation (fixes #156 from #164) --- docs/debugger.html | 47 ++++++++++++++++----------------- src/debugger/DebuggerParser.cxx | 8 +++--- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/docs/debugger.html b/docs/debugger.html index bc24dcb36..d6c3fd2be 100644 --- a/docs/debugger.html +++ b/docs/debugger.html @@ -455,7 +455,7 @@ presses both Select and Reset:

User-defined functions appear in "listfunctions", which shows the label -and expression for each function. Functions can be removed with +and expression for each function. Functions can be removed with "delfunction label", where the labels come from "listfunctions".

If you've defined a lot of complex functions, you probably will @@ -622,33 +622,34 @@ can also get rid of all traps at once with the "cleartraps" command.

Type "help" to see this list in the debugger.

-            a - Set Accumulator to value xx
-         base - Set default base (hex, dec, or bin)
-        break - Set/clear breakpoint at address xx (default=PC)
-      breakif - Set breakpoint on condition xx
+            a - Set Accumulator to 
+         base - Set default base to 
+        break - Set/clear breakpoint at 
+ breakif - Set breakpoint on c - Carry Flag: set (0 or 1), or toggle (no arg) cheat - Use a cheat code (see manual for cheat types) clearbreaks - Clear all breakpoints clearconfig - Clear Distella config directives [bank xx] cleartraps - Clear all traps clearwatches - Clear all watches - cls - Clear prompt area of text and erase history + cls - Clear prompt area of text code - Mark 'CODE' range in disassembly colortest - Show value xx as TIA color - d - Decimal Flag: set (0 or 1), or toggle (no arg) + d - Carry Flag: set (0 or 1), or toggle (no arg) data - Mark 'DATA' range in disassembly + debugcolors - Show Fixed Debug Colors information define - Define label xx for address yy - delbreakif - Delete conditional breakif xx + delbreakif - Delete conditional breakif delfunction - Delete function with label xx - delwatch - Delete watch xx + delwatch - Delete watch disasm - Disassemble address xx [yy lines] (default=PC) - dump - Dump 128 bytes of memory at address xx - exec - Execute script file xx + dump - Dump 128 bytes of memory at address + exec - Execute script file exitrom - Exit emulator, return to ROM launcher - frame - Advance emulation by xx frames (default=1) + frame - Advance emulation by frames (default=1) function - Define function name xx for expression yy - gfx - Mark 'CFX' range in disassembly - help - This cruft + gfx - Mark 'GFX' range in disassembly + help - help jump - Scroll disassembly to address xx listbreaks - List breakpoints listconfig - List Distella config directives [bank xx] @@ -657,6 +658,7 @@ listfunctions - List user-defined functions loadconfig - Load Distella config file loadstate - Load emulator state xx (0-9) n - Negative Flag: set (0 or 1), or toggle (no arg) + palette - Show current TIA palette pc - Set Program Counter to address xx pgfx - Mark 'PGFX' range in disassembly print - Evaluate/print expression xx in hex/dec/binary @@ -677,17 +679,14 @@ listfunctions - List user-defined functions saveses - Save console session to file xx savesnap - Save current TIA image to PNG file savestate - Save emulator state xx (valid args 0-9) - scanline - Advance emulation by xx scanlines (default=1) + scanline - Advance emulation by scanlines (default=1) step - Single step CPU [with count xx] - tia - Show TIA state (NOT FINISHED YET) + tia - Show TIA state trace - Single step CPU over subroutines [with count xx] - trap - Trap read/write access to address(es) xx [to yy] - trapread - Trap read access to address(es) xx [to yy] - trapwrite - Trap write access to address(es) xx [to yy] - trapm - Trap read/write access to address xx (+mirrors) - trapreadm - Trap read access to address xx (+mirrors) - trapwritem - Trap write access to address xx (+mirrors) - type - Show disassembly type for address xx [to yy] + trap - Trap read/write access to address(es) xx [yy] + trapread - Trap read access to address(es) xx [yy] + trapwrite - Trap write access to address(es) xx [yy] + type - Show disassembly type for address xx [yy] uhex - Toggle upper/lowercase HEX display undef - Undefine label xx (if defined) v - Overflow Flag: set (0 or 1), or toggle (no arg) @@ -1062,7 +1061,7 @@ cannot be edited. Also note that certain ROMs can have sections of address space swapped in and out dynamically. As such, changing the contents of a certain address will change the area pointed to at that time. In particular, modifying an address that points to internal -RAM will change the RAM, not the underlying ROM. A future release may +RAM will change the RAM, not the underlying ROM. A future release may graphically differentiate between RAM and ROM areas.

The ROM Disassembly also contains a Settings dialog, accessible by right-clicking diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index 2e9a66d7e..3dd2ba332 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -2279,7 +2279,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = { { "trap", - "Trap read/write access to address(es) xx [to yy]", + "Trap read/write access to address(es) xx [yy]", "Set a R/W trap on the given address(es) and all mirrors\n" "Example: trap f000, trap f000 f100", true, @@ -2290,7 +2290,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = { { "trapread", - "Trap read access to address(es) xx [to yy]", + "Trap read access to address(es) xx [yy]", "Set a read trap on the given address(es) and all mirrors\n" "Example: trapread f000, trapread f000 f100", true, @@ -2301,7 +2301,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = { { "trapwrite", - "Trap write access to address(es) xx [to yy]", + "Trap write access to address(es) xx [yy]", "Set a write trap on the given address(es) and all mirrors\n" "Example: trapwrite f000, trapwrite f000 f100", true, @@ -2312,7 +2312,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = { { "type", - "Show disassembly type for address xx [to yy]", + "Show disassembly type for address xx [yy]", "Example: type f000, type f000 f010", true, false,