struct DWARFDebugLine::LineTable

Declaration

struct DWARFDebugLine::LineTable { /* full declaration omitted */ };

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:226

Member Variables

public const uint32_t UnknownRowIndex = (4294967295U)
Represents an invalid row
public struct Prologue Prologue
public llvm::DWARFDebugLine::LineTable::RowVector Rows
public llvm::DWARFDebugLine::LineTable::SequenceVector Sequences

Method Overview

  • public LineTable()
  • public void appendRow(const DWARFDebugLine::Row & R)
  • public void appendSequence(const DWARFDebugLine::Sequence & S)
  • public void clear()
  • public void dump(llvm::raw_ostream & OS, llvm::DIDumpOptions DumpOptions) const
  • private uint32_t findRowInSeq(const DWARFDebugLine::Sequence & Seq, object::SectionedAddress Address) const
  • public bool getFileLineInfoForAddress(object::SectionedAddress Address, const char * CompDir, DILineInfoSpecifier::FileLineInfoKind Kind, llvm::DILineInfo & Result) const
  • public bool getFileNameByIndex(uint64_t FileIndex, llvm::StringRef CompDir, DILineInfoSpecifier::FileLineInfoKind Kind, std::string & Result) const
  • public Optional<uint64_t> getLastValidFileIndex() const
  • private Optional<llvm::StringRef> getSourceByIndex(uint64_t FileIndex, DILineInfoSpecifier::FileLineInfoKind Kind) const
  • public bool hasFileAtIndex(uint64_t FileIndex) const
  • public uint32_t lookupAddress(object::SectionedAddress Address) const
  • private uint32_t lookupAddressImpl(object::SectionedAddress Address) const
  • public bool lookupAddressRange(object::SectionedAddress Address, uint64_t Size, std::vector<uint32_t> & Result) const
  • private bool lookupAddressRangeImpl(object::SectionedAddress Address, uint64_t Size, std::vector<uint32_t> & Result) const
  • public llvm::Error parse(llvm::DWARFDataExtractor & DebugLineData, uint64_t * OffsetPtr, const llvm::DWARFContext & Ctx, const llvm::DWARFUnit * U, function_ref<void (llvm::Error)> RecoverableErrorHandler, llvm::raw_ostream * OS = nullptr, bool Verbose = false)

Methods

LineTable()

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:227

void appendRow(const DWARFDebugLine::Row& R)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:232

Parameters

const DWARFDebugLine::Row& R

void appendSequence(
    const DWARFDebugLine::Sequence& S)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:234

Parameters

const DWARFDebugLine::Sequence& S

void clear()

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:272

void dump(llvm::raw_ostream& OS,
          llvm::DIDumpOptions DumpOptions) const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:271

Parameters

llvm::raw_ostream& OS
llvm::DIDumpOptions DumpOptions

uint32_t findRowInSeq(
    const DWARFDebugLine::Sequence& Seq,
    object::SectionedAddress Address) const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:290

Parameters

const DWARFDebugLine::Sequence& Seq
object::SectionedAddress Address

bool getFileLineInfoForAddress(
    object::SectionedAddress Address,
    const char* CompDir,
    DILineInfoSpecifier::FileLineInfoKind Kind,
    llvm::DILineInfo& Result) const

Description

Fills the Result argument with the file and line information corresponding to Address. Returns true on success.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:266

Parameters

object::SectionedAddress Address
const char* CompDir
DILineInfoSpecifier::FileLineInfoKind Kind
llvm::DILineInfo& Result

bool getFileNameByIndex(
    uint64_t FileIndex,
    llvm::StringRef CompDir,
    DILineInfoSpecifier::FileLineInfoKind Kind,
    std::string& Result) const

Description

Extracts filename by its index in filename table in prologue. In Dwarf 4, the files are 1-indexed and the current compilation file name is not represented in the list. In DWARF v5, the files are 0-indexed and the primary source file has the index 0. Returns true on success.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:258

Parameters

uint64_t FileIndex
llvm::StringRef CompDir
DILineInfoSpecifier::FileLineInfoKind Kind
std::string& Result

Optional<uint64_t> getLastValidFileIndex() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:249

Optional<llvm::StringRef> getSourceByIndex(
    uint64_t FileIndex,
    DILineInfoSpecifier::FileLineInfoKind Kind)
    const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:293

Parameters

uint64_t FileIndex
DILineInfoSpecifier::FileLineInfoKind Kind

bool hasFileAtIndex(uint64_t FileIndex) const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:245

Parameters

uint64_t FileIndex

uint32_t lookupAddress(
    object::SectionedAddress Address) const

Description

Returns the index of the row with file/line info for a given address, or UnknownRowIndex if there is no such row.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:240

Parameters

object::SectionedAddress Address

uint32_t lookupAddressImpl(
    object::SectionedAddress Address) const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:296

Parameters

object::SectionedAddress Address

bool lookupAddressRange(
    object::SectionedAddress Address,
    uint64_t Size,
    std::vector<uint32_t>& Result) const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:242

Parameters

object::SectionedAddress Address
uint64_t Size
std::vector<uint32_t>& Result

bool lookupAddressRangeImpl(
    object::SectionedAddress Address,
    uint64_t Size,
    std::vector<uint32_t>& Result) const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:298

Parameters

object::SectionedAddress Address
uint64_t Size
std::vector<uint32_t>& Result

llvm::Error parse(
    llvm::DWARFDataExtractor& DebugLineData,
    uint64_t* OffsetPtr,
    const llvm::DWARFContext& Ctx,
    const llvm::DWARFUnit* U,
    function_ref<void(llvm::Error)>
        RecoverableErrorHandler,
    llvm::raw_ostream* OS = nullptr,
    bool Verbose = false)

Description

Parse prologue and all rows.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:275

Parameters

llvm::DWARFDataExtractor& DebugLineData
uint64_t* OffsetPtr
const llvm::DWARFContext& Ctx
const llvm::DWARFUnit* U
function_ref<void(llvm::Error)> RecoverableErrorHandler
llvm::raw_ostream* OS = nullptr
bool Verbose = false