Difference between revisions of "WinUAE debugger"

From Amiga Coding
Jump to: navigation, search
(added history of the debugger in WinUAE)
 
(Added prepend % for binary)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
...TODO: description of WinUAE debugger here (how to activate, use, about usefullness of state saves etc)...
+
[[Image:WinUAE 1.5.3 Debugger.png|thumb|415px|right|WinUAE Debugger in action]]
 +
WinUAE (the Amiga emulator for Windows) can be used in three ways for debugging:
  
 +
# using the built-in debugger (shift+f12, type h<return> to see commands)
 +
# using emulated freezer cartridges
 +
# by creating a state file<br />(and using other software to rip/disassemble/edit from the memory dump)
  
==History==
 
  
* WinUAE 1.4.6 (02.02.2008)
+
This article is about the build-in debugger, which can be activated by pressing Shift-F12.
** Debugger improvements, hex/dec/bin converter, all commands that accept<br />numeric parameters also accept register names (RAx,RDx,PC,USP,VBR,..),<br /> number prefixes supported, hex = 0x or $, bin = %, dec = !.
 
  
  
* WinUAE 1.4.4 (22.09.2007)
+
==Commands==
** X-Power Professional v1.3 and Nordic Power v1.5 support
 
  
 +
{|class="infotable"
 +
!Command!!Description
 +
|-
 +
|g [&lt;address&gt;]||Start execution at the current address or &lt;address&gt;
 +
|-
 +
|c||Dump state of the CIA, disk drives and custom registers
 +
|-
 +
|r||Dump state of the CPU
 +
|-
 +
|r &lt;reg&gt; &lt;value&gt;||Modify CPU registers (Dx,Ax,USP,ISP,VBR,...)
 +
|-
 +
|m &lt;address&gt; [&lt;lines&gt;]||Memory dump starting at &lt;address&gt;
 +
|-
 +
|m r&lt;register&gt;||Memory dump starting at &lt;register&gt;
 +
|-
 +
|d &lt;address&gt; [&lt;lines&gt;]||Disassembly starting at &lt;address&gt;
 +
|-
 +
|t [instructions]||Step one or more instructions
 +
|-
 +
|z||Step through one instruction - useful for JSR, DBRA etc
 +
|-
 +
|f||Step forward until PC in RAM ("boot block finder")
 +
|-
 +
|f &lt;address&gt;||Add/remove breakpoint
 +
|-
 +
|fa &lt;address&gt; [&lt;start&gt;] [&lt;end&gt;]||Find effective address &lt;address&gt;
 +
|-
 +
|fi||Step forward until PC points to RTS/RTD or RTE
 +
|-
 +
|fi &lt;opcode&gt;||Step forward until PC points to &lt;opcode&gt;
 +
|-
 +
|fp "&lt;name&gt;"/&lt;addr&gt;||Step forward until process &lt;name&gt; or &lt;addr&gt; is active
 +
|-
 +
|fl||List breakpoints
 +
|-
 +
|fd||Remove all breakpoints
 +
|-
 +
|fs &lt;val&gt; &lt;mask&gt;||Break when (SR & mask) = val
 +
|-
 +
|f &lt;addr1&gt; &lt;addr2&gt;||Step forward until &lt;addr1&gt; &lt;= PC &lt;= &lt;addr2&gt;
 +
|-
 +
|e||Dump contents of all custom registers, ea = AGA colors
 +
|-
 +
|i [&lt;addr&gt;]||Dump contents of interrupt and trap vectors
 +
|-
 +
|o &lt;0-2|addr&gt;||[&lt;lines&gt;]View memory as Copper instructions
 +
|-
 +
|od||Enable/disable Copper vpos/hpos tracing
 +
|-
 +
|ot||Copper single step trace
 +
|-
 +
|ob &lt;addr&gt;||Copper breakpoint
 +
|-
 +
|O||Display bitplane offsets
 +
|-
 +
|O &lt;plane&gt; &lt;offset&gt;||Offset a bitplane
 +
|-
 +
|H[H] &lt;cnt&gt;||Show PC history (HH=full CPU info) &lt;cnt&gt; instructions
 +
|-
 +
|C &lt;value&gt;||Search for values like energy or lifes in games
 +
|-
 +
|Cl||List currently found trainer addresses
 +
|-
 +
|D[idxzs &lt;[max diff]&gt;]||Deep trainer. i=new value must be larger, d=smaller,<br />x = must be same, z = must be different, s = restart.
 +
|-
 +
|W &lt;address&gt; &lt;value&gt;||Write into Amiga memory
 +
|-
 +
|w &lt;num&gt; &lt;address&gt; &lt;length&gt; &lt;R/W/I/F&gt; [&lt;value&gt;]||(read/write/opcode/freeze)<br />Add/remove memory watchpoints
 +
|-
 +
|wd [&lt;0-1&gt;]||Enable illegal access logger. 1 = enable break.
 +
|-
 +
|S &lt;file&gt; &lt;addr&gt; &lt;n&gt;||Save a block of Amiga memory
 +
|-
 +
|s "&lt;string&gt;"/&lt;values&gt; [&lt;addr&gt;] [&lt;length&gt;]||Search for string/bytes
 +
|-
 +
|T||Show exec tasks and their PCs
 +
|-
 +
|b||Step to previous state capture position
 +
|-
 +
|Ma &lt;channel mask&gt;||Enable or disable audio channels
 +
|-
 +
|Ms &lt;sprite mask&gt;||Enable or disable sprites
 +
|-
 +
|Mb &lt;bitplane mask&gt;||Enable or disable bitplanes
 +
|-
 +
|sp &lt;addr&gt; [&lt;addr2][&lt;size&gt;]||Dump sprite information
 +
|-
 +
|di &lt;mode&gt; [&lt;track&gt;]||Break on disk access. R=DMA read,W=write,RW=both,P=PIO<br />Also enables level 1 disk logging
 +
|-
 +
|did &lt;log level&gt;||Enable disk logging
 +
|-
 +
|dj [&lt;level bitmask&gt;]||Enable joystick/mouse input debugging
 +
|-
 +
|smc [&lt;0-1&gt;]||Enable self-modifying code detector. 1 = enable break.
 +
|-
 +
|dm||Dump current address space map
 +
|-
 +
|?&lt;value&gt;||Hex/Bin/Dec converter
 +
|-
 +
|x||Close debugger.
 +
|-
 +
|xx||Switch between console and GUI debugger.
 +
|-
 +
|mg &lt;address&gt;||Memory dump starting at &lt;address&gt; in GUI
 +
|-
 +
|dg &lt;address&gt;||Disassembly starting at &lt;address&gt; in GUI
 +
|-
 +
|q||Quit the emulator. You don't want to use this command.
 +
|}
  
