HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleghc-9.10.3GHC2021

GHC.CmmToAsm.Dwarf.Types

  • 5 types
  • 13 values
  • Packageghc-9.10.3
  • Exports18
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceTypes.hs

Dwarf information

3 declarations
datadata DwarfInfo
#

Individual dwarf records. Each one will be encoded as an entry in the .debug_info section.

Dwarf address range table

2 declarations

Dwarf frame

4 declarations
valuepprDwarfFrame :: IsDoc doc => Platform -> DwarfFrame -> doc
#

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

9 declarations
valuepprByte :: IsDoc doc => Word8 -> doc
#

Assembly for a single byte of constant DWARF data

valuepprDwWord :: IsDoc doc => Line doc -> doc
#

Assembly for a DWARF word of dynamic data. This means 32 bit, as we are generating 32 bit DWARF.

valuepprWord :: IsDoc doc => Platform -> Line doc -> doc
#

Assembly for a machine word of dynamic data. Depends on the architecture we are currently generating code for.

valuepprLEBWord :: IsDoc doc => Word -> doc
#

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.

valuepprLEBInt :: IsDoc doc => Int -> doc
#

Same as pprLEBWord, but for a signed number

valuesectionOffset :: IsDoc doc => Platform -> Line doc -> Line doc -> doc
#

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.