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 | |
|---|---|
| ~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 |
| const LexicalScopes & | getLexicalScopes () const |
| Public Member Functions inherited from llvm::AsmPrinterHandler | |
| virtual | ~AsmPrinterHandler () |
| Pin vtables to this file. | |
| virtual void | endModule ()=0 |
| Emit all sections that should come after the content. | |
| virtual void | markFunctionEnd () |
| virtual void | setSymbolSize (const MCSymbol *Sym, uint64_t Size) |
| For symbols that have a size designated (e.g. | |
| 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 ( ) | overridedefault |
|---|
◆ 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 266 of file DebugHandlerBase.cpp.
References llvm::any_of(), Asm, assert(), beginFunctionImpl(), llvm::calculateDbgEntityHistory(), DbgLabels, DbgValues, llvm::dwarf_linker::DebugLoc, llvm::getDISubprogram(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getName(), llvm::DILocalVariable::getScope(), hasDebugInfo(), I, identifyScopeMarkers(), llvm::DILocalVariable::isParameter(), LabelsBeforeInsn, LLVM_DEBUG, LScopes, MI, PrevInstBB, PrevInstLoc, PrevLabel, requestLabelAfterInsn(), requestLabelBeforeInsn(), skippedNonDebugFunction(), and TrimVarLocs.
◆ beginFunctionImpl()
| virtual void llvm::DebugHandlerBase::beginFunctionImpl ( const MachineFunction * MF) | protectedpure virtual |
|---|
◆ 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 441 of file DebugHandlerBase.cpp.
References MBB, and PrevLabel.
◆ endFunction()
◆ endFunctionImpl()
| virtual void llvm::DebugHandlerBase::endFunctionImpl ( const MachineFunction * MF) | protectedpure virtual |
|---|
◆ endInstruction()
| void DebugHandlerBase::endInstruction ( ) | overridevirtual |
|---|
◆ getBaseTypeSize()
◆ getInstOrdering()
◆ getLabelAfterInsn()
◆ getLabelBeforeInsn()
◆ getLexicalScopes()
◆ identifyScopeMarkers()
| void DebugHandlerBase::identifyScopeMarkers ( ) | protected |
|---|
Indentify instructions that are marking the beginning of or ending of a scope.
Definition at line 116 of file DebugHandlerBase.cpp.
References llvm::SmallVectorImpl< T >::append(), assert(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::LexicalScope::getChildren(), 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::BTFDebug::beginFunctionImpl(), llvm::CodeViewDebug::beginFunctionImpl(), llvm::DwarfDebug::beginFunctionImpl(), llvm::BTFDebug::beginInstruction(), llvm::CodeViewDebug::beginInstruction(), beginInstruction(), llvm::DwarfDebug::beginInstruction(), llvm::CodeViewDebug::beginModule(), beginModule(), llvm::DwarfDebug::beginModule(), llvm::BTFDebug::BTFDebug(), llvm::CodeViewDebug::CodeViewDebug(), DebugHandlerBase(), 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