mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-12-28 08:34:23 +03:00
Documentation/comment fixes.
This commit is contained in:
parent
957addd204
commit
d9ee884a90
@ -32,7 +32,8 @@ import Data.Macaw.Memory
|
||||
------------------------------------------------------------------------
|
||||
-- ArchitectureInfo
|
||||
|
||||
-- | Function for disassembling a block.
|
||||
-- | Function for disassembling a range of code (usually a function in
|
||||
-- the target code image) into blocks.
|
||||
--
|
||||
-- A block is defined as a contiguous region of code with a single known
|
||||
-- entrance and potentially multiple exits.
|
||||
@ -68,7 +69,7 @@ data ArchitectureInfo arch
|
||||
-- ^ Use the abstract block state information to infer register
|
||||
-- values to use for disassembling from given address.
|
||||
, disassembleFn :: !(DisassembleFn arch)
|
||||
-- ^ Function for disasembling a block.
|
||||
-- ^ Function for disassembling a block.
|
||||
, mkInitialAbsState :: !(Memory (RegAddrWidth (ArchReg arch))
|
||||
-> ArchSegmentOff arch
|
||||
-> AbsBlockState (ArchReg arch))
|
||||
|
@ -1,8 +1,13 @@
|
||||
{-|
|
||||
Copyright : (c) Galois, Inc 2017-2018
|
||||
Copyright : (c) Galois, Inc 2017-2019
|
||||
Maintainer : jhendrix@galois.com
|
||||
|
||||
This provides a rewriter for simplifying values.
|
||||
This provides a rewriter for simplifying blocks by rewriting value
|
||||
computations and performing other rearrangement and adjustments.
|
||||
|
||||
The main entry point is calling 'runRewriter' with a constructed
|
||||
'RewriteContext' to control the rewrite operation and a Rewriter monad
|
||||
computation that rewrites the statements for a particular block.
|
||||
-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE GADTs #-}
|
||||
@ -127,7 +132,7 @@ appendRewrittenStmt stmt = Rewriter $ do
|
||||
seq stmt $ seq stmts' $ do
|
||||
rwRevStmts .= stmts'
|
||||
|
||||
-- | Add a statment to the list
|
||||
-- | Add a architecture-specific statement to the list
|
||||
appendRewrittenArchStmt :: ArchStmt arch (Value arch tgt) -> Rewriter arch s src tgt ()
|
||||
appendRewrittenArchStmt = appendRewrittenStmt . ExecArchStmt
|
||||
|
||||
|
@ -1181,10 +1181,10 @@ parseBlock ctx idx initRegs b absProcState = do
|
||||
}
|
||||
pure (ret, idx+1)
|
||||
|
||||
-- | This evalutes the statements in a block to expand the information known
|
||||
-- | This evaluates the statements in a block to expand the information known
|
||||
-- about control flow targets of this block.
|
||||
addBlocks :: ArchSegmentOff arch
|
||||
-- ^ Address of theze blocks
|
||||
-- ^ Address of these blocks
|
||||
-> FoundAddr arch
|
||||
-- ^ State leading to explore block
|
||||
-> RegState (ArchReg arch) (Value arch ids)
|
||||
|
@ -94,7 +94,7 @@ data FunctionExploreReason w
|
||||
|
||||
-- | This describes why we are exploring a given block within a function.
|
||||
data BlockExploreReason w
|
||||
-- | Exploring because the given block writes it to memory.
|
||||
-- -- | Exploring because the given block writes it to memory.
|
||||
-- =- InWrite !(MemSegmentOff w)
|
||||
-- | Exploring because the given block jumps here.
|
||||
= NextIP !(MemSegmentOff w)
|
||||
|
Loading…
Reference in New Issue
Block a user