Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data DwarfInfo
- = DwarfCompileUnit {
- dwChildren :: [DwarfInfo]
- dwName :: String
- dwProducer :: String
- dwCompDir :: String
- dwLowLabel :: SDoc
- dwHighLabel :: SDoc
- dwLineLabel :: SDoc
- | DwarfSubprogram { }
- | DwarfBlock { }
- | DwarfSrcNote { }
- = DwarfCompileUnit {
- pprDwarfInfo :: Platform -> Bool -> DwarfInfo -> SDoc
- pprAbbrevDecls :: Platform -> Bool -> SDoc
- data DwarfARange = DwarfARange {}
- pprDwarfARanges :: Platform -> [DwarfARange] -> Unique -> SDoc
- data DwarfFrame = DwarfFrame {}
- data DwarfFrameProc = DwarfFrameProc {}
- data DwarfFrameBlock = DwarfFrameBlock {}
- pprDwarfFrame :: Platform -> DwarfFrame -> SDoc
- pprByte :: Word8 -> SDoc
- pprHalf :: Word16 -> SDoc
- pprData4' :: SDoc -> SDoc
- pprDwWord :: SDoc -> SDoc
- pprWord :: Platform -> SDoc -> SDoc
- pprLEBWord :: Word -> SDoc
- pprLEBInt :: Int -> SDoc
- wordAlign :: Platform -> SDoc
- sectionOffset :: Platform -> SDoc -> SDoc -> SDoc
Dwarf information
Individual dwarf records. Each one will be encoded as an entry in
the .debug_info
section.
DwarfCompileUnit | |
| |
DwarfSubprogram | |
DwarfBlock | |
DwarfSrcNote | |
pprAbbrevDecls :: Platform -> Bool -> SDoc Source #
Abbreviation declaration. This explains the binary encoding we
use for representing DwarfInfo
. Be aware that this must be updated
along with pprDwarfInfo
.
Dwarf address range table
data DwarfARange Source #
A DWARF address range. This is used by the debugger to quickly locate which compilation unit a given address belongs to. This type assumes a non-segmented address-space.
pprDwarfARanges :: Platform -> [DwarfARange] -> Unique -> SDoc Source #
Print assembler directives corresponding to a DWARF .debug_aranges
address table entry.
Dwarf frame
data DwarfFrame Source #
Information about unwind instructions for a procedure. This corresponds to a "Common Information Entry" (CIE) in DWARF.
data DwarfFrameProc Source #
Unwind instructions for an individual procedure. Corresponds to a "Frame Description Entry" (FDE) in DWARF.
DwarfFrameProc | |
|
data DwarfFrameBlock Source #
Unwind instructions for a block. Will become part of the containing FDE.
DwarfFrameBlock | |
|
Instances
OutputableP env CLabel => OutputableP env DwarfFrameBlock Source # | |
Defined in GHC.CmmToAsm.Dwarf.Types pdoc :: env -> DwarfFrameBlock -> SDoc Source # |
pprDwarfFrame :: Platform -> DwarfFrame -> SDoc Source #
Header for the .debug_frame
section. Here we emit the "Common
Information Entry" record that establishes general call frame
parameters and the default stack layout.
Utilities
pprDwWord :: SDoc -> SDoc Source #
Assembly for a DWARF word of dynamic data. This means 32 bit, as we are generating 32 bit DWARF.
pprWord :: Platform -> SDoc -> SDoc Source #
Assembly for a machine word of dynamic data. Depends on the architecture we are currently generating code for.
pprLEBWord :: Word -> SDoc Source #
Prints a number in "little endian base 128" format. The idea is to optimize for small numbers by stopping once all further bytes would be 0. The highest bit in every byte signals whether there are further bytes to read.
sectionOffset :: Platform -> SDoc -> SDoc -> SDoc Source #
Generate an offset into another section. This is tricky because this is handled differently depending on platform: Mac Os expects us to calculate the offset using assembler arithmetic. Linux expects us to just reference the target directly, and will figure out on their own that we actually need an offset. Finally, Windows has a special directive to refer to relative offsets. Fun.