HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Moduleghc-10.0.0.20260917GHC2024

GHC.CmmToAsm.Dwarf.Types

Contents
  1. Dwarf information
  2. Dwarf address range table
  3. Dwarf frame
  4. Utilities
Synopsis

Dwarf information

datadata DwarfInfo

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

Dwarf address range table

Dwarf frame

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

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.

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.