| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
GHC.Cmm.DebugBlock
Contents
Synopsis
- data DebugBlock = DebugBlock {
- dblProcedure :: !Label
- dblLabel :: !Label
- dblCLabel :: !CLabel
- dblHasInfoTbl :: !Bool
- dblParent :: !(Maybe DebugBlock)
- dblTicks :: ![CmmTickish]
- dblSourceTick :: !(Maybe CmmTickish)
- dblPosition :: !(Maybe Int)
- dblUnwind :: [UnwindPoint]
- dblBlocks :: ![DebugBlock]
- cmmDebugGen :: ModLocation -> RawCmmGroup -> [DebugBlock]
- cmmDebugLabels :: (i -> Bool) -> GenCmmGroup d g (ListGraph i) -> [Label]
- cmmDebugLink :: [Label] -> LabelMap [UnwindPoint] -> [DebugBlock] -> [DebugBlock]
- debugToMap :: [DebugBlock] -> LabelMap DebugBlock
- type UnwindTable = Map GlobalReg (Maybe UnwindExpr)
- data UnwindPoint = UnwindPoint !CLabel !UnwindTable
- data UnwindExpr
- toUnwindExpr :: Platform -> CmmExpr -> UnwindExpr
Documentation
data DebugBlock #
Debug information about a block of code. Ticks scope over nested blocks.
Constructors
| DebugBlock | |
Fields
| |
Instances
| OutputableP env CLabel => OutputableP env DebugBlock # | |
Defined in GHC.Cmm.DebugBlock Methods pdoc :: env -> DebugBlock -> SDoc # | |
cmmDebugGen :: ModLocation -> RawCmmGroup -> [DebugBlock] #
Extract debug data from a group of procedures. We will prefer source notes that come from the given module (presumably the module that we are currently compiling).
cmmDebugLabels :: (i -> Bool) -> GenCmmGroup d g (ListGraph i) -> [Label] #
cmmDebugLink :: [Label] -> LabelMap [UnwindPoint] -> [DebugBlock] -> [DebugBlock] #
Sets position and unwind table fields in the debug block tree according to native generated code.
debugToMap :: [DebugBlock] -> LabelMap DebugBlock #
Converts debug blocks into a label map for easier lookups
Unwinding information
type UnwindTable = Map GlobalReg (Maybe UnwindExpr) #
Maps registers to expressions that yield their "old" values
further up the stack. Most interesting for the stack pointer Sp,
but might be useful to document saved registers, too. Note that a
register's value will be Nothing when the register's previous
value cannot be reconstructed.
data UnwindPoint #
A label associated with an UnwindTable
Constructors
| UnwindPoint !CLabel !UnwindTable |
Instances
| OutputableP env CLabel => OutputableP env UnwindPoint # | |
Defined in GHC.Cmm.DebugBlock Methods pdoc :: env -> UnwindPoint -> SDoc # | |
data UnwindExpr #
Expressions, used for unwind information
Constructors
| UwConst !Int | literal value |
| UwReg !GlobalReg !Int | register plus offset |
| UwDeref UnwindExpr | pointer dereferencing |
| UwLabel CLabel | |
| UwPlus UnwindExpr UnwindExpr | |
| UwMinus UnwindExpr UnwindExpr | |
| UwTimes UnwindExpr UnwindExpr |
Instances
| Eq UnwindExpr # | |
Defined in GHC.Cmm.DebugBlock | |
| OutputableP env CLabel => OutputableP env UnwindExpr # | |
Defined in GHC.Cmm.DebugBlock Methods pdoc :: env -> UnwindExpr -> SDoc # | |
toUnwindExpr :: Platform -> CmmExpr -> UnwindExpr #
Conversion of Cmm expressions to unwind expressions. We check for unsupported operator usages and simplify the expression as far as possible.