10 #ifndef LLVM_DEBUGINFO_DWARFDEBUGLINE_H 11 #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;
133 explicit Row(
bool DefaultIsStmt =
false);
137 void reset(
bool DefaultIsStmt);
207 return !Empty && (LowPC < HighPC) && (FirstRowIndex < LastRowIndex);
210 bool containsPC(uint64_t PC)
const {
return (LowPC <= PC && PC < HighPC); }
222 Sequences.push_back(S);
229 bool lookupAddressRange(uint64_t Address, uint64_t
Size,
230 std::vector<uint32_t> &Result)
const;
232 bool hasFileAtIndex(uint64_t FileIndex)
const;
236 bool getFileNameByIndex(uint64_t FileIndex,
const char *CompDir,
238 std::string &Result)
const;
242 bool getFileLineInfoForAddress(uint64_t Address,
const char *CompDir,
267 uint64_t Address)
const;
269 getSourceByIndex(uint64_t FileIndex,
315 bool done()
const {
return Done; }
333 struct ParsingState {
336 void resetRowAndSequence();
337 void appendRowToMatrix(
uint32_t Offset);
343 unsigned RowNumber = 0;
348 using LineTableMapTy = std::map<uint32_t, LineTable>;
349 using LineTableIter = LineTableMapTy::iterator;
350 using LineTableConstIter = LineTableMapTy::const_iterator;
352 LineTableMapTy LineTableMap;
357 #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
uint32_t sizeofTotalLength() const
static bool orderByAddress(const Row &LHS, const Row &RHS)
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.
void skip(CollectionType &C)
const dwarf::FormParams getFormParams() const
std::vector< DWARFFormValue > IncludeDirectories
A format-neutral container for source line information.
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.
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
uint64_t Address
The program-counter value corresponding to a machine instruction generated by the compiler...
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...
Expected< const LineTable * > getOrParseLineTable(DWARFDataExtractor &DebugLineData, uint32_t Offset, const DWARFContext &Ctx, const DWARFUnit *U, std::function< void(Error)> RecoverableErrorCallback)
Container for dump options that control which debug information will be dumped.
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...
std::vector< Row > RowVector
llvm::Expected< Value > parse(llvm::StringRef JSON)
Parses the provided JSON source, or returns a ParseError.
int32_t getMaxLineIncrementForSpecialOpcode() const
void appendSequence(const DWARFDebugLine::Sequence &S)
Standard .debug_line state machine structure.
bool containsPC(uint64_t PC) const
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.
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
static bool orderByLowPC(const Sequence &LHS, const Sequence &RHS)
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.
int8_t LineBase
This parameter affects the meaning of the special opcodes. See below.
const LineTable * getLineTable(uint32_t Offset) const
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...
print Print MemDeps of function
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.
uint32_t getOffset() const
Get the offset the parser has reached.