class DebugHandlerBase

Declaration

class DebugHandlerBase : public AsmPrinterHandler { /* full declaration omitted */ };

Description

Base class for debug information backends. Common functionality related to tracking which variables and scopes are alive at a given PC live here.

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:53

Inherits from: AsmPrinterHandler

Member Variables

protected llvm::AsmPrinter* Asm
Target of debug info emission.
protected llvm::MachineModuleInfo* MMI
Collected machine module information.
protected llvm::DebugLoc PrevInstLoc
Previous instruction's location information. This is used to determine label location to indicate scope boundaries in debug info. We track the previous instruction's source location (if not line 0), whether it was a label, and its parent BB.
protected llvm::MCSymbol* PrevLabel = nullptr
protected const llvm::MachineBasicBlock* PrevInstBB = nullptr
protected llvm::DebugLoc PrologEndLoc
This location indicates end of function prologue and beginning of function body.
protected const llvm::MachineInstr* CurMI = nullptr
If nonnull, stores the current machine instruction we're processing.
protected llvm::LexicalScopes LScopes
protected llvm::DbgValueHistoryMap DbgValues
History of DBG_VALUE and clobber instructions for each user variable. Variables are listed in order of appearance.
protected llvm::DbgLabelInstrMap DbgLabels
Mapping of inlined labels and DBG_LABEL machine instruction.
protected DenseMap<const llvm::MachineInstr*, llvm::MCSymbol*> LabelsBeforeInsn
Maps instruction with label emitted before instruction. FIXME: Make this private from DwarfDebug, we have the necessary accessors for it.
protected DenseMap<const llvm::MachineInstr*, llvm::MCSymbol*> LabelsAfterInsn
Maps instruction with label emitted after instruction.

Method Overview

Inherited from AsmPrinterHandler:

Methods

DebugHandlerBase(llvm::AsmPrinter* A)

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:55

Parameters

llvm::AsmPrinter* A

void beginFunction(
    const llvm::MachineFunction* MF)

Description

Gather pre-function debug information. Every beginFunction(MF) call should be followed by an endFunction(MF) call.

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:118

Parameters

const llvm::MachineFunction* MF

virtual void beginFunctionImpl(
    const llvm::MachineFunction* MF)

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:109

Parameters

const llvm::MachineFunction* MF

void beginInstruction(
    const llvm::MachineInstr* MI)

Description

Process beginning of an instruction.

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:115

Parameters

const llvm::MachineInstr* MI

void endFunction(const llvm::MachineFunction* MF)

Description

Gather post-function debug information. Please note that some AsmPrinter implementations may not call beginFunction at all.

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:119

Parameters

const llvm::MachineFunction* MF

virtual void endFunctionImpl(
    const llvm::MachineFunction* MF)

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:110

Parameters

const llvm::MachineFunction* MF

void endInstruction()

Description

Process end of an instruction.

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:116

static uint64_t getBaseTypeSize(
    const llvm::DIType* Ty)

Description

If this type is derived from a base type then return base type size.

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:132

Parameters

const llvm::DIType* Ty

const llvm::MCExpr*
getFunctionLocalOffsetAfterInsn(
    const llvm::MachineInstr* MI)

Description

Return the function-local offset of an instruction. A label for the instruction \p MI should exist (\ref getLabelAfterInsn).

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:129

Parameters

const llvm::MachineInstr* MI

llvm::MCSymbol* getLabelAfterInsn(
    const llvm::MachineInstr* MI)

Description

Return Label immediately following the instruction.

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:125

Parameters

const llvm::MachineInstr* MI

llvm::MCSymbol* getLabelBeforeInsn(
    const llvm::MachineInstr* MI)

Description

Return Label preceding the instruction.

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:122

Parameters

const llvm::MachineInstr* MI

void identifyScopeMarkers()

Description

Indentify instructions that are marking the beginning of or ending of a scope.

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:97

void requestLabelAfterInsn(
    const llvm::MachineInstr* MI)

Description

Ensure that a label will be emitted after MI.

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:105

Parameters

const llvm::MachineInstr* MI

void requestLabelBeforeInsn(
    const llvm::MachineInstr* MI)

Description

Ensure that a label will be emitted before MI.

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:100

Parameters

const llvm::MachineInstr* MI

virtual void skippedNonDebugFunction()

Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:111