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.
- private llvm::InstructionOrdering InstOrdering
Method Overview
- protected DebugHandlerBase(llvm::AsmPrinter * A)
- public void beginBasicBlock(const llvm::MachineBasicBlock & MBB)
- public void beginFunction(const llvm::MachineFunction * MF)
- protected virtual void beginFunctionImpl(const llvm::MachineFunction * MF)
- public void beginInstruction(const llvm::MachineInstr * MI)
- public void beginModule(llvm::Module * M)
- public void endBasicBlock(const llvm::MachineBasicBlock & MBB)
- public void endFunction(const llvm::MachineFunction * MF)
- protected virtual void endFunctionImpl(const llvm::MachineFunction * MF)
- public void endInstruction()
- public static uint64_t getBaseTypeSize(const llvm::DIType * Ty)
- public const llvm::InstructionOrdering & getInstOrdering() const
- public llvm::MCSymbol * getLabelAfterInsn(const llvm::MachineInstr * MI)
- public llvm::MCSymbol * getLabelBeforeInsn(const llvm::MachineInstr * MI)
- protected void identifyScopeMarkers()
- public static bool isUnsignedDIType(const llvm::DIType * Ty)
- protected void requestLabelAfterInsn(const llvm::MachineInstr * MI)
- protected void requestLabelBeforeInsn(const llvm::MachineInstr * MI)
- protected virtual void skippedNonDebugFunction()
Inherited from AsmPrinterHandler:
- public beginBasicBlock
- public beginFragment
- public beginFunclet
- public beginFunction
- public beginInstruction
- public beginModule
- public endBasicBlock
- public endFragment
- public endFunclet
- public endFunction
- public endInstruction
- public endModule
- public markFunctionEnd
- public setSymbolSize
Methods
¶DebugHandlerBase(llvm::AsmPrinter* A)
DebugHandlerBase(llvm::AsmPrinter* A)
Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:55
Parameters
¶void beginBasicBlock(
const llvm::MachineBasicBlock& MBB)
void beginBasicBlock(
const llvm::MachineBasicBlock& MBB)
Description
Process beginning of a basic block during basic block sections.
Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:126
Parameters
- const llvm::MachineBasicBlock& MBB
¶void beginFunction(
const llvm::MachineFunction* MF)
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:123
Parameters
- const llvm::MachineFunction* MF
¶virtual void beginFunctionImpl(
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)
void beginInstruction(
const llvm::MachineInstr* MI)
Description
Process beginning of an instruction.
Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:120
Parameters
- const llvm::MachineInstr* MI
¶void beginModule(llvm::Module* M)
void beginModule(llvm::Module* M)
Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:118
Parameters
- llvm::Module* M
¶void endBasicBlock(
const llvm::MachineBasicBlock& MBB)
void endBasicBlock(
const llvm::MachineBasicBlock& MBB)
Description
Process end of a basic block during basic block sections.
Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:127
Parameters
- const llvm::MachineBasicBlock& MBB
¶void endFunction(const llvm::MachineFunction* MF)
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:124
Parameters
- const llvm::MachineFunction* MF
¶virtual void endFunctionImpl(
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()
void endInstruction()
Description
Process end of an instruction.
Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:121
¶static uint64_t getBaseTypeSize(
const llvm::DIType* Ty)
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:136
Parameters
- const llvm::DIType* Ty
¶const llvm::InstructionOrdering& getInstOrdering()
const
const llvm::InstructionOrdering& getInstOrdering()
const
Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:141
¶llvm::MCSymbol* getLabelAfterInsn(
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:133
Parameters
- const llvm::MachineInstr* MI
¶llvm::MCSymbol* getLabelBeforeInsn(
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:130
Parameters
- const llvm::MachineInstr* MI
¶void identifyScopeMarkers()
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
¶static bool isUnsignedDIType(
const llvm::DIType* Ty)
static bool isUnsignedDIType(
const llvm::DIType* Ty)
Description
Return true if type encoding is unsigned.
Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:139
Parameters
- const llvm::DIType* Ty
¶void requestLabelAfterInsn(
const llvm::MachineInstr* MI)
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)
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()
virtual void skippedNonDebugFunction()
Declared at: llvm/include/llvm/CodeGen/DebugHandlerBase.h:111