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

Inherited from DebugHandlerBase:

Inherited from AsmPrinterHandler:

Methods

DwarfDebug(llvm::AsmPrinter* A, llvm::Module* M)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:609

Parameters

llvm::AsmPrinter* A
llvm::Module* M

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)

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)

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)

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)

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)

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)

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)

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)

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)

Description

Process beginning of an instruction.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:624

Parameters

const llvm::MachineInstr* MI

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)

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)

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)

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)

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)

Description

Gather and emit post-function debug information.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:601

Parameters

const llvm::MachineFunction* MF

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()

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:645

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

Description

Returns what kind (if any) of accelerator tables to emit.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:688

llvm::AddressPool& getAddressPool()

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:733

const llvm::MachineFunction* getCurrentFunction()
    const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:745

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

Description

Returns the Dwarf Version.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:711

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)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:767

Parameters

const llvm::MCSection* S

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

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:753

Parameters

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)

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)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:715

Parameters

const llvm::DwarfCompileUnit* PrevCU

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

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:708

void skippedNonDebugFunction()

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:603

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

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:762

bool tuneForSCE() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:763

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

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:690

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

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

Description

Returns whether to use inline strings.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:669

bool useLocSection() const

Description

Returns whether .debug_loc section should be emitted.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:680

bool useRangesSection() const

Description

Returns whether ranges section should be emitted.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:672

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

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

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()

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:611