LLVM: llvm::DebugHandlerBase Class Reference (original) (raw)
Base class for debug information backends. More...
#include "[llvm/CodeGen/DebugHandlerBase.h](DebugHandlerBase%5F8h%5Fsource.html)"
Public Member Functions | |
---|---|
virtual | ~DebugHandlerBase () override |
void | beginModule (Module *M) override |
void | beginInstruction (const MachineInstr *MI) override |
Process beginning of an instruction. | |
void | endInstruction () override |
Process end of an instruction. | |
void | beginFunction (const MachineFunction *MF) override |
Gather pre-function debug information. | |
void | endFunction (const MachineFunction *MF) override |
Gather post-function debug information. | |
void | beginBasicBlockSection (const MachineBasicBlock &MBB) override |
Process the beginning of a new basic-block-section within a function. | |
void | endBasicBlockSection (const MachineBasicBlock &MBB) override |
Process the end of a basic-block-section within a function. | |
MCSymbol * | getLabelBeforeInsn (const MachineInstr *MI) |
Return Label preceding the instruction. | |
MCSymbol * | getLabelAfterInsn (const MachineInstr *MI) |
Return Label immediately following the instruction. | |
const InstructionOrdering & | getInstOrdering () const |
![]() |
|
virtual | ~AsmPrinterHandler () |
Pin vtables to this file. | |
virtual void | beginModule (Module *M) |
virtual void | endModule ()=0 |
Emit all sections that should come after the content. | |
virtual void | beginFunction (const MachineFunction *MF)=0 |
Gather pre-function debug information. | |
virtual void | markFunctionEnd () |
virtual void | endFunction (const MachineFunction *MF)=0 |
Gather post-function debug information. | |
virtual void | beginBasicBlockSection (const MachineBasicBlock &MBB) |
Process the beginning of a new basic-block-section within a function. | |
virtual void | endBasicBlockSection (const MachineBasicBlock &MBB) |
Process the end of a basic-block-section within a function. | |
virtual void | setSymbolSize (const MCSymbol *Sym, uint64_t Size) |
For symbols that have a size designated (e.g. | |
virtual void | beginInstruction (const MachineInstr *MI) |
Process beginning of an instruction. | |
virtual void | endInstruction () |
Process end of an instruction. | |
virtual void | beginCodeAlignment (const MachineBasicBlock &MBB) |
virtual void | beginFunclet (const MachineBasicBlock &MBB, MCSymbol *Sym=nullptr) |
Emit target-specific EH funclet machinery. | |
virtual void | endFunclet () |
Static Public Member Functions | |
---|---|
static uint64_t | getBaseTypeSize (const DIType *Ty) |
If this type is derived from a base type then return base type size. | |
static bool | isUnsignedDIType (const DIType *Ty) |
Return true if type encoding is unsigned. | |
Protected Member Functions | |
---|---|
DebugHandlerBase (AsmPrinter *A) | |
void | identifyScopeMarkers () |
Indentify instructions that are marking the beginning of or ending of a scope. | |
void | requestLabelBeforeInsn (const MachineInstr *MI) |
Ensure that a label will be emitted before MI. | |
void | requestLabelAfterInsn (const MachineInstr *MI) |
Ensure that a label will be emitted after MI. | |
virtual void | beginFunctionImpl (const MachineFunction *MF)=0 |
virtual void | endFunctionImpl (const MachineFunction *MF)=0 |
virtual void | skippedNonDebugFunction () |
Protected Attributes | |
---|---|
AsmPrinter * | Asm = nullptr |
Target of debug info emission. | |
MachineModuleInfo * | MMI = nullptr |
Collected machine module information. | |
DebugLoc | PrevInstLoc |
Previous instruction's location information. | |
MCSymbol * | PrevLabel = nullptr |
const MachineBasicBlock * | PrevInstBB = nullptr |
const MachineInstr * | PrologEndLoc |
This location indicates end of function prologue and beginning of function body. | |
const MachineBasicBlock * | EpilogBeginBlock = nullptr |
This block includes epilogue instructions. | |
const MachineInstr * | CurMI = nullptr |
If nonnull, stores the current machine instruction we're processing. | |
LexicalScopes | LScopes |
DbgValueHistoryMap | DbgValues |
History of DBG_VALUE and clobber instructions for each user variable. | |
DbgLabelInstrMap | DbgLabels |
Mapping of inlined labels and DBG_LABEL machine instruction. | |
DenseMap< const MachineInstr *, MCSymbol * > | LabelsBeforeInsn |
Maps instruction with label emitted before instruction. | |
DenseMap< const MachineInstr *, MCSymbol * > | LabelsAfterInsn |
Maps instruction with label emitted after instruction. | |
Base class for debug information backends.
Common functionality related to tracking which variables and scopes are alive at a given PC live here.
Definition at line 53 of file DebugHandlerBase.h.
DebugHandlerBase::DebugHandlerBase ( AsmPrinter * A) | protected |
---|
◆ ~DebugHandlerBase()
DebugHandlerBase::~DebugHandlerBase ( ) | overridevirtualdefault |
---|
◆ beginBasicBlockSection()
◆ beginFunction()
Gather pre-function debug information.
Every beginFunction(MF) call should be followed by an endFunction(MF) call.
Implements llvm::AsmPrinterHandler.
Definition at line 255 of file DebugHandlerBase.cpp.
References llvm::any_of(), Asm, assert(), beginFunctionImpl(), llvm::calculateDbgEntityHistory(), DbgLabels, DbgValues, llvm::DbgValueHistoryMap::dump(), llvm::LexicalScopes::empty(), llvm::DbgValueHistoryMap::empty(), llvm::DbgLabelInstrMap::empty(), llvm::getDISubprogram(), llvm::MachineFunction::getFunction(), llvm::AsmPrinter::getFunctionBegin(), llvm::MachineFunction::getName(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::DILocalVariable::getScope(), llvm::MachineFunction::getSubtarget(), hasDebugInfo(), I, identifyScopeMarkers(), llvm::LexicalScopes::initialize(), llvm::InstructionOrdering::initialize(), llvm::DILocalVariable::isParameter(), LabelsBeforeInsn, LLVM_DEBUG, LScopes, llvm::AsmPrinter::MF, MI, PrevInstBB, PrevInstLoc, PrevLabel, requestLabelAfterInsn(), requestLabelBeforeInsn(), skippedNonDebugFunction(), llvm::DbgValueHistoryMap::trimLocationRanges(), and TrimVarLocs.
◆ beginFunctionImpl()
virtual void llvm::DebugHandlerBase::beginFunctionImpl ( const MachineFunction * MF) | protectedpure virtual |
---|
◆ beginInstruction()
Process beginning of an instruction.
Reimplemented from llvm::AsmPrinterHandler.
Reimplemented in llvm::CodeViewDebug, llvm::DwarfDebug, and llvm::BTFDebug.
Definition at line 353 of file DebugHandlerBase.cpp.
References Asm, assert(), llvm::MCContext::createTempSymbol(), CurMI, llvm::MachineModuleInfo::getContext(), llvm::AsmPrinter::hasDebugInfo(), I, LabelsBeforeInsn, MI, MMI, llvm::AsmPrinter::OutStreamer, and PrevLabel.
Referenced by llvm::CodeViewDebug::beginInstruction(), llvm::DwarfDebug::beginInstruction(), and llvm::BTFDebug::beginInstruction().
◆ beginModule()
void DebugHandlerBase::beginModule ( Module * M) | overridevirtual |
---|
◆ endBasicBlockSection()
Process the end of a basic-block-section within a function.
When basic-block-sections are enabled, called after the last block in each such section (including the last section in the function). When basic-block-sections are disabled, called at the end of a function, immediately prior to markFunctionEnd.
Reimplemented from llvm::AsmPrinterHandler.
Definition at line 430 of file DebugHandlerBase.cpp.
References PrevLabel.
◆ endFunction()
◆ endFunctionImpl()
virtual void llvm::DebugHandlerBase::endFunctionImpl ( const MachineFunction * MF) | protectedpure virtual |
---|
◆ endInstruction()
void DebugHandlerBase::endInstruction ( ) | overridevirtual |
---|
Process end of an instruction.
Reimplemented from llvm::AsmPrinterHandler.
Definition at line 379 of file DebugHandlerBase.cpp.
References Asm, assert(), llvm::MCContext::createTempSymbol(), CurMI, llvm::MachineModuleInfo::getContext(), llvm::MachineBasicBlock::getEndSymbol(), llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getNextNode(), llvm::MachineInstr::getParent(), llvm::AsmPrinter::hasDebugInfo(), I, llvm::MachineBasicBlock::isEndSection(), llvm::MachineInstr::isMetaInstruction(), LabelsAfterInsn, MMI, llvm::AsmPrinter::OutStreamer, PrevInstBB, and PrevLabel.
◆ getBaseTypeSize()
◆ getInstOrdering()
◆ getLabelAfterInsn()
◆ getLabelBeforeInsn()
◆ identifyScopeMarkers()
void DebugHandlerBase::identifyScopeMarkers ( ) | protected |
---|
Indentify instructions that are marking the beginning of or ending of a scope.
Definition at line 114 of file DebugHandlerBase.cpp.
References llvm::SmallVectorImpl< T >::append(), assert(), llvm::SmallVectorBase< Size_T >::empty(), llvm::LexicalScope::getChildren(), llvm::LexicalScopes::getCurrentFunctionScope(), llvm::LexicalScope::getRanges(), llvm::LexicalScope::isAbstractScope(), LScopes, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), requestLabelAfterInsn(), and requestLabelBeforeInsn().
Referenced by beginFunction().
◆ isUnsignedDIType()
◆ requestLabelAfterInsn()
void llvm::DebugHandlerBase::requestLabelAfterInsn ( const MachineInstr * MI) | inlineprotected |
---|
◆ requestLabelBeforeInsn()
void llvm::DebugHandlerBase::requestLabelBeforeInsn ( const MachineInstr * MI) | inlineprotected |
---|
◆ skippedNonDebugFunction()
virtual void llvm::DebugHandlerBase::skippedNonDebugFunction ( ) | inlineprotectedvirtual |
---|
◆ Asm
Target of debug info emission.
Definition at line 58 of file DebugHandlerBase.h.
Referenced by llvm::DwarfDebug::addDwarfTypeUnitType(), llvm::DwarfDebug::beginCodeAlignment(), beginFunction(), llvm::CodeViewDebug::beginFunctionImpl(), llvm::DwarfDebug::beginFunctionImpl(), llvm::BTFDebug::beginFunctionImpl(), beginInstruction(), llvm::CodeViewDebug::beginInstruction(), llvm::DwarfDebug::beginInstruction(), llvm::BTFDebug::beginInstruction(), beginModule(), llvm::CodeViewDebug::beginModule(), llvm::DwarfDebug::beginModule(), llvm::DwarfDebug::DwarfDebug(), llvm::DwarfDebug::emitDebugLocEntry(), llvm::DwarfDebug::emitDebugLocEntryLocation(), llvm::DwarfDebug::emitInitialLocDirective(), endFunction(), llvm::CodeViewDebug::endFunctionImpl(), llvm::DwarfDebug::endFunctionImpl(), endInstruction(), llvm::CodeViewDebug::endModule(), llvm::DwarfDebug::endModule(), llvm::DwarfDebug::getDwarfCompileUnitIDForLineTable(), llvm::DwarfDebug::getDwarfSectionOffsetForm(), llvm::DwarfDebug::getDwarfVersion(), and llvm::DwarfDebug::terminateLineTable().
◆ CurMI
◆ DbgLabels
◆ DbgValues
◆ EpilogBeginBlock
◆ LabelsAfterInsn
◆ LabelsBeforeInsn
◆ LScopes
◆ MMI
◆ PrevInstBB
◆ PrevInstLoc
DebugLoc llvm::DebugHandlerBase::PrevInstLoc | protected |
---|
◆ PrevLabel
MCSymbol* llvm::DebugHandlerBase::PrevLabel = nullptr | protected |
---|
◆ PrologEndLoc
The documentation for this class was generated from the following files:
- include/llvm/CodeGen/DebugHandlerBase.h
- lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp