Copyright | (c) Galois Inc 2017-2019 |
---|---|
Maintainer | Joe Hendrix <jhendrix@galois.com> |
Safe Haskell | None |
Language | Haskell2010 |
Data.Macaw.CFG.Block
Description
This exports the pre-classification term statement and block data types.
Synopsis
- data Block arch ids = Block {
- blockStmts :: ![Stmt arch ids]
- blockTerm :: !(TermStmt arch ids)
- ppBlock :: ArchConstraints arch => Block arch ids -> Doc ann
- data TermStmt arch ids
- = FetchAndExecute !(RegState (ArchReg arch) (Value arch ids))
- | TranslateError !(RegState (ArchReg arch) (Value arch ids)) !Text
- | ArchTermStmt !(ArchTermStmt arch (Value arch ids)) !(RegState (ArchReg arch) (Value arch ids))
Documentation
The type for code blocks returned by the disassembler.
The discovery process will attempt to map each block to a suitable ParsedBlock.
Constructors
Block | |
Fields
|
ppBlock :: ArchConstraints arch => Block arch ids -> Doc ann Source #
data TermStmt arch ids Source #
A terminal statement in a block
This is the unclassified definition that is generated directly from the architecture specific disassembler.
Constructors
FetchAndExecute !(RegState (ArchReg arch) (Value arch ids)) | Fetch and execute the next instruction from the given processor state. |
TranslateError !(RegState (ArchReg arch) (Value arch ids)) !Text | The block ended prematurely due to an error in instruction decoding or translation. This contains the state of the registers when the translation error occured and the error message recorded. |
ArchTermStmt !(ArchTermStmt arch (Value arch ids)) !(RegState (ArchReg arch) (Value arch ids)) | An architecture specific term stmt. The registers include the state of registers just before the terminal statement executes. |
Instances
ArchConstraints arch => Pretty (TermStmt arch ids) Source # | |
Defined in Data.Macaw.CFG.Block |