LLVM  6.0.0svn
Public Types | Public Member Functions | Public Attributes | List of all members
llvm::DWARFDebugLine::LineTable Struct Reference

#include "llvm/DebugInfo/DWARF/DWARFDebugLine.h"

Collaboration diagram for llvm::DWARFDebugLine::LineTable:
Collaboration graph
[legend]

Public Types

using RowVector = std::vector< Row >
 
using RowIter = RowVector::const_iterator
 
using SequenceVector = std::vector< Sequence >
 
using SequenceIter = SequenceVector::const_iterator
 

Public Member Functions

 LineTable ()
 
void appendRow (const DWARFDebugLine::Row &R)
 
void appendSequence (const DWARFDebugLine::Sequence &S)
 
uint32_t lookupAddress (uint64_t Address) const
 Returns the index of the row with file/line info for a given address, or UnknownRowIndex if there is no such row. More...
 
bool lookupAddressRange (uint64_t Address, uint64_t Size, std::vector< uint32_t > &Result) const
 
bool hasFileAtIndex (uint64_t FileIndex) const
 
bool getFileNameByIndex (uint64_t FileIndex, const char *CompDir, DILineInfoSpecifier::FileLineInfoKind Kind, std::string &Result) const
 Extracts filename by its index in filename table in prologue. More...
 
bool getFileLineInfoForAddress (uint64_t Address, const char *CompDir, DILineInfoSpecifier::FileLineInfoKind Kind, DILineInfo &Result) const
 Fills the Result argument with the file and line information corresponding to Address. More...
 
void dump (raw_ostream &OS) const
 
void clear ()
 
bool parse (DWARFDataExtractor &DebugLineData, uint32_t *OffsetPtr, const DWARFUnit *U, raw_ostream *OS=nullptr)
 Parse prologue and all rows. More...
 

Public Attributes

const uint32_t UnknownRowIndex = UINT32_MAX
 Represents an invalid row. More...
 
struct Prologue Prologue
 
RowVector Rows
 
SequenceVector Sequences
 

Detailed Description

Definition at line 185 of file DWARFDebugLine.h.

Member Typedef Documentation

◆ RowIter

using llvm::DWARFDebugLine::LineTable::RowIter = RowVector::const_iterator

Definition at line 226 of file DWARFDebugLine.h.

◆ RowVector

Definition at line 225 of file DWARFDebugLine.h.

◆ SequenceIter

using llvm::DWARFDebugLine::LineTable::SequenceIter = SequenceVector::const_iterator

Definition at line 228 of file DWARFDebugLine.h.

◆ SequenceVector

Definition at line 227 of file DWARFDebugLine.h.

Constructor & Destructor Documentation

◆ LineTable()

DWARFDebugLine::LineTable::LineTable ( )

Definition at line 327 of file DWARFDebugLine.cpp.

References clear().

Member Function Documentation

◆ appendRow()

void llvm::DWARFDebugLine::LineTable::appendRow ( const DWARFDebugLine::Row R)
inline

Definition at line 191 of file DWARFDebugLine.h.

Referenced by clear().

◆ appendSequence()

void llvm::DWARFDebugLine::LineTable::appendSequence ( const DWARFDebugLine::Sequence S)
inline

◆ clear()

void DWARFDebugLine::LineTable::clear ( )

◆ dump()

void DWARFDebugLine::LineTable::dump ( raw_ostream OS) const

Definition at line 329 of file DWARFDebugLine.cpp.

References llvm::DWARFDebugLine::Prologue::dump().

Referenced by llvm::DWARFContext::dump().

◆ getFileLineInfoForAddress()

bool DWARFDebugLine::LineTable::getFileLineInfoForAddress ( uint64_t  Address,
const char CompDir,
DILineInfoSpecifier::FileLineInfoKind  Kind,
DILineInfo Result 
) const

◆ getFileNameByIndex()

bool DWARFDebugLine::LineTable::getFileNameByIndex ( uint64_t  FileIndex,
const char CompDir,
DILineInfoSpecifier::FileLineInfoKind  Kind,
std::string &  Result 
) const

