class DwarfDebug
Declaration
class DwarfDebug : public DebugHandlerBase { /* full declaration omitted */ };
Description
Collects and handles dwarf debug information.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:297
Inherits from: DebugHandlerBase
Member Variables
Inherited from DebugHandlerBase:
- protected Asm
- protected MMI
- protected PrevInstLoc
- protected PrevLabel = nullptr
- protected PrevInstBB = nullptr
- protected PrologEndLoc
- protected CurMI = nullptr
- protected LScopes
- protected DbgValues
- protected DbgLabels
- protected LabelsBeforeInsn
- protected LabelsAfterInsn
Method Overview
- public DwarfDebug(llvm::AsmPrinter * A, llvm::Module * M)
- public void addAccelName(const llvm::DICompileUnit & CU, llvm::StringRef Name, const llvm::DIE & Die)
- public void addAccelNamespace(const llvm::DICompileUnit & CU, llvm::StringRef Name, const llvm::DIE & Die)
- public void addAccelObjC(const llvm::DICompileUnit & CU, llvm::StringRef Name, const llvm::DIE & Die)
- public void addAccelType(const llvm::DICompileUnit & CU, llvm::StringRef Name, const llvm::DIE & Die, char Flags)
- public void addArangeLabel(llvm::SymbolCU SCU)
- public void addDwarfTypeUnitType(llvm::DwarfCompileUnit & CU, llvm::StringRef Identifier, llvm::DIE & Die, const llvm::DICompositeType * CTy)
- public void addSectionLabel(const llvm::MCSymbol * Sym)
- public void addSubprogramNames(const llvm::DICompileUnit & CU, const llvm::DISubprogram * SP, llvm::DIE & Die)
- protected void beginFunctionImpl(const llvm::MachineFunction * MF)
- public void beginInstruction(const llvm::MachineInstr * MI)
- public void beginModule()
- public void emitDebugLocEntry(llvm::ByteStreamer & Streamer, const DebugLocStream::Entry & Entry, const llvm::DwarfCompileUnit * CU)
- public void emitDebugLocEntryLocation(const DebugLocStream::Entry & Entry, const llvm::DwarfCompileUnit * CU)
- public static void emitDebugLocValue(const llvm::AsmPrinter & AP, const llvm::DIBasicType * BT, const llvm::DbgValueLoc & Value, llvm::DwarfExpression & DwarfExpr)
- public llvm::DebugLoc emitInitialLocDirective(const llvm::MachineFunction & MF, unsigned int CUID)
- protected void endFunctionImpl(const llvm::MachineFunction * MF)
- public void endModule()
- public llvm::DwarfDebug::NonTypeUnitContext enterNonTypeUnitContext()
- public bool generateTypeUnits() const
- public llvm::AccelTableKind getAccelTableKind() const
- public llvm::AddressPool & getAddressPool()
- public const llvm::MachineFunction * getCurrentFunction() const
- public const llvm::DebugLocStream & getDebugLocs() const
- public uint16_t getDwarfVersion() const
- public const llvm::DwarfCompileUnit * getPrevCU() const
- public const llvm::MCSymbol * getSectionLabel(const llvm::MCSection * S)
- public bool isLexicalScopeDIENull(llvm::LexicalScope * Scope)
- public const llvm::DwarfCompileUnit * lookupCU(const llvm::DIE * Die) const
- public llvm::DwarfCompileUnit * lookupCU(const llvm::DIE * Die)
- public static uint64_t makeTypeSignature(llvm::StringRef Identifier)
- public void setPrevCU(const llvm::DwarfCompileUnit * PrevCU)
- public void setSymbolSize(const llvm::MCSymbol * Sym, uint64_t Size)
- public bool shareAcrossDWOCUs() const
- protected void skippedNonDebugFunction()
- public bool tuneForGDB() const
- public bool tuneForLLDB() const
- public bool tuneForSCE() const
- public bool useAllLinkageNames() const
- public bool useAppleExtensionAttributes() const
- public bool useDWARF2Bitfields() const
- public bool useGNUTLSOpcode() const
- public bool useInlineStrings() const
- public bool useLocSection() const
- public bool useRangesSection() const
- public bool useSectionsAsReferences() const
- public bool useSegmentedStringOffsetsTable() const
- public bool useSplitDwarf() const
- public ~DwarfDebug()
Inherited from DebugHandlerBase:
- public beginFunction
- protected beginFunctionImpl
- public beginInstruction
- public endFunction
- protected endFunctionImpl
- public endInstruction
- public getBaseTypeSize
- public getFunctionLocalOffsetAfterInsn
- public getLabelAfterInsn
- public getLabelBeforeInsn
- protected identifyScopeMarkers
- protected requestLabelAfterInsn
- protected requestLabelBeforeInsn
- protected skippedNonDebugFunction
Inherited from AsmPrinterHandler:
- public beginFragment
- public beginFunclet
- public beginFunction
- public beginInstruction
- public endFragment
- public endFunclet
- public endFunction
- public endInstruction
- public endModule
- public markFunctionEnd
- public setSymbolSize
Methods
¶DwarfDebug(llvm::AsmPrinter* A, llvm::Module* M)
DwarfDebug(llvm::AsmPrinter* A, llvm::Module* M)
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:609
Parameters
¶void addAccelName(const llvm::DICompileUnit& CU,
llvm::StringRef Name,
const llvm::DIE& Die)
void addAccelName(const llvm::DICompileUnit& CU,
llvm::StringRef Name,
const llvm::DIE& Die)
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:735
Parameters
- const llvm::DICompileUnit& CU
- llvm::StringRef Name
- const llvm::DIE& Die
¶void addAccelNamespace(
const llvm::DICompileUnit& CU,
llvm::StringRef Name,
const llvm::DIE& Die)
void addAccelNamespace(
const llvm::DICompileUnit& CU,
llvm::StringRef Name,
const llvm::DIE& Die)
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:739
Parameters
- const llvm::DICompileUnit& CU
- llvm::StringRef Name
- const llvm::DIE& Die
¶void addAccelObjC(const llvm::DICompileUnit& CU,
llvm::StringRef Name,
const llvm::DIE& Die)
void addAccelObjC(const llvm::DICompileUnit& CU,
llvm::StringRef Name,
const llvm::DIE& Die)
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:737
Parameters
- const llvm::DICompileUnit& CU
- llvm::StringRef Name
- const llvm::DIE& Die
¶void addAccelType(const llvm::DICompileUnit& CU,
llvm::StringRef Name,
const llvm::DIE& Die,
char Flags)
void addAccelType(const llvm::DICompileUnit& CU,
llvm::StringRef Name,
const llvm::DIE& Die,
char Flags)
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:742
Parameters
- const llvm::DICompileUnit& CU
- llvm::StringRef Name
- const llvm::DIE& Die
- char Flags
¶void addArangeLabel(llvm::SymbolCU SCU)
void addArangeLabel(llvm::SymbolCU SCU)
Description
Add a label so that arange data can be generated for it.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:648
Parameters
- llvm::SymbolCU SCU
¶void addDwarfTypeUnitType(
llvm::DwarfCompileUnit& CU,
llvm::StringRef Identifier,
llvm::DIE& Die,
const llvm::DICompositeType* CTy)
void addDwarfTypeUnitType(
llvm::DwarfCompileUnit& CU,
llvm::StringRef Identifier,
llvm::DIE& Die,
const llvm::DICompositeType* CTy)
Description
Add a DIE to the set of types that we're going to pull into type units.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:631
Parameters
- llvm::DwarfCompileUnit& CU
- llvm::StringRef Identifier
- llvm::DIE& Die
- const llvm::DICompositeType* CTy
¶void addSectionLabel(const llvm::MCSymbol* Sym)
void addSectionLabel(const llvm::MCSymbol* Sym)
Description
@ }
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:766
Parameters
- const llvm::MCSymbol* Sym
¶void addSubprogramNames(
const llvm::DICompileUnit& CU,
const llvm::DISubprogram* SP,
llvm::DIE& Die)
void addSubprogramNames(
const llvm::DICompileUnit& CU,
const llvm::DISubprogram* SP,
llvm::DIE& Die)
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:730
Parameters
- const llvm::DICompileUnit& CU
- const llvm::DISubprogram* SP
- llvm::DIE& Die
¶void beginFunctionImpl(
const llvm::MachineFunction* MF)
void beginFunctionImpl(
const llvm::MachineFunction* MF)
Description
Gather pre-function debug information.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:598
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/lib/CodeGen/AsmPrinter/DwarfDebug.h:624
Parameters
- const llvm::MachineInstr* MI
¶void beginModule()
void beginModule()
Description
Emit all Dwarf sections that should come prior to the content.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:615
¶void emitDebugLocEntry(
llvm::ByteStreamer& Streamer,
const DebugLocStream::Entry& Entry,
const llvm::DwarfCompileUnit* CU)
void emitDebugLocEntry(
llvm::ByteStreamer& Streamer,
const DebugLocStream::Entry& Entry,
const llvm::DwarfCompileUnit* CU)
Description
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.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:722
Parameters
- llvm::ByteStreamer& Streamer
- const DebugLocStream::Entry& Entry
- const llvm::DwarfCompileUnit* CU
¶void emitDebugLocEntryLocation(
const DebugLocStream::Entry& Entry,
const llvm::DwarfCompileUnit* CU)
void emitDebugLocEntryLocation(
const DebugLocStream::Entry& Entry,
const llvm::DwarfCompileUnit* CU)
Description
Emit the location for a debug loc entry, including the size header.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:727
Parameters
- const DebugLocStream::Entry& Entry
- const llvm::DwarfCompileUnit* CU
¶static void emitDebugLocValue(
const llvm::AsmPrinter& AP,
const llvm::DIBasicType* BT,
const llvm::DbgValueLoc& Value,
llvm::DwarfExpression& DwarfExpr)
static void emitDebugLocValue(
const llvm::AsmPrinter& AP,
const llvm::DIBasicType* BT,
const llvm::DbgValueLoc& Value,
llvm::DwarfExpression& DwarfExpr)
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:769
Parameters
- const llvm::AsmPrinter& AP
- const llvm::DIBasicType* BT
- const llvm::DbgValueLoc& Value
- llvm::DwarfExpression& DwarfExpr
¶llvm::DebugLoc emitInitialLocDirective(
const llvm::MachineFunction& MF,
unsigned int CUID)
llvm::DebugLoc emitInitialLocDirective(
const llvm::MachineFunction& MF,
unsigned int CUID)
Description
Emits inital debug location directive.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:621
Parameters
- const llvm::MachineFunction& MF
- unsigned int CUID
¶void endFunctionImpl(
const llvm::MachineFunction* MF)
void endFunctionImpl(
const llvm::MachineFunction* MF)
Description
Gather and emit post-function debug information.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:601
Parameters
- const llvm::MachineFunction* MF
¶void endModule()
void endModule()
Description
Emit all Dwarf sections that should come after the content.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:618
¶llvm::DwarfDebug::NonTypeUnitContext
enterNonTypeUnitContext()
llvm::DwarfDebug::NonTypeUnitContext
enterNonTypeUnitContext()
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:645
¶bool generateTypeUnits() const
bool generateTypeUnits() const
Description
Returns whether to generate DWARF v4 type units.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:683
¶llvm::AccelTableKind getAccelTableKind() const
llvm::AccelTableKind getAccelTableKind() const
Description
Returns what kind (if any) of accelerator tables to emit.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:688
¶llvm::AddressPool& getAddressPool()
llvm::AddressPool& getAddressPool()
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:733
¶const llvm::MachineFunction* getCurrentFunction()
const
const llvm::MachineFunction* getCurrentFunction()
const
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:745
¶const llvm::DebugLocStream& getDebugLocs() const
const llvm::DebugLocStream& getDebugLocs() const
Description
Returns the entries for the .debug_loc section.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:718
¶uint16_t getDwarfVersion() const
uint16_t getDwarfVersion() const
Description
Returns the Dwarf Version.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:711
¶const llvm::DwarfCompileUnit* getPrevCU() const
const llvm::DwarfCompileUnit* getPrevCU() const
Description
Returns the previous CU that was being updated
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:714
¶const llvm::MCSymbol* getSectionLabel(
const llvm::MCSection* S)
const llvm::MCSymbol* getSectionLabel(
const llvm::MCSection* S)
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:767
Parameters
- const llvm::MCSection* S
¶bool isLexicalScopeDIENull(
llvm::LexicalScope* Scope)
bool isLexicalScopeDIENull(
llvm::LexicalScope* Scope)
Description
A helper function to check whether the DIE for a given Scope is going to be null.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:749
Parameters
- llvm::LexicalScope* Scope
¶const llvm::DwarfCompileUnit* lookupCU(
const llvm::DIE* Die) const
const llvm::DwarfCompileUnit* lookupCU(
const llvm::DIE* Die) const
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:753
Parameters
- const llvm::DIE* Die
¶llvm::DwarfCompileUnit* lookupCU(
const llvm::DIE* Die)
llvm::DwarfCompileUnit* lookupCU(
const llvm::DIE* Die)
Description
Find the matching DwarfCompileUnit for the given CU DIE.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:752
Parameters
- const llvm::DIE* Die
¶static uint64_t makeTypeSignature(
llvm::StringRef Identifier)
static uint64_t makeTypeSignature(
llvm::StringRef Identifier)
Description
Perform an MD5 checksum of \p Identifier and return the lower 64 bits.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:627
Parameters
- llvm::StringRef Identifier
¶void setPrevCU(
const llvm::DwarfCompileUnit* PrevCU)
void setPrevCU(
const llvm::DwarfCompileUnit* PrevCU)
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:715
Parameters
- const llvm::DwarfCompileUnit* PrevCU
¶void setSymbolSize(const llvm::MCSymbol* Sym,
uint64_t Size)
void setSymbolSize(const llvm::MCSymbol* Sym,
uint64_t Size)
Description
For symbols that have a size designated (e.g. common symbols), this tracks that size.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:652
Parameters
- const llvm::MCSymbol* Sym
- uint64_t Size
¶bool shareAcrossDWOCUs() const
bool shareAcrossDWOCUs() const
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:708
¶void skippedNonDebugFunction()
void skippedNonDebugFunction()
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:603
¶bool tuneForGDB() const
bool tuneForGDB() const
Description
Returns whether we are "tuning" for a given debugger. @ {
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:761
¶bool tuneForLLDB() const
bool tuneForLLDB() const
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:762
¶bool tuneForSCE() const
bool tuneForSCE() const
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:763
¶bool useAllLinkageNames() const
bool useAllLinkageNames() const
Description
Returns whether we should emit all DW_AT_[MIPS_]linkage_name. If not, we still might emit certain cases.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:658
¶bool useAppleExtensionAttributes() const
bool useAppleExtensionAttributes() const
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:690
¶bool useDWARF2Bitfields() const
bool useDWARF2Bitfields() const
Description
Returns whether to use the DWARF2 format for bitfields instyead of the DWARF4 format.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:666
¶bool useGNUTLSOpcode() const
bool useGNUTLSOpcode() const
Description
Returns whether to use DW_OP_GNU_push_tls_address, instead of the standard DW_OP_form_tls_address opcode
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:662
¶bool useInlineStrings() const
bool useInlineStrings() const
Description
Returns whether to use inline strings.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:669
¶bool useLocSection() const
bool useLocSection() const
Description
Returns whether .debug_loc section should be emitted.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:680
¶bool useRangesSection() const
bool useRangesSection() const
Description
Returns whether ranges section should be emitted.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:672
¶bool useSectionsAsReferences() const
bool useSectionsAsReferences() const
Description
Returns whether to use sections as labels rather than temp symbols.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:675
¶bool useSegmentedStringOffsetsTable() const
bool useSegmentedStringOffsetsTable() const
Description
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.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:704
¶bool useSplitDwarf() const
bool useSplitDwarf() const
Description
Returns whether or not to change the current debug info for the split dwarf proposal support.
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:696
¶~DwarfDebug()
~DwarfDebug()
Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:611