Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Debugger drivers
runDbg :: [DbgTrc] -> [DbgBrk] -> InstImage -> DataImage -> (TrcLog, CpuState) Source
debugging run
Example: run with a break condition. (break at pc == 1)
> runDbg [] [(BrkPc BEQ 1)] [(0,[MOVI R0 7, MOVI R1 8, HALT])] [] pc : 1 gr : [7,0,0,0,0,0,0,0] fl : [False,False]
Example: run with trace output. (instruction trace)
> runDbg [TrcInst] [] [(0,[MOVI R0 7, MOVI R1 8, HALT])] [] TrcInst: pc : 0 MOVI R0 7 TrcInst: pc : 1 MOVI R1 8 TrcInst: pc : 2 HALT
runDbgIO :: [DbgTrc] -> [DbgBrk] -> InstImage -> DataImage -> IO () Source
debugging run for IO output
Example: run with trace output. (instruction trace)
> runDbgIO [TrcInst] [] [(0,[MOVI R0 7, MOVI R1 8, HALT])] [] TrcInst: pc : 0 MOVI R0 7 TrcInst: pc : 1 MOVI R1 8 TrcInst: pc : 2 HALT
Data type
trace
type TrcLog = ByteString Source
data type for runDbg
log