ghc-9.2.2: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Cmm.DebugBlock

Synopsis

Documentation

data DebugBlock Source #

Debug information about a block of code. Ticks scope over nested blocks.

Constructors

DebugBlock 

Fields

Instances

Instances details
OutputableP env CLabel => OutputableP env DebugBlock Source # 
Instance details

Defined in GHC.Cmm.DebugBlock

Methods

pdoc :: env -> DebugBlock -> SDoc Source #

cmmDebugGen :: ModLocation -> RawCmmGroup -> [DebugBlock] Source #

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).

cmmDebugLink :: [Label] -> LabelMap [UnwindPoint] -> [DebugBlock] -> [DebugBlock] Source #

Sets position and unwind table fields in the debug block tree according to native generated code.

debugToMap :: [DebugBlock] -> LabelMap DebugBlock Source #

Converts debug blocks into a label map for easier lookups

Unwinding information

type UnwindTable = Map GlobalReg (Maybe UnwindExpr) Source #

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 Source #

A label associated with an UnwindTable

Instances

Instances details
OutputableP env CLabel => OutputableP env UnwindPoint Source # 
Instance details

Defined in GHC.Cmm.DebugBlock

Methods

pdoc :: env -> UnwindPoint -> SDoc Source #

data UnwindExpr Source #

Expressions, used for unwind information

Instances

Instances details
Eq UnwindExpr Source # 
Instance details

Defined in GHC.Cmm.DebugBlock

OutputableP env CLabel => OutputableP env UnwindExpr Source # 
Instance details

Defined in GHC.Cmm.DebugBlock

Methods

pdoc :: env -> UnwindExpr -> SDoc Source #

toUnwindExpr :: Platform -> CmmExpr -> UnwindExpr Source #

Conversion of Cmm expressions to unwind expressions. We check for unsupported operator usages and simplify the expression as far as possible.