◆ hasFileAtIndex()

bool DWARFDebugLine::LineTable::hasFileAtIndex ( uint64_t  FileIndex) const

Definition at line 872 of file DWARFDebugLine.cpp.

References llvm::DWARFDebugLine::Prologue::FileNames.

◆ lookupAddress()

uint32_t DWARFDebugLine::LineTable::lookupAddress ( uint64_t  Address) const

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

Definition at line 798 of file DWARFDebugLine.cpp.

References llvm::dwarf::syntax::Address, llvm::lower_bound(), llvm::DWARFDebugLine::Sequence::LowPC, and llvm::DWARFDebugLine::Sequence::orderByLowPC().

◆ lookupAddressRange()

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

◆ parse()

bool DWARFDebugLine::LineTable::parse ( DWARFDataExtractor DebugLineData,
uint32_t OffsetPtr,
const DWARFUnit U,
raw_ostream OS = nullptr 
)

Parse prologue and all rows.

Definition at line 398 of file DWARFDebugLine.cpp.

References llvm::dwarf::syntax::Address, llvm::DWARFDebugLine::Row::Address, assert(), clear(), llvm::DWARFDebugLine::Sequence::containsPC(), llvm::DWARFDebugLine::FileNameEntry::DirIdx, llvm::DWARFDebugLine::Prologue::dump(), llvm::DWARFDebugLine::Prologue::FileNames, llvm::DWARFDebugLine::Sequence::FirstRowIndex, llvm::format(), llvm::DataExtractor::getAddressSize(), llvm::DWARFDebugLine::Prologue::getAddressSize(), llvm::DataExtractor::getCStr(), llvm::DWARFDataExtractor::getRelocatedAddress(), llvm::DataExtractor::getSLEB128(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU8(), llvm::DataExtractor::getULEB128(), I, if(), llvm::raw_ostream::indent(), llvm::DWARFDebugLine::Sequence::LastRowIndex, llvm::DWARFDebugLine::FileNameEntry::Length, llvm::DWARFDebugLine::Prologue::LineBase, llvm::DWARFDebugLine::Prologue::LineRange, llvm::dwarf::LNExtendedString(), llvm::dwarf::LNStandardString(), llvm::lower_bound(), llvm::DWARFDebugLine::Prologue::MinInstLength, llvm::DWARFDebugLine::FileNameEntry::ModTime, llvm::DWARFDebugLine::FileNameEntry::Name, llvm::DWARFDebugLine::Prologue::OpcodeBase, llvm::DWARFDebugLine::Row::orderByAddress(), llvm::DWARFDebugLine::Prologue::parse(), llvm::DataExtractor::setAddressSize(), llvm::DWARFDebugLine::Prologue::sizeofTotalLength(), llvm::parallel::sort(), llvm::DWARFDebugLine::Prologue::StandardOpcodeLengths, llvm::StringRef::str(), and llvm::DWARFDebugLine::Prologue::TotalLength.

Referenced by llvm::DWARFContext::dump(), and llvm::DWARFDebugLine::getOrParseLineTable().

Member Data Documentation

◆ Prologue

struct Prologue llvm::DWARFDebugLine::LineTable::Prologue

Definition at line 230 of file DWARFDebugLine.h.

Referenced by clear(), and llvm::DWARFContext::dump().

◆ Rows

RowVector llvm::DWARFDebugLine::LineTable::Rows

Definition at line 231 of file DWARFDebugLine.h.

Referenced by llvm::DWARFContext::getLineInfoForAddressRange().

◆ Sequences

SequenceVector llvm::DWARFDebugLine::LineTable::Sequences

Definition at line 232 of file DWARFDebugLine.h.

◆ UnknownRowIndex

const uint32_t llvm::DWARFDebugLine::LineTable::UnknownRowIndex = UINT32_MAX

Represents an invalid row.

Definition at line 189 of file DWARFDebugLine.h.


The documentation for this struct was generated from the following files: