class DWARFUnitVector

Declaration

class DWARFUnitVector : public SmallVector { /* full declaration omitted */ };

Description

Describe a collection of units. Intended to hold all units either from .debug_info and .debug_types, or from .debug_info.dwo and .debug_types.dwo.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:124

Inherits from: SmallVector

Member Variables

private std::function<std::unique_ptr<DWARFUnit>( uint64_t, DWARFSectionKind, const DWARFSection*, const DWARFUnitIndex::Entry*)> Parser
private int NumInfoUnits = -1

Method Overview

  • public llvm::DWARFUnit * addUnit(std::unique_ptr<DWARFUnit> Unit)
  • public void addUnitsForDWOSection(llvm::DWARFContext & C, const llvm::DWARFSection & DWOSection, llvm::DWARFSectionKind SectionKind, bool Lazy = false)
  • public void addUnitsForSection(llvm::DWARFContext & C, const llvm::DWARFSection & Section, llvm::DWARFSectionKind SectionKind)
  • private void addUnitsImpl(llvm::DWARFContext & Context, const llvm::DWARFObject & Obj, const llvm::DWARFSection & Section, const llvm::DWARFDebugAbbrev * DA, const llvm::DWARFSection * RS, const llvm::DWARFSection * LocSection, llvm::StringRef SS, const llvm::DWARFSection & SOS, const llvm::DWARFSection * AOS, const llvm::DWARFSection & LS, bool LE, bool IsDWO, bool Lazy, llvm::DWARFSectionKind SectionKind)
  • public void finishedInfoUnits()
  • public unsigned int getNumInfoUnits() const
  • public unsigned int getNumTypesUnits() const
  • public unsigned int getNumUnits() const
  • public llvm::DWARFUnit * getUnitForIndexEntry(const DWARFUnitIndex::Entry & E)
  • public llvm::DWARFUnit * getUnitForOffset(uint64_t Offset) const

Methods

llvm::DWARFUnit* addUnit(
    std::unique_ptr<DWARFUnit> Unit)

Description

Add an existing DWARFUnit to this UnitVector. This is used by the DWARF verifier to process unit separately.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:158

Parameters

std::unique_ptr<DWARFUnit> Unit

void addUnitsForDWOSection(
    llvm::DWARFContext& C,
    const llvm::DWARFSection& DWOSection,
    llvm::DWARFSectionKind SectionKind,
    bool Lazy = false)

Description

Read units from a .debug_info.dwo or .debug_types.dwo section. Calls made before finishedInfoUnits() are assumed to be for .debug_info.dwo sections, calls after finishedInfoUnits() are for .debug_types.dwo sections. Caller must not mix calls to addUnitsForSection and addUnitsForDWOSection.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:153

Parameters

llvm::DWARFContext& C
const llvm::DWARFSection& DWOSection
llvm::DWARFSectionKind SectionKind
bool Lazy = false

void addUnitsForSection(
    llvm::DWARFContext& C,
    const llvm::DWARFSection& Section,
    llvm::DWARFSectionKind SectionKind)

Description

Read units from a .debug_info or .debug_types section. Calls made before finishedInfoUnits() are assumed to be for .debug_info sections, calls after finishedInfoUnits() are for .debug_types sections. Caller must not mix calls to addUnitsForSection and addUnitsForDWOSection.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:146

Parameters

llvm::DWARFContext& C
const llvm::DWARFSection& Section
llvm::DWARFSectionKind SectionKind

void addUnitsImpl(
    llvm::DWARFContext& Context,
    const llvm::DWARFObject& Obj,
    const llvm::DWARFSection& Section,
    const llvm::DWARFDebugAbbrev* DA,
    const llvm::DWARFSection* RS,
    const llvm::DWARFSection* LocSection,
    llvm::StringRef SS,
    const llvm::DWARFSection& SOS,
    const llvm::DWARFSection* AOS,
    const llvm::DWARFSection& LS,
    bool LE,
    bool IsDWO,
    bool Lazy,
    llvm::DWARFSectionKind SectionKind)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:173

Parameters

llvm::DWARFContext& Context
const llvm::DWARFObject& Obj
const llvm::DWARFSection& Section
const llvm::DWARFDebugAbbrev* DA
const llvm::DWARFSection* RS
const llvm::DWARFSection* LocSection
llvm::StringRef SS
const llvm::DWARFSection& SOS
const llvm::DWARFSection* AOS
const llvm::DWARFSection& LS
bool LE
bool IsDWO
bool Lazy
llvm::DWARFSectionKind SectionKind

void finishedInfoUnits()

Description

Indicate that parsing .debug_info[.dwo] is done, and remaining units will be from .debug_types[.dwo].

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:170

unsigned int getNumInfoUnits() const

Description

Returns number of units from all .debug_info[.dwo] sections.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:163

unsigned int getNumTypesUnits() const

Description

Returns number of units from all .debug_types[.dwo] sections.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:167

unsigned int getNumUnits() const

Description

Returns number of all units held by this instance.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:161

llvm::DWARFUnit* getUnitForIndexEntry(
    const DWARFUnitIndex::Entry& E)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:140

Parameters

const DWARFUnitIndex::Entry& E

llvm::DWARFUnit* getUnitForOffset(
    uint64_t Offset) const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:139

Parameters

uint64_t Offset