|
LLVM
10.0.0
|
#include "llvm/DebugInfo/DWARF/DWARFDebugLine.h"
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 (object::SectionedAddress 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 (object::SectionedAddress Address, uint64_t Size, std::vector< uint32_t > &Result) const |
| bool | hasFileAtIndex (uint64_t FileIndex) const |
| bool | getFileNameByIndex (uint64_t FileIndex, StringRef CompDir, DILineInfoSpecifier::FileLineInfoKind Kind, std::string &Result) const |
| Extracts filename by its index in filename table in prologue. More... | |
| bool | getFileLineInfoForAddress (object::SectionedAddress 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, DIDumpOptions DumpOptions) const |
| void | clear () |
| Error | parse (DWARFDataExtractor &DebugLineData, uint64_t *OffsetPtr, const DWARFContext &Ctx, const DWARFUnit *U, function_ref< void(Error)> RecoverableErrorCallback, 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 |
Definition at line 238 of file DWARFDebugLine.h.
| using llvm::DWARFDebugLine::LineTable::RowIter = RowVector::const_iterator |
Definition at line 289 of file DWARFDebugLine.h.
| using llvm::DWARFDebugLine::LineTable::RowVector = std::vector<Row> |
Definition at line 288 of file DWARFDebugLine.h.
| using llvm::DWARFDebugLine::LineTable::SequenceIter = SequenceVector::const_iterator |
Definition at line 291 of file DWARFDebugLine.h.
| using llvm::DWARFDebugLine::LineTable::SequenceVector = std::vector<Sequence> |
Definition at line 290 of file DWARFDebugLine.h.
| DWARFDebugLine::LineTable::LineTable | ( | ) |
Definition at line 425 of file DWARFDebugLine.cpp.
References clear().
|
inline |
Definition at line 244 of file DWARFDebugLine.h.
Referenced by clear().
|
inline |
Definition at line 246 of file DWARFDebugLine.h.
References llvm::Address, and Size.
Referenced by clear().
| void DWARFDebugLine::LineTable::clear | ( | ) |
Definition at line 444 of file DWARFDebugLine.cpp.
References llvm::object::SectionedAddress::Address, llvm::DWARFDebugLine::Row::Address, appendRow(), appendSequence(), llvm::DWARFDebugLine::Prologue::clear(), llvm::DWARFDebugLine::Prologue::DefaultIsStmt, llvm::DWARFDebugLine::Sequence::Empty, llvm::DWARFDebugLine::Row::EndSequence, llvm::DWARFDebugLine::Sequence::FirstRowIndex, llvm::DWARFDebugLine::Sequence::HighPC, llvm::DWARFDebugLine::Sequence::isValid(), llvm::DWARFDebugLine::Sequence::LastRowIndex, llvm::DWARFDebugLine::Sequence::LowPC, llvm::AArch64CC::LT, llvm::DWARFDebugLine::Row::postAppend(), Prologue, llvm::DWARFDebugLine::Row::reset(), llvm::DWARFDebugLine::Sequence::reset(), Rows, llvm::object::SectionedAddress::SectionIndex, and llvm::DWARFDebugLine::Sequence::SectionIndex.
| void DWARFDebugLine::LineTable::dump | ( | raw_ostream & | OS, |
| DIDumpOptions | DumpOptions | ||
| ) | const |
Definition at line 427 of file DWARFDebugLine.cpp.
References llvm::DWARFDebugLine::Prologue::dump().
Referenced by llvm::DWARFContext::dump().
| bool DWARFDebugLine::LineTable::getFileLineInfoForAddress | ( | object::SectionedAddress | Address, |
| const char * | CompDir, | ||
| DILineInfoSpecifier::FileLineInfoKind | Kind, | ||
| DILineInfo & | Result | ||
| ) | const |
Fills the Result argument with the file and line information corresponding to Address.
Returns true on success.
Definition at line 1087 of file DWARFDebugLine.cpp.
References llvm::DILineInfo::Column, llvm::DWARFDebugLine::Row::Column, llvm::DILineInfo::Discriminator, llvm::DWARFDebugLine::Row::Discriminator, llvm::DWARFDebugLine::Row::File, llvm::DILineInfo::FileName, llvm::DILineInfo::Line, llvm::DWARFDebugLine::Row::Line, and llvm::DILineInfo::Source.
Referenced by llvm::DWARFContext::getInliningInfoForAddress().
|
inline |
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.
Definition at line 266 of file DWARFDebugLine.h.
References clear(), llvm::dump(), llvm::DWARFDebugLine::Prologue::getFileNameByIndex(), and parse().
Referenced by llvm::DWARFContext::getInliningInfoForAddress(), and llvm::DWARFContext::getLineInfoForAddressRange().
|
inline |
Definition at line 257 of file DWARFDebugLine.h.
References llvm::DWARFDebugLine::Prologue::hasFileAtIndex().
| uint32_t DWARFDebugLine::LineTable::lookupAddress | ( | object::SectionedAddress | 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 937 of file DWARFDebugLine.cpp.
References llvm::object::SectionedAddress::Address, llvm::DWARFDebugLine::Sequence::HighPC, llvm::DWARFDebugLine::Sequence::orderByHighPC(), llvm::object::SectionedAddress::SectionIndex, llvm::DWARFDebugLine::Sequence::SectionIndex, llvm::object::SectionedAddress::UndefSection, and llvm::upper_bound().
| bool DWARFDebugLine::LineTable::lookupAddressRange | ( | object::SectionedAddress | Address, |
| uint64_t | Size, | ||
| std::vector< uint32_t > & | Result | ||
| ) | const |
Definition at line 965 of file DWARFDebugLine.cpp.
References llvm::object::SectionedAddress::Address, assert(), llvm::DWARFDebugLine::Sequence::FirstRowIndex, llvm::DWARFFormValue::getAsCString(), llvm::DWARFDebugLine::Prologue::getFileNameEntry(), llvm::DWARFDebugLine::Prologue::hasFileAtIndex(), llvm::DWARFDebugLine::Sequence::HighPC, I, llvm::DWARFDebugLine::Sequence::LastRowIndex, llvm::None, llvm::DWARFDebugLine::Sequence::orderByHighPC(), llvm::object::SectionedAddress::SectionIndex, llvm::DWARFDebugLine::Sequence::SectionIndex, Size, llvm::DWARFDebugLine::FileNameEntry::Source, llvm::object::SectionedAddress::UndefSection, and llvm::upper_bound().
Referenced by llvm::DWARFContext::getLineInfoForAddressRange().
| Error DWARFDebugLine::LineTable::parse | ( | DWARFDataExtractor & | DebugLineData, |
| uint64_t * | OffsetPtr, | ||
| const DWARFContext & | Ctx, | ||
| const DWARFUnit * | U, | ||
| function_ref< void(Error)> | RecoverableErrorCallback, | ||
| raw_ostream * | OS = nullptr |
||
| ) |
Parse prologue and all rows.
Definition at line 509 of file DWARFDebugLine.cpp.
References llvm::Address, llvm::object::SectionedAddress::Address, llvm::DWARFDebugLine::Row::Address, assert(), clear(), llvm::DWARFDebugLine::Sequence::containsPC(), llvm::DWARFFormValue::createFromPValue(), llvm::createStringError(), 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::DWARFDataExtractor::getRelocatedValue(), llvm::DataExtractor::getSLEB128(), llvm::DataExtractor::getU8(), llvm::DataExtractor::getULEB128(), I, if(), llvm::illegal_byte_sequence, llvm::raw_ostream::indent(), llvm::invalid_argument, llvm::DataExtractor::isValidOffsetForDataOfSize(), llvm::DWARFDebugLine::Sequence::LastRowIndex, llvm::DWARFDebugLine::FileNameEntry::Length, llvm::DWARFDebugLine::Prologue::LineBase, llvm::DWARFDebugLine::Prologue::LineRange, llvm::dwarf::LNExtendedString(), llvm::dwarf::LNStandardString(), llvm::DWARFDebugLine::Prologue::MinInstLength, llvm::DWARFDebugLine::FileNameEntry::ModTime, llvm::DWARFDebugLine::FileNameEntry::Name, Name, llvm::DWARFDebugLine::Prologue::OpcodeBase, llvm::DWARFDebugLine::Row::orderByAddress(), llvm::DWARFDebugLine::Prologue::parse(), llvm::object::SectionedAddress::SectionIndex, llvm::DWARFDebugLine::Sequence::SectionIndex, llvm::DataExtractor::setAddressSize(), llvm::DataExtractor::size(), llvm::DWARFDebugLine::Prologue::sizeofTotalLength(), llvm::sort(), llvm::DWARFDebugLine::Prologue::StandardOpcodeLengths, llvm::Error::success(), llvm::DWARFDebugLine::Prologue::TotalLength, llvm::upper_bound(), and llvm::DIDumpOptions::Verbose.
| struct Prologue llvm::DWARFDebugLine::LineTable::Prologue |
Definition at line 293 of file DWARFDebugLine.h.
Referenced by clear().
| RowVector llvm::DWARFDebugLine::LineTable::Rows |
Definition at line 294 of file DWARFDebugLine.h.
Referenced by clear(), and llvm::DWARFContext::getLineInfoForAddressRange().
| SequenceVector llvm::DWARFDebugLine::LineTable::Sequences |
Definition at line 295 of file DWARFDebugLine.h.
Represents an invalid row.
Definition at line 242 of file DWARFDebugLine.h.
1.8.13