LLVM
10.0.0svn
|
Collects and handles dwarf debug information. More...
#include "CodeGen/AsmPrinter/DwarfDebug.h"
Classes | |
class | NonTypeUnitContext |
Public Member Functions | |
DwarfDebug (AsmPrinter *A, Module *M) | |
~DwarfDebug () override | |
void | beginModule () |
Emit all Dwarf sections that should come prior to the content. More... | |
void | endModule () override |
Emit all Dwarf sections that should come after the content. More... | |
DebugLoc | emitInitialLocDirective (const MachineFunction &MF, unsigned CUID) |
Emits inital debug location directive. More... | |
void | beginInstruction (const MachineInstr *MI) override |
Process beginning of an instruction. More... | |
void | addDwarfTypeUnitType (DwarfCompileUnit &CU, StringRef Identifier, DIE &Die, const DICompositeType *CTy) |
Add a DIE to the set of types that we're going to pull into type units. More... | |
NonTypeUnitContext | enterNonTypeUnitContext () |
void | addArangeLabel (SymbolCU SCU) |
Add a label so that arange data can be generated for it. More... | |
void | setSymbolSize (const MCSymbol *Sym, uint64_t Size) override |
For symbols that have a size designated (e.g. More... | |
bool | useAllLinkageNames () const |
Returns whether we should emit all DW_AT_[MIPS_]linkage_name. More... | |
bool | useGNUTLSOpcode () const |
Returns whether to use DW_OP_GNU_push_tls_address, instead of the standard DW_OP_form_tls_address opcode. More... | |
bool | useDWARF2Bitfields () const |
Returns whether to use the DWARF2 format for bitfields instyead of the DWARF4 format. More... | |
bool | useInlineStrings () const |
Returns whether to use inline strings. More... | |
bool | useRangesSection () const |
Returns whether ranges section should be emitted. More... | |
bool | useSectionsAsReferences () const |
Returns whether to use sections as labels rather than temp symbols. More... | |
bool | useLocSection () const |
Returns whether .debug_loc section should be emitted. More... | |
bool | generateTypeUnits () const |
Returns whether to generate DWARF v4 type units. More... | |
AccelTableKind | getAccelTableKind () const |
Returns what kind (if any) of accelerator tables to emit. More... | |
bool | useAppleExtensionAttributes () const |
bool | useSplitDwarf () const |
Returns whether or not to change the current debug info for the split dwarf proposal support. More... | |
bool | useSegmentedStringOffsetsTable () const |
Returns whether to generate a string offsets table with (possibly shared) contributions from each CU and type unit. More... | |
bool | shareAcrossDWOCUs () const |
uint16_t | getDwarfVersion () const |
Returns the Dwarf Version. More... | |
const DwarfCompileUnit * | getPrevCU () const |
Returns the previous CU that was being updated. More... | |
void | setPrevCU (const DwarfCompileUnit *PrevCU) |
const DebugLocStream & | getDebugLocs () const |
Returns the entries for the .debug_loc section. More... | |
void | emitDebugLocEntry (ByteStreamer &Streamer, const DebugLocStream::Entry &Entry, const DwarfCompileUnit *CU) |
Emit an entry for the debug loc section. More... | |
void | emitDebugLocEntryLocation (const DebugLocStream::Entry &Entry, const DwarfCompileUnit *CU) |
Emit the location for a debug loc entry, including the size header. More... | |
void | addSubprogramNames (const DICompileUnit &CU, const DISubprogram *SP, DIE &Die) |
AddressPool & | getAddressPool () |
void | addAccelName (const DICompileUnit &CU, StringRef Name, const DIE &Die) |
void | addAccelObjC (const DICompileUnit &CU, StringRef Name, const DIE &Die) |
void | addAccelNamespace (const DICompileUnit &CU, StringRef Name, const DIE &Die) |
void | addAccelType (const DICompileUnit &CU, StringRef Name, const DIE &Die, char Flags) |
const MachineFunction * | getCurrentFunction () const |
bool | isLexicalScopeDIENull (LexicalScope *Scope) |
A helper function to check whether the DIE for a given Scope is going to be null. More... | |
DwarfCompileUnit * | lookupCU (const DIE *Die) |
Find the matching DwarfCompileUnit for the given CU DIE. More... | |
const DwarfCompileUnit * | lookupCU (const DIE *Die) const |
bool | tuneForGDB () const |
bool | tuneForLLDB () const |
bool | tuneForSCE () const |
void | addSectionLabel (const MCSymbol *Sym) |
const MCSymbol * | getSectionLabel (const MCSection *S) |
![]() | |
void | endInstruction () override |
Process end of an instruction. More... | |
void | beginFunction (const MachineFunction *MF) override |
Gather pre-function debug information. More... | |
void | endFunction (const MachineFunction *MF) override |
Gather post-function debug information. More... | |
MCSymbol * | getLabelBeforeInsn (const MachineInstr *MI) |
Return Label preceding the instruction. More... | |
MCSymbol * | getLabelAfterInsn (const MachineInstr *MI) |
Return Label immediately following the instruction. More... | |
const MCExpr * | getFunctionLocalOffsetAfterInsn (const MachineInstr *MI) |
Return the function-local offset of an instruction. More... | |
![]() | |
virtual | ~AsmPrinterHandler () |
Pin vtable to this file. More... | |
virtual void | markFunctionEnd () |
virtual void | beginFragment (const MachineBasicBlock *MBB, ExceptionSymbolProvider ESP) |
virtual void | endFragment () |
virtual void | beginFunclet (const MachineBasicBlock &MBB, MCSymbol *Sym=nullptr) |
Emit target-specific EH funclet machinery. More... | |
virtual void | endFunclet () |
Static Public Member Functions | |
static uint64_t | makeTypeSignature (StringRef Identifier) |
Perform an MD5 checksum of Identifier and return the lower 64 bits. More... | |
static void | emitDebugLocValue (const AsmPrinter &AP, const DIBasicType *BT, const DbgValueLoc &Value, DwarfExpression &DwarfExpr) |
![]() | |
static uint64_t | getBaseTypeSize (const DIType *Ty) |
If this type is derived from a base type then return base type size. More... | |
Protected Member Functions | |
void | beginFunctionImpl (const MachineFunction *MF) override |
Gather pre-function debug information. More... | |
void | endFunctionImpl (const MachineFunction *MF) override |
Gather and emit post-function debug information. More... | |
void | skippedNonDebugFunction () override |
![]() | |
DebugHandlerBase (AsmPrinter *A) | |
void | identifyScopeMarkers () |
Indentify instructions that are marking the beginning of or ending of a scope. More... | |
void | requestLabelBeforeInsn (const MachineInstr *MI) |
Ensure that a label will be emitted before MI. More... | |
void | requestLabelAfterInsn (const MachineInstr *MI) |
Ensure that a label will be emitted after MI. More... | |
Friends | |
class | NonTypeUnitContext |
Additional Inherited Members | |
![]() | |
AsmPrinter * | Asm |
Target of debug info emission. More... | |
MachineModuleInfo * | MMI |
Collected machine module information. More... | |
DebugLoc | PrevInstLoc |
Previous instruction's location information. More... | |
MCSymbol * | PrevLabel = nullptr |
const MachineBasicBlock * | PrevInstBB = nullptr |
DebugLoc | PrologEndLoc |
This location indicates end of function prologue and beginning of function body. More... | |
const MachineInstr * | CurMI = nullptr |
If nonnull, stores the current machine instruction we're processing. More... | |
LexicalScopes | LScopes |
DbgValueHistoryMap | DbgValues |
History of DBG_VALUE and clobber instructions for each user variable. More... | |
DbgLabelInstrMap | DbgLabels |
Mapping of inlined labels and DBG_LABEL machine instruction. More... | |
DenseMap< const MachineInstr *, MCSymbol * > | LabelsBeforeInsn |
Maps instruction with label emitted before instruction. More... | |
DenseMap< const MachineInstr *, MCSymbol * > | LabelsAfterInsn |
Maps instruction with label emitted after instruction. More... | |
Collects and handles dwarf debug information.
Definition at line 292 of file DwarfDebug.h.
DwarfDebug::DwarfDebug | ( | AsmPrinter * | A, |
Module * | M | ||
) |
Definition at line 343 of file DwarfDebug.cpp.
References AllLinkageNames, llvm::DebugHandlerBase::Asm, computeAccelTableKind(), llvm::TargetOptions::DebuggerTuning, llvm::Default, DefaultLinkageNames, llvm::dwarf::DWARF_VERSION, DwarfLinkageNames, llvm::MCTargetOptions::DwarfVersion, llvm::Enable, llvm::GDB, GenerateDwarfTypeUnits, llvm::Module::getDwarfVersion(), llvm::MachineModuleInfo::getModule(), llvm::TargetMachine::getTargetTriple(), llvm::Triple::isNVPTX(), llvm::Triple::isOSBinFormatELF(), llvm::Triple::isPS4CPU(), llvm::LLDB, llvm::TargetOptions::MCOptions, llvm::DebugHandlerBase::MMI, llvm::TargetMachine::Options, llvm::AsmPrinter::OutStreamer, llvm::SCE, llvm::MCTargetOptions::SplitDwarfFile, llvm::AsmPrinter::TM, TT, tuneForGDB(), tuneForLLDB(), tuneForSCE(), and ~DwarfDebug().
|
overridedefault |
Referenced by DwarfDebug().
void DwarfDebug::addAccelName | ( | const DICompileUnit & | CU, |
StringRef | Name, | ||
const DIE & | Die | ||
) |
Definition at line 3010 of file DwarfDebug.cpp.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), and addSubprogramNames().
void DwarfDebug::addAccelNamespace | ( | const DICompileUnit & | CU, |
StringRef | Name, | ||
const DIE & | Die | ||
) |
Definition at line 3022 of file DwarfDebug.cpp.
Referenced by llvm::DwarfUnit::getOrCreateNameSpace().
void DwarfDebug::addAccelObjC | ( | const DICompileUnit & | CU, |
StringRef | Name, | ||
const DIE & | Die | ||
) |
Definition at line 3015 of file DwarfDebug.cpp.
References llvm::Apple, and getAccelTableKind().
Referenced by addSubprogramNames().
void DwarfDebug::addAccelType | ( | const DICompileUnit & | CU, |
StringRef | Name, | ||
const DIE & | Die, | ||
char | Flags | ||
) |
Definition at line 3027 of file DwarfDebug.cpp.
Referenced by llvm::DwarfUnit::applySubprogramAttributes(), and llvm::DwarfUnit::getOrCreateTypeDIE().
|
inline |
Add a label so that arange data can be generated for it.
Definition at line 637 of file DwarfDebug.h.
Referenced by llvm::DwarfCompileUnit::addLabelAddress(), llvm::DwarfCompileUnit::addLocalLabelAddress(), and llvm::DwarfCompileUnit::addLocationAttribute().
void DwarfDebug::addDwarfTypeUnitType | ( | DwarfCompileUnit & | CU, |
StringRef | Identifier, | ||
DIE & | Die, | ||
const DICompositeType * | CTy | ||
) |
Add a DIE to the set of types that we're going to pull into type units.
Definition at line 2876 of file DwarfDebug.cpp.
References llvm::DwarfUnit::addDIETypeSignature(), llvm::DebugHandlerBase::Asm, assert(), getDwarfVersion(), llvm::DIE::getUnitDie(), llvm::AddressPool::hasBeenUsed(), llvm::MipsISD::Ins, makeTypeSignature(), useSegmentedStringOffsetsTable(), and useSplitDwarf().
Referenced by llvm::DwarfUnit::createTypeDIE().
void DwarfDebug::addSubprogramNames | ( | const DICompileUnit & | CU, |
const DISubprogram * | SP, | ||
DIE & | Die | ||
) |
Definition at line 451 of file DwarfDebug.cpp.
References addAccelName(), addAccelObjC(), llvm::Apple, llvm::DwarfFile::getAbstractSPDies(), getAccelTableKind(), llvm::DIScope::getName(), llvm::DICompileUnit::getNameTableKind(), getObjCClassCategory(), getObjCMethodName(), isObjCClass(), llvm::DICompileUnit::None, and useAllLinkageNames().
Referenced by llvm::DwarfCompileUnit::constructInlinedScopeDIE(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
|
overrideprotectedvirtual |
Gather pre-function debug information.
Implements llvm::DebugHandlerBase.
Definition at line 1779 of file DwarfDebug.cpp.
References llvm::DebugHandlerBase::Asm, assert(), emitInitialLocDirective(), llvm::LexicalScopes::empty(), llvm::LexicalScopes::getCurrentFunctionScope(), llvm::MachineFunction::getFunction(), llvm::AsmPrinter::getFunctionBegin(), llvm::LexicalScope::getScopeNode(), llvm::MCSymbol::getSection(), llvm::Function::getSubprogram(), llvm::DwarfCompileUnit::getUniqueID(), llvm::DebugHandlerBase::LScopes, llvm::DICompileUnit::NoDebug, llvm::AsmPrinter::OutStreamer, and llvm::DebugHandlerBase::PrologEndLoc.
|
overridevirtual |
Process beginning of an instruction.
Reimplemented from llvm::DebugHandlerBase.
Definition at line 1633 of file DwarfDebug.cpp.
References llvm::DebugHandlerBase::Asm, assert(), llvm::DebugHandlerBase::beginInstruction(), llvm::DebugHandlerBase::CurMI, DWARF2_FLAG_IS_STMT, DWARF2_FLAG_PROLOGUE_END, llvm::Enable, llvm::MachineInstr::FrameSetup, llvm::DebugLoc::getCol(), llvm::MachineInstr::getDebugLoc(), llvm::MachineInstr::getFlag(), llvm::MachineFunction::getFunction(), llvm::DebugLoc::getLine(), llvm::MachineInstr::getMF(), llvm::MachineInstr::getParent(), llvm::DebugLoc::getScope(), llvm::Function::getSubprogram(), llvm::MachineInstr::hasDelaySlot(), llvm::MachineInstr::isCall(), llvm::MachineInstr::isMetaInstruction(), llvm::DICompileUnit::NoDebug, llvm::AsmPrinter::OutStreamer, llvm::DebugHandlerBase::PrevInstBB, llvm::DebugHandlerBase::PrevInstLoc, llvm::DebugHandlerBase::PrevLabel, llvm::DebugHandlerBase::PrologEndLoc, and llvm::DebugHandlerBase::requestLabelAfterInsn().
void DwarfDebug::beginModule | ( | ) |
Emit all Dwarf sections that should come prior to the content.
Definition at line 929 of file DwarfDebug.cpp.
References llvm::DwarfUnit::addString(), llvm::DwarfUnit::addUInt(), llvm::any_of(), llvm::DebugHandlerBase::Asm, assert(), llvm::DIE::children(), llvm::DIEHash::computeCUSignature(), llvm::DwarfFile::computeSizeAndOffsets(), llvm::DwarfUnit::constructContainingTypeDIEs(), llvm::AsmPrinter::createTempSymbol(), llvm::Module::debug_compile_units(), llvm::Module::debug_compile_units_begin(), llvm::Module::debug_compile_units_end(), DisableDebugInfoPrinting, llvm::iterator_range< IteratorT >::empty(), llvm::DwarfCompileUnit::finishEntityDefinition(), llvm::DwarfCompileUnit::finishSubprogramDefinition(), for(), forBothCUs(), llvm::MCSection::getBeginSymbol(), llvm::DwarfUnit::getCUNode(), llvm::MCObjectFileInfo::getDwarfLoclistsSection(), llvm::MCObjectFileInfo::getDwarfMacinfoSection(), llvm::MCObjectFileInfo::getDwarfRangesSection(), getDwarfVersion(), llvm::DebugLocStream::getLists(), llvm::MachineModuleInfo::getModule(), llvm::AsmPrinter::getObjFileLowering(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), llvm::DwarfUnit::getOrCreateTypeDIE(), llvm::DwarfFile::getRangeLists(), llvm::DwarfCompileUnit::getRanges(), llvm::DwarfCompileUnit::getSkeleton(), llvm::DebugLocStream::getSym(), llvm::DIE::getUnitDie(), llvm::DIEUnit::getUnitDie(), llvm::Module::globals(), llvm::MachineModuleInfo::hasDebugInfo(), llvm::ARM_PROC::IE, llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::insert(), llvm::DICompileUnit::isDebugDirectivesOnly(), llvm::AddressPool::isEmpty(), llvm::TargetOptions::MCOptions, llvm::DebugHandlerBase::MMI, llvm::DICompileUnit::NoDebug, llvm::TargetMachine::Options, P, llvm::MachineModuleInfo::setDebugInfoAvailability(), llvm::DwarfCompileUnit::setDWOId(), llvm::AddressPool::setLabel(), llvm::DwarfFile::setRnglistsTableBaseSym(), llvm::DebugLocStream::setSym(), sortGlobalExprs(), llvm::MCTargetOptions::SplitDwarfFile, T, llvm::DwarfCompileUnit::takeRanges(), llvm::TimePassesIsEnabled, llvm::AsmPrinter::TM, useRangesSection(), useSegmentedStringOffsetsTable(), and useSplitDwarf().
Referenced by llvm::AsmPrinter::doInitialization().
void DwarfDebug::emitDebugLocEntry | ( | ByteStreamer & | Streamer, |
const DebugLocStream::Entry & | Entry, | ||
const DwarfCompileUnit * | CU | ||
) |
Emit an entry for the debug loc section.
This can be used to handle an entry that's going to be emitted into the debug loc section.
Definition at line 2132 of file DwarfDebug.cpp.
References llvm::DebugLocStream::getComments().
Referenced by emitDebugLocEntryLocation().
void DwarfDebug::emitDebugLocEntryLocation | ( | const DebugLocStream::Entry & | Entry, |
const DwarfCompileUnit * | CU | ||
) |
Emit the location for a debug loc entry, including the size header.
Definition at line 2247 of file DwarfDebug.cpp.
References llvm::DebugHandlerBase::Asm, emitDebugLocEntry(), llvm::AsmPrinter::emitInt16(), llvm::AsmPrinter::EmitULEB128(), llvm::DebugLocStream::getBytes(), getDwarfVersion(), llvm::max(), and llvm::AsmPrinter::OutStreamer.
Referenced by emitLocList().
|
static |
Definition at line 2183 of file DwarfDebug.cpp.
References llvm::DwarfExpression::addExpression(), llvm::DwarfExpression::addFragmentOffset(), llvm::DwarfExpression::addMachineRegExpression(), llvm::DwarfExpression::addSignedConstant(), llvm::DwarfExpression::addUnsignedConstant(), llvm::DwarfExpression::beginEntryValueExpression(), llvm::APFloat::bitcastToAPInt(), llvm::DbgValueLoc::getConstantFP(), llvm::DIBasicType::getEncoding(), llvm::DbgValueLoc::getExpression(), llvm::DbgValueLoc::getInt(), llvm::DbgValueLoc::getLoc(), llvm::MachineLocation::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::ConstantFP::getValueAPF(), llvm::DbgValueLoc::isConstantFP(), llvm::MachineLocation::isIndirect(), llvm::DbgValueLoc::isInt(), llvm::DbgValueLoc::isLocation(), llvm::AsmPrinter::MF, llvm::DwarfExpression::setEntryValueFlag(), and llvm::DwarfExpression::setMemoryLocationKind().
Referenced by llvm::DwarfCompileUnit::constructCallSiteParmEntryDIEs().
DebugLoc DwarfDebug::emitInitialLocDirective | ( | const MachineFunction & | MF, |
unsigned | CUID | ||
) |
Emits inital debug location directive.
Definition at line 1759 of file DwarfDebug.cpp.
References llvm::DebugHandlerBase::Asm, DWARF2_FLAG_IS_STMT, findPrologueEndLoc(), getDwarfVersion(), llvm::MachineFunction::getFunction(), llvm::Function::getSubprogram(), and llvm::DebugHandlerBase::PrologEndLoc.
Referenced by beginFunctionImpl(), and llvm::AsmPrinter::emitInitialRawDwarfLocDirective().
|
overrideprotectedvirtual |
Gather and emit post-function debug information.
Implements llvm::DebugHandlerBase.
Definition at line 1815 of file DwarfDebug.cpp.
References llvm::DebugHandlerBase::Asm, assert(), llvm::DwarfFile::emitAbbrevs(), llvm::emitAppleAccelTable(), llvm::emitDWARF5AccelTable(), llvm::DwarfStringPool::emitStringOffsetsTableHeader(), llvm::DwarfFile::emitUnits(), llvm::empty(), llvm::LexicalScopes::getAbstractScopesList(), llvm::MCSection::getBeginSymbol(), llvm::LexicalScopes::getCurrentFunctionScope(), llvm::MCObjectFileInfo::getDwarfAbbrevSection(), llvm::MCObjectFileInfo::getDwarfAccelNamespaceSection(), llvm::MCObjectFileInfo::getDwarfAccelNamesSection(), llvm::MCObjectFileInfo::getDwarfAccelObjCSection(), llvm::MCObjectFileInfo::getDwarfAccelTypesSection(), llvm::MCObjectFileInfo::getDwarfStrOffSection(), getDwarfVersion(), llvm::MachineFunction::getFunction(), llvm::AsmPrinter::getFunctionBegin(), llvm::AsmPrinter::getFunctionEnd(), llvm::AsmPrinter::getObjFileLowering(), llvm::DwarfFile::getScopeLabels(), llvm::LexicalScope::getScopeNode(), llvm::DwarfFile::getScopeVariables(), llvm::DwarfFile::getStringOffsetsStartSym(), llvm::DwarfFile::getStringPool(), llvm::Function::getSubprogram(), llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::insert(), llvm::DICompileUnit::LineTablesOnly, llvm_unreachable, llvm::DebugHandlerBase::LScopes, llvm::AsmPrinter::OutStreamer, llvm::DebugHandlerBase::PrevLabel, llvm::ARMBuildAttrs::Section, and useSplitDwarf().
|
overridevirtual |
Emit all Dwarf sections that should come after the content.
Implements llvm::AsmPrinterHandler.
Definition at line 1167 of file DwarfDebug.cpp.
References llvm::Apple, assert(), llvm::DwarfCompileUnit::createBaseTypeDIEs(), llvm::DebugHandlerBase::CurMI, llvm::Default, llvm::Dwarf, GenerateARangeSection, getAccelTableKind(), llvm::MachineModuleInfo::hasDebugInfo(), llvm_unreachable, llvm::DebugHandlerBase::MMI, llvm::None, P, and useSplitDwarf().
DwarfDebug::NonTypeUnitContext DwarfDebug::enterNonTypeUnitContext | ( | ) |
Definition at line 2974 of file DwarfDebug.cpp.
References llvm::AccelTable< DataT >::addName(), llvm::Apple, llvm::Default, llvm::DICompileUnit::Default, llvm::Dwarf, getAccelTableKind(), llvm::DwarfStringPool::getEntry(), llvm::DICompileUnit::getNameTableKind(), llvm::DwarfFile::getStringPool(), llvm_unreachable, llvm::None, NonTypeUnitContext, llvm::Ref, and useSplitDwarf().
Referenced by llvm::DwarfUnit::createTypeDIE().
|
inline |
Returns whether to generate DWARF v4 type units.
Definition at line 672 of file DwarfDebug.h.
Referenced by llvm::DwarfUnit::createTypeDIE(), and llvm::DwarfUnit::isShareableAcrossCUs().
|
inline |
Returns what kind (if any) of accelerator tables to emit.
Definition at line 677 of file DwarfDebug.h.
Referenced by addAccelObjC(), addSubprogramNames(), endModule(), enterNonTypeUnitContext(), and llvm::DwarfCompileUnit::hasDwarfPubSections().
|
inline |
Definition at line 722 of file DwarfDebug.h.
Referenced by llvm::DwarfCompileUnit::addAddrTableBase(), llvm::DwarfCompileUnit::addLabelAddress(), llvm::DwarfCompileUnit::addLocationAttribute(), llvm::DwarfUnit::addOpAddress(), and emitRangeList().
|
inline |
Definition at line 734 of file DwarfDebug.h.
Referenced by llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
|
inline |
Returns the entries for the .debug_loc section.
Definition at line 707 of file DwarfDebug.h.
Referenced by emitLocList(), emitLoclistsTableHeader(), and llvm::DIELocList::EmitValue().
uint16_t DwarfDebug::getDwarfVersion | ( | ) | const |
Returns the Dwarf Version.
Definition at line 3032 of file DwarfDebug.cpp.
References llvm::AsmPrinter::OutStreamer.
Referenced by llvm::DwarfUnit::addBlock(), addDwarfTypeUnitType(), llvm::DwarfUnit::addFlag(), llvm::DwarfCompileUnit::addLabelAddress(), llvm::DwarfUnit::addLinkageName(), llvm::DwarfCompileUnit::addLocationList(), llvm::DwarfUnit::addOpAddress(), llvm::DwarfUnit::addRnglistsBase(), llvm::DwarfCompileUnit::addScopeRangeList(), llvm::DwarfUnit::addSectionDelta(), llvm::DwarfUnit::addSectionLabel(), llvm::DwarfUnit::addSectionOffset(), beginModule(), collectCallSiteParameters(), llvm::DwarfCompileUnit::constructCallSiteEntryDIE(), llvm::DwarfUnit::constructContainingTypeDIEs(), llvm::DwarfCompileUnit::constructInlinedScopeDIE(), llvm::DwarfUnit::emitCommonHeader(), emitDebugLocEntryLocation(), emitDebugRangesImpl(), llvm::DwarfCompileUnit::emitHeader(), emitInitialLocDirective(), emitLocList(), emitRangeList(), endFunctionImpl(), llvm::DwarfUnit::getDwarfVersion(), llvm::DwarfUnit::getHeaderSize(), llvm::DwarfCompileUnit::getHeaderSize(), llvm::DwarfUnit::getMD5AsBytes(), llvm::DwarfUnit::getOrCreateTypeDIE(), llvm::DwarfCompileUnit::hasDwarfPubSections(), hasVectorBeenPadded(), useGNUAnalogForDwarf5Feature(), and llvm::DwarfUnit::~DwarfUnit().
|
inline |
Returns the previous CU that was being updated.
Definition at line 703 of file DwarfDebug.h.
Referenced by llvm::DwarfCompileUnit::addRange().
Definition at line 3036 of file DwarfDebug.cpp.
Referenced by emitRangeList().
bool DwarfDebug::isLexicalScopeDIENull | ( | LexicalScope * | Scope | ) |
A helper function to check whether the DIE for a given Scope is going to be null.
Check whether we should create a DIE for the given Scope, return true if we don't create a DIE (the corresponding DIE is null).
Definition at line 485 of file DwarfDebug.cpp.
References llvm::SmallVectorBase::empty(), llvm::SmallVectorTemplateCommon< T, typename >::front(), llvm::DebugHandlerBase::getLabelAfterInsn(), llvm::LexicalScope::getRanges(), llvm::LexicalScope::isAbstractScope(), and llvm::SmallVectorBase::size().
Referenced by llvm::DwarfCompileUnit::constructLexicalScopeDIE(), and llvm::DwarfCompileUnit::constructScopeDIE().
|
inline |
Find the matching DwarfCompileUnit for the given CU DIE.
Definition at line 741 of file DwarfDebug.h.
References llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::lookup().
Referenced by llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE().
|
inline |
Definition at line 742 of file DwarfDebug.h.
References llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::lookup().
|
static |
Perform an MD5 checksum of Identifier
and return the lower 64 bits.
Definition at line 2865 of file DwarfDebug.cpp.
References llvm::MD5::final(), llvm::MD5::MD5Result::high(), and llvm::MD5::update().
Referenced by addDwarfTypeUnitType().
|
inline |
Definition at line 704 of file DwarfDebug.h.
Referenced by llvm::DwarfCompileUnit::addRange().
For symbols that have a size designated (e.g.
common symbols), this tracks that size.
Implements llvm::AsmPrinterHandler.
Definition at line 641 of file DwarfDebug.h.
References Size.
bool DwarfDebug::shareAcrossDWOCUs | ( | ) | const |
Definition at line 509 of file DwarfDebug.cpp.
References assert(), llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE(), llvm::LexicalScope::getInlinedAt(), llvm::LexicalScope::getScopeNode(), llvm::LexicalScope::isAbstractScope(), SplitDwarfCrossCuReferences, and useSplitDwarf().
Referenced by llvm::DwarfUnit::isShareableAcrossCUs().
|
overrideprotectedvirtual |
Reimplemented from llvm::DebugHandlerBase.
Definition at line 1806 of file DwarfDebug.cpp.
|
inline |
Returns whether we should emit all DW_AT_[MIPS_]linkage_name.
If not, we still might emit certain cases.
Definition at line 647 of file DwarfDebug.h.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), addSubprogramNames(), and llvm::DwarfUnit::applySubprogramDefinitionAttributes().
|
inline |
Definition at line 679 of file DwarfDebug.h.
Referenced by llvm::DwarfUnit::applySubprogramAttributes(), collectCallSiteParameters(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
|
inline |
Returns whether to use the DWARF2 format for bitfields instyead of the DWARF4 format.
Definition at line 655 of file DwarfDebug.h.
Referenced by llvm::DwarfUnit::constructContainingTypeDIEs().
|
inline |
Returns whether to use DW_OP_GNU_push_tls_address, instead of the standard DW_OP_form_tls_address opcode.
Definition at line 651 of file DwarfDebug.h.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute().
|
inline |
Returns whether to use inline strings.
Definition at line 658 of file DwarfDebug.h.
Referenced by llvm::DwarfUnit::addString().
|
inline |
Returns whether .debug_loc section should be emitted.
Definition at line 669 of file DwarfDebug.h.
|
inline |
Returns whether ranges section should be emitted.
Definition at line 661 of file DwarfDebug.h.
Referenced by llvm::DwarfCompileUnit::attachRangesOrLowHighPC(), beginModule(), and emitDebugRangesImpl().
|
inline |
Returns whether to use sections as labels rather than temp symbols.
Definition at line 664 of file DwarfDebug.h.
Referenced by computeIndexValue(), llvm::DwarfUnit::emitCommonHeader(), llvm::DwarfCompileUnit::emitHeader(), and llvm::DwarfCompileUnit::initStmtList().
|
inline |
Returns whether to generate a string offsets table with (possibly shared) contributions from each CU and type unit.
This implies the use of DW_FORM_strx* indirect references with DWARF v5 and beyond. Note that DW_FORM_GNU_str_index is also an indirect reference, but it is used with a pre-DWARF v5 implementation of split DWARF sections, which uses a monolithic string offsets table.
Definition at line 693 of file DwarfDebug.h.
Referenced by addDwarfTypeUnitType(), beginModule(), collectCallSiteParameters(), computeIndexValue(), emitDebugRangesImpl(), and llvm::DwarfUnit::useSegmentedStringOffsetsTable().
|
inline |
Returns whether or not to change the current debug info for the split dwarf proposal support.
Definition at line 685 of file DwarfDebug.h.
Referenced by addDwarfTypeUnitType(), llvm::DwarfCompileUnit::addLabelAddress(), llvm::DwarfCompileUnit::addLocationAttribute(), llvm::DwarfUnit::addOpAddress(), llvm::DwarfUnit::addSectionLabel(), llvm::DwarfCompileUnit::applySubprogramAttributesToDefinition(), beginModule(), collectCallSiteParameters(), computeIndexValue(), emitDebugRangesImpl(), llvm::emitDWARF5AccelTable(), llvm::DwarfCompileUnit::emitHeader(), llvm::DwarfTypeUnit::emitHeader(), llvm::DIELocList::EmitValue(), endFunctionImpl(), endModule(), enterNonTypeUnitContext(), llvm::DwarfCompileUnit::getHeaderSize(), llvm::DwarfCompileUnit::includeMinimalInlineScopes(), and shareAcrossDWOCUs().
|
friend |
Definition at line 623 of file DwarfDebug.h.
Referenced by enterNonTypeUnitContext().