* WinUAE 1.4.3 (29.07.2007)
 
** Action Cartridge Super IV Professional freezer cartridge emulation.
 
** X-Power Professional 500 (v1.2) freezer cartridge emulation.
 
** Nordic Power (v2.0) freezer cartridge emulation.
 
** Debugger improvements (improved deep trainer, copper memwatch points, CPU-model specific registers can be modified, illegal access logger improved, process breakpoints etc..)
 
  
 +
Numbers:
 +
* are usually hexadecimal by default (a few exceptions default to decimal)
 +
* prepend a number with $ or 0x force hexadecimal
 +
* prepend a number with ! to force decimal
 +
* prepend a number with % to force binary
  
* WinUAE 1.4.2 (12.05.2007)
+
==More info==
** GUI debugger, debugger improvements. (xx switches debugger modes)
+
* [[WinUAE debugger history]]

Latest revision as of 12:34, 12 February 2021

WinUAE Debugger in action

WinUAE (the Amiga emulator for Windows) can be used in three ways for debugging:

  1. using the built-in debugger (shift+f12, type h<return> to see commands)
  2. using emulated freezer cartridges
  3. by creating a state file
    (and using other software to rip/disassemble/edit from the memory dump)


This article is about the build-in debugger, which can be activated by pressing Shift-F12.


Commands

Command Description
g [<address>] Start execution at the current address or <address>
c Dump state of the CIA, disk drives and custom registers
r Dump state of the CPU
r <reg> <value> Modify CPU registers (Dx,Ax,USP,ISP,VBR,...)
m <address> [<lines>] Memory dump starting at <address>
m r<register> Memory dump starting at <register>
d <address> [<lines>] Disassembly starting at <address>
t [instructions] Step one or more instructions
z Step through one instruction - useful for JSR, DBRA etc
f Step forward until PC in RAM ("boot block finder")
f <address> Add/remove breakpoint
fa <address> [<start>] [<end>] Find effective address <address>
fi Step forward until PC points to RTS/RTD or RTE
fi <opcode> Step forward until PC points to <opcode>
fp "<name>"/<addr> Step forward until process <name> or <addr> is active
fl List breakpoints
fd Remove all breakpoints
fs <val> <mask> Break when (SR & mask) = val
f <addr1> <addr2> Step forward until <addr1> <= PC <= <addr2>
e Dump contents of all custom registers, ea = AGA colors
i [<addr>] Dump contents of interrupt and trap vectors
addr> [<lines>]View memory as Copper instructions
od Enable/disable Copper vpos/hpos tracing
ot Copper single step trace
ob <addr> Copper breakpoint
O Display bitplane offsets
O <plane> <offset> Offset a bitplane
H[H] <cnt> Show PC history (HH=full CPU info) <cnt> instructions
C <value> Search for values like energy or lifes in games
Cl List currently found trainer addresses
D[idxzs <[max diff]>] Deep trainer. i=new value must be larger, d=smaller,
x = must be same, z = must be different, s = restart.
W <address> <value> Write into Amiga memory
w <num> <address> <length> <R/W/I/F> [<value>] (read/write/opcode/freeze)
Add/remove memory watchpoints
wd [<0-1>] Enable illegal access logger. 1 = enable break.
S <file> <addr> <n> Save a block of Amiga memory
s "<string>"/<values> [<addr>] [<length>] Search for string/bytes
T Show exec tasks and their PCs
b Step to previous state capture position
Ma <channel mask> Enable or disable audio channels
Ms <sprite mask> Enable or disable sprites
Mb <bitplane mask> Enable or disable bitplanes
sp <addr> [<addr2][<size>] Dump sprite information
di <mode> [<track>] Break on disk access. R=DMA read,W=write,RW=both,P=PIO
Also enables level 1 disk logging
did <log level> Enable disk logging
dj [<level bitmask>] Enable joystick/mouse input debugging
smc [<0-1>] Enable self-modifying code detector. 1 = enable break.
dm Dump current address space map
?<value> Hex/Bin/Dec converter
x Close debugger.
xx Switch between console and GUI debugger.
mg <address> Memory dump starting at <address> in GUI
dg <address> Disassembly starting at <address> in GUI
q Quit the emulator. You don't want to use this command.


Numbers:

  • are usually hexadecimal by default (a few exceptions default to decimal)
  • prepend a number with $ or 0x force hexadecimal
  • prepend a number with ! to force decimal
  • prepend a number with % to force binary

More info