processor-creative-kit-0.1.0.1: a creation kit for instruction sets and cpu simulators and development tools

Safe HaskellNone
LanguageHaskell2010

Language.Pck.Tool.InteractiveDebugger

Contents

Synopsis

Interactive Debugger driver

runIdbIO :: [DbgTrc] -> [DbgBrk] -> InstImage -> DataImage -> IO () Source

interactive debugger driver.

Example:

 > runIdbIO [TrcInst] []  [(0,insts)] []
 For help, type "help".
 (idb) info reg
 pc : 0
 gr : [0,0,0,0,0,0,0,0]
 fl : [False,False]
 
 (idb) s
 TrcInst:        pc : 0  MOVI R0 0
 
 (idb) s
 TrcInst:        pc : 1  MOVI R1 1
 
 (idb) b 4
 Num  Enb What
 1    y   pc == 4
 
 (idb) c
 TrcInst:        pc : 2  MOVI R2 2
 
 TrcInst:        pc : 3  MOVI R3 3
 
 (idb) x/10 0
 0x00000000: 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000004: 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000008: 0x00000000 0x00000000
 
 (idb) q

please see "help" command

Interactive Debugger usage

Usage:

 q         -- Exit debugger
 help      -- Print list of commands
 run       -- Start debugged program
 s         -- Step program
 c         -- Continue program being debugged
 x         -- Examin memory: x(/COUNT) ADDRESS
 info reg  -- List of registers
 disas     -- Disassemble: disassemble (ADDRESS)
 info b    -- Status of breakpoints
 disable   -- Disable breakpoint: disable NUMBER
 enable    -- Enable breakpoint: enable NUMBER
 delete    -- Delete breakpoint: delete NUMBER
 b         -- Set breakpoint: b ADDRESS
 watch     -- Set a watchpoint. example:
                data memory -- watch *0x80 != 10
                pc          -- watch pc > 3
                register    -- watch r7 == 3
 p         -- Print memory value: p *ADDRESS
 p         -- Set memory value: p *ADDRESS = VALUE