9 #ifndef LLVM_DEBUGINFO_DWARFDEBUGLINE_H 10 #define LLVM_DEBUGINFO_DWARFDEBUGLINE_H 51 bool HasModTime =
false;
53 bool HasLength =
false;
57 bool HasSource =
false;
108 bool totalLengthIsValid()
const;
112 return PrologueLength + sizeofTotalLength() +
sizeof(getVersion()) +
113 sizeofPrologueLength();
118 return TotalLength + sizeofTotalLength() - getLength();
122 return LineBase + (int8_t)LineRange - 1;
128 getFileNameEntry(uint64_t
Index)
const;
130 bool hasFileAtIndex(uint64_t FileIndex)
const;
133 getFileNameByIndex(uint64_t FileIndex,
StringRef CompDir,
146 explicit Row(
bool DefaultIsStmt =
false);
150 void reset(
bool DefaultIsStmt);
229 return !Empty && (LowPC < HighPC) && (FirstRowIndex < LastRowIndex);
247 Sequences.push_back(S);
255 std::vector<uint32_t> &Result)
const;
268 std::string &Result)
const {
301 getSourceByIndex(uint64_t FileIndex,
307 std::vector<uint32_t> &Result)
const;
352 bool done()
const {
return Done; }
358 DWARFUnit *prepareToParse(uint64_t Offset);
359 void moveToNextTable(uint64_t OldOffset,
const Prologue &
P);
370 struct ParsingState {
373 void resetRowAndSequence();
374 void appendRowToMatrix();
382 using LineTableMapTy = std::map<uint64_t, LineTable>;
383 using LineTableIter = LineTableMapTy::iterator;
384 using LineTableConstIter = LineTableMapTy::const_iterator;
386 LineTableMapTy LineTableMap;
391 #endif // LLVM_DEBUGINFO_DWARFDEBUGLINE_H SequenceVector::const_iterator SequenceIter
uint64_t LowPC
Sequence describes instructions at address range [LowPC, HighPC) and is described by line table rows ...
uint8_t getAddressSize() const
This class represents lattice values for constants.
std::vector< Sequence > SequenceVector
Expected< const LineTable * > getOrParseLineTable(DWARFDataExtractor &DebugLineData, uint64_t Offset, const DWARFContext &Ctx, const DWARFUnit *U, function_ref< void(Error)> RecoverableErrorCallback)
uint32_t sizeofTotalLength() const
static bool orderByAddress(const Row &LHS, const Row &RHS)
static bool skip(DataExtractor &Data, uint64_t &Offset, bool SkippedRanges)
Skip an InlineInfo object in the specified data at the specified offset.
uint32_t getLength() const
Length of the prologue in bytes.
uint32_t getStatementTableLength() const
Length of the line table data in bytes (not including the prologue).
uint8_t MinInstLength
The size in bytes of the smallest target machine instruction.
An efficient, type-erasing, non-owning reference to a callable.
uint32_t Line
An unsigned integer indicating a source line number.
bool getFileNameByIndex(uint64_t FileIndex, StringRef CompDir, DILineInfoSpecifier::FileLineInfoKind Kind, std::string &Result) const
Extracts filename by its index in filename table in prologue.
const dwarf::FormParams getFormParams() const
std::vector< DWARFFormValue > IncludeDirectories
uint64_t getOffset() const
Get the offset the parser has reached.
A format-neutral container for source line information.
bool hasFileAtIndex(uint64_t FileIndex) const
object::SectionedAddress Address
The program-counter value corresponding to a machine instruction generated by the compiler and sectio...
uint8_t Isa
An unsigned integer whose value encodes the applicable instruction set architecture for the current i...
uint8_t MaxOpsPerInst
The maximum number of individual operations that may be encoded in an instruction.
uint64_t SectionIndex
If relocation information is present then this is the index of the section which contains above addre...
dwarf::FormParams FormParams
Version, address size (starting in v5), and DWARF32/64 format; these parameters affect interpretation...
ContentTypeTracker ContentTypes
This tracks which optional file format content types are present.
Represents a series of contiguous machine instructions.
uint32_t sizeofPrologueLength() const
Tagged union holding either a T or a Error.
uint8_t LineRange
This parameter affects the meaning of the special opcodes. See below.
uint8_t OpcodeBase
The number assigned to the first special opcode.
llvm::iterator_range< typename UnitVector::iterator > iterator_range
uint64_t TotalLength
The size in bytes of the statement information for this compilation unit (not including the total_len...
Container for dump options that control which debug information will be dumped.
bool getFileNameByIndex(uint64_t FileIndex, StringRef CompDir, DILineInfoSpecifier::FileLineInfoKind Kind, std::string &Result, sys::path::Style Style=sys::path::Style::native) const
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
uint8_t SegSelectorSize
In v5, size in bytes of a segment selector.
uint16_t File
An unsigned integer indicating the identity of the source file corresponding to a machine instruction...
uint64_t PrologueLength
The number of bytes following the prologue_length field to the beginning of the first byte of the sta...
bool hasFileAtIndex(uint64_t FileIndex) const
static bool orderByHighPC(const Sequence &LHS, const Sequence &RHS)
std::vector< Row > RowVector
int32_t getMaxLineIncrementForSpecialOpcode() const
void appendSequence(const DWARFDebugLine::Sequence &S)
Standard .debug_line state machine structure.
uint16_t Column
An unsigned integer indicating a column number within a source line.
std::map< uint64_t, DWARFUnit * > LineToUnitMap
void appendRow(const DWARFDebugLine::Row &R)
DWARFContext This data structure is the top level entity that deals with dwarf debug information pars...
uint8_t PrologueEnd
A boolean indicating that the current address is one (of possibly many) where execution should be sus...
std::vector< uint8_t > StandardOpcodeLengths
A range adaptor for a pair of iterators.
const LineTable * getLineTable(uint64_t Offset) const
static void clear(coro::Shape &Shape)
Tracks which optional content types are present in a DWARF file name entry format.
std::vector< FileNameEntry > FileNames
uint32_t Discriminator
An unsigned integer representing the DWARF path discriminator value for this location.
RowVector::const_iterator RowIter
Sequence
A sequence of states that a pointer may go through in which an objc_retain and objc_release are actua...
uint16_t getVersion() const
uint8_t DefaultIsStmt
The initial value of theis_stmtregister.
bool containsPC(object::SectionedAddress PC) const
int8_t LineBase
This parameter affects the meaning of the special opcodes. See below.
Lightweight error class with error context and mandatory checking.
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
static llvm::Error parse(DataExtractor &Data, uint64_t BaseAddr, LineEntryCallback const &Callback)
Helper to allow for parsing of an entire .debug_line section in sequence.
bool done() const
Indicates if the parser has parsed as much as possible.