HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Moduleghc-10.0.0.20260917GHC2024

GHC.ByteCode.Breakpoints

Breakpoint information constructed during ByteCode generation.

Specifically, code-generation breakpoints are referred to as "internal breakpoints", the internal breakpoint data for a module is stored in InternalModBreaks, and is uniquely identified at runtime by an InternalBreakpointId.

See Note [ModBreaks vs InternalModBreaks] and Note [Breakpoint identifiers]

  • 5 types
  • 10 values

Internal Mod Breaks

4 declarations
datadata InternalModBreaks
#

Internal mod breaks store the runtime-relevant information of breakpoints.

Importantly, it maps InternalBreakpointIds to CgBreakInfo.

InternalModBreaks are constructed during bytecode generation and stored in CompiledByteCode afterwards.

Constructors

Instances1Binary
datadata CgBreakInfo
#

Information about a breakpoint that we know at code-generation time In order to be used, this needs to be hydrated relative to the current HscEnv by hydrateCgBreakInfo. Everything here can be fully forced and that's critical for preventing space leaks (see #22530)

Constructors

  • CgBreakInfo
    • cgb_tyvars :: ![IfaceTvBndr]

      Type variables in scope at the breakpoint

    • cgb_vars :: ![Maybe (IfaceIdBndr, Word)]
    • cgb_resty :: !IfaceType
    • cgb_tick_id :: !Either InternalBreakLoc BreakpointId

      This field records the original breakpoint tick identifier for this internal breakpoint info. It is used to convert a breakpoint *occurrence* index (InternalBreakpointId) into a *definition* index (BreakpointId).

      The modules of breakpoint occurrence and breakpoint definition are not necessarily the same: See Note [Breakpoint identifiers].

      If there is no original tick identifier (that is, the breakpoint was created during code generation), we re-use the BreakpointId of something else. It would also be reasonable to have an Either something BreakpointId for cgb_tick_id, but currently we can always re-use a source-level BreakpointId. In the case of step-out, see Note [Debugger: Stepout internal break locs]

Instances2Outputable, Binary

Internal breakpoint identifier

datadata InternalBreakpointId
#

Internal breakpoint identifier

Indexes into the structures in the InternalModBreaks produced during ByteCode generation. See Note [Breakpoint identifiers]

Constructors

Instances5Eq, Ord, NFData, Outputable, Binary
newtypenewtype InternalBreakLoc
#

Breakpoints created during code generation don't have a source-level tick location. Instead, we re-use an existing one.

Instances4Eq, NFData, Outputable, Binary

Operations

0 declarations

Internal-level operations

Source-level information operations

Utils

1 declaration