29 using namespace dwarf;
35 struct ContentDescriptor {
46 switch (ContentType) {
47 case dwarf::DW_LNCT_timestamp:
50 case dwarf::DW_LNCT_size:
53 case dwarf::DW_LNCT_MD5:
56 case dwarf::DW_LNCT_LLVM_source:
69 uint16_t DwarfVersion = getVersion();
70 assert(DwarfVersion != 0 &&
71 "line table prologue has no dwarf version information");
72 if (DwarfVersion >= 5)
73 return FileIndex < FileNames.size();
74 return FileIndex != 0 && FileIndex <= FileNames.size();
79 uint16_t DwarfVersion = getVersion();
80 assert(DwarfVersion != 0 &&
81 "line table prologue has no dwarf version information");
83 if (DwarfVersion >= 5)
84 return FileNames[
Index];
85 return FileNames[Index - 1];
89 TotalLength = PrologueLength = 0;
91 MinInstLength = MaxOpsPerInst = DefaultIsStmt = LineBase = LineRange = 0;
95 StandardOpcodeLengths.clear();
96 IncludeDirectories.clear();
102 OS <<
"Line table prologue:\n" 103 <<
format(
" total_length: 0x%8.8" PRIx64
"\n", TotalLength)
104 <<
format(
" version: %u\n", getVersion());
105 if (getVersion() >= 5)
106 OS <<
format(
" address_size: %u\n", getAddressSize())
107 <<
format(
" seg_select_size: %u\n", SegSelectorSize);
108 OS <<
format(
" prologue_length: 0x%8.8" PRIx64
"\n", PrologueLength)
109 <<
format(
" min_inst_length: %u\n", MinInstLength)
110 <<
format(getVersion() >= 4 ?
"max_ops_per_inst: %u\n" :
"", MaxOpsPerInst)
111 <<
format(
" default_is_stmt: %u\n", DefaultIsStmt)
112 <<
format(
" line_base: %i\n", LineBase)
113 <<
format(
" line_range: %u\n", LineRange)
114 <<
format(
" opcode_base: %u\n", OpcodeBase);
116 for (
uint32_t I = 0;
I != StandardOpcodeLengths.size(); ++
I)
117 OS <<
format(
"standard_opcode_lengths[%s] = %u\n",
120 if (!IncludeDirectories.empty()) {
122 uint32_t DirBase = getVersion() >= 5 ? 0 : 1;
123 for (
uint32_t I = 0;
I != IncludeDirectories.size(); ++
I) {
124 OS <<
format(
"include_directories[%3u] = ",
I + DirBase);
125 IncludeDirectories[
I].dump(OS, DumpOptions);
130 if (!FileNames.empty()) {
132 uint32_t FileBase = getVersion() >= 5 ? 0 : 1;
135 OS <<
format(
"file_names[%3u]:\n",
I + FileBase);
137 FileEntry.
Name.
dump(OS, DumpOptions);
139 <<
format(
" dir_index: %" PRIu64
"\n", FileEntry.
DirIdx);
140 if (ContentTypes.HasMD5)
142 if (ContentTypes.HasModTime)
143 OS <<
format(
" mod_time: 0x%8.8" PRIx64
"\n", FileEntry.
ModTime);
144 if (ContentTypes.HasLength)
145 OS <<
format(
" length: 0x%8.8" PRIx64
"\n", FileEntry.
Length);
146 if (ContentTypes.HasSource) {
158 uint64_t *OffsetPtr, uint64_t EndPrologueOffset,
160 std::vector<DWARFFormValue> &IncludeDirectories,
161 std::vector<DWARFDebugLine::FileNameEntry> &FileNames) {
162 while (*OffsetPtr < EndPrologueOffset) {
168 IncludeDirectories.push_back(Dir);
171 while (*OffsetPtr < EndPrologueOffset) {
181 FileNames.push_back(FileEntry);
194 ContentDescriptors Descriptors;
195 int FormatCount = DebugLineData.
getU8(OffsetPtr);
196 bool HasPath =
false;
197 for (
int I = 0;
I != FormatCount; ++
I) {
198 ContentDescriptor Descriptor;
202 if (Descriptor.Type == dwarf::DW_LNCT_path)
206 Descriptors.push_back(Descriptor);
211 "failed to parse entry content descriptions" 212 " because no path was found");
221 std::vector<DWARFFormValue> &IncludeDirectories,
222 std::vector<DWARFDebugLine::FileNameEntry> &FileNames) {
230 int DirEntryCount = DebugLineData.
getU8(OffsetPtr);
231 for (
int I = 0;
I != DirEntryCount; ++
I) {
232 for (
auto Descriptor : *DirDescriptors) {
234 switch (Descriptor.Type) {
236 if (!Value.
extractValue(DebugLineData, OffsetPtr, FormParams, &Ctx, U))
238 "failed to parse directory entry because " 239 "extracting the form value failed.");
240 IncludeDirectories.push_back(Value);
243 if (!Value.
skipValue(DebugLineData, OffsetPtr, FormParams))
245 "failed to parse directory entry because " 246 "skipping the form value failed.");
254 if (!FileDescriptors)
258 int FileEntryCount = DebugLineData.
getU8(OffsetPtr);
259 for (
int I = 0;
I != FileEntryCount; ++
I) {
261 for (
auto Descriptor : *FileDescriptors) {
263 if (!Value.
extractValue(DebugLineData, OffsetPtr, FormParams, &Ctx, U))
265 "failed to parse file entry because " 266 "extracting the form value failed.");
267 switch (Descriptor.Type) {
271 case DW_LNCT_LLVM_source:
274 case DW_LNCT_directory_index:
277 case DW_LNCT_timestamp:
287 "failed to parse file entry because the MD5 hash is invalid");
288 std::uninitialized_copy_n(Value.
getAsBlock().getValue().begin(), 16,
295 FileNames.push_back(FileEntry);
304 const uint64_t PrologueOffset = *OffsetPtr;
310 TotalLength = DebugLineData.
getU64(OffsetPtr);
313 "parsing line table prologue at offset 0x%8.8" PRIx64
314 " unsupported reserved unit length found of value 0x%8.8" PRIx64,
315 PrologueOffset, TotalLength);
318 if (getVersion() < 2)
320 "parsing line table prologue at offset 0x%8.8" PRIx64
321 " found unsupported version 0x%2.2" PRIx16,
322 PrologueOffset, getVersion());
324 if (getVersion() >= 5) {
328 "Line table header and data extractor disagree");
329 SegSelectorSize = DebugLineData.
getU8(OffsetPtr);
334 const uint64_t EndPrologueOffset = PrologueLength + *OffsetPtr;
335 MinInstLength = DebugLineData.
getU8(OffsetPtr);
336 if (getVersion() >= 4)
337 MaxOpsPerInst = DebugLineData.
getU8(OffsetPtr);
338 DefaultIsStmt = DebugLineData.
getU8(OffsetPtr);
339 LineBase = DebugLineData.
getU8(OffsetPtr);
340 LineRange = DebugLineData.
getU8(OffsetPtr);
341 OpcodeBase = DebugLineData.
getU8(OffsetPtr);
343 StandardOpcodeLengths.reserve(OpcodeBase - 1);
345 uint8_t OpLen = DebugLineData.
getU8(OffsetPtr);
346 StandardOpcodeLengths.push_back(OpLen);
349 if (getVersion() >= 5) {
352 ContentTypes, IncludeDirectories, FileNames)) {
356 "parsing line table prologue at 0x%8.8" PRIx64
357 " found an invalid directory or file table description at" 359 PrologueOffset, *OffsetPtr),
364 ContentTypes, IncludeDirectories, FileNames);
366 if (*OffsetPtr != EndPrologueOffset)
368 "parsing line table prologue at 0x%8.8" PRIx64
369 " should have ended at 0x%8.8" PRIx64
370 " but it ended at 0x%8.8" PRIx64,
371 PrologueOffset, EndPrologueOffset, *OffsetPtr);
381 EpilogueBegin =
false;
392 IsStmt = DefaultIsStmt;
396 EpilogueBegin =
false;
400 OS <<
"Address Line Column File ISA Discriminator Flags\n" 401 <<
"------------------ ------ ------ ------ --- ------------- " 406 OS <<
format(
"0x%16.16" PRIx64
" %6u %6u",
Address.Address, Line, Column)
407 <<
format(
" %6u %3u %13u ",
File, Isa, Discriminator)
408 << (IsStmt ?
" is_stmt" :
"") << (
BasicBlock ?
" basic_block" :
"")
409 << (PrologueEnd ?
" prologue_end" :
"")
410 << (EpilogueBegin ?
" epilogue_begin" :
"")
433 Row::dumpTableHeader(OS);
434 for (
const Row &R : Rows) {
450 DWARFDebugLine::ParsingState::ParsingState(
struct LineTable *
LT)
452 resetRowAndSequence();
455 void DWARFDebugLine::ParsingState::resetRowAndSequence() {
460 void DWARFDebugLine::ParsingState::appendRowToMatrix() {
483 LineTableConstIter Pos = LineTableMap.find(Offset);
484 if (Pos != LineTableMap.end())
494 " is not a valid debug line section offset",
497 std::pair<LineTableIter, bool> Pos =
498 LineTableMap.insert(LineTableMapTy::value_type(Offset,
LineTable()));
502 LT->
parse(DebugLineData, &Offset, Ctx, U, RecoverableErrorCallback))
503 return std::move(Err);
513 const uint64_t DebugLineOffset = *OffsetPtr;
532 assert(DebugLineData.
size() > DebugLineOffset &&
533 "prologue parsing should handle invalid offset");
534 uint64_t BytesRemaining = DebugLineData.
size() - DebugLineOffset;
535 RecoverableErrorCallback(
537 "line table program with offset 0x%8.8" PRIx64
538 " has length 0x%8.8" PRIx64
" but only 0x%8.8" PRIx64
539 " bytes are available",
540 DebugLineOffset, ProgramLength, BytesRemaining));
542 ProgramLength = BytesRemaining;
545 const uint64_t EndOffset = DebugLineOffset + ProgramLength;
554 ParsingState State(
this);
556 while (*OffsetPtr < EndOffset) {
558 *OS <<
format(
"0x%08.08" PRIx64
": ", *OffsetPtr);
560 uint8_t Opcode = DebugLineData.
getU8(OffsetPtr);
563 *OS <<
format(
"%02.02" PRIx8
" ", Opcode);
568 uint64_t Len = DebugLineData.
getULEB128(OffsetPtr);
569 uint64_t ExtOffset = *OffsetPtr;
574 *OS <<
"Badly formed extended line op (length 0)\n";
578 uint8_t SubOpcode = DebugLineData.
getU8(OffsetPtr);
582 case DW_LNE_end_sequence:
590 State.Row.EndSequence =
true;
596 State.appendRowToMatrix();
597 State.resetRowAndSequence();
600 case DW_LNE_set_address:
612 if (ExtractorAddressSize != Len - 1 && ExtractorAddressSize != 0)
615 "mismatching address size at offset 0x%8.8" PRIx64
616 " expected 0x%2.2" PRIx8
" found 0x%2.2" PRIx64,
617 ExtOffset, ExtractorAddressSize, Len - 1));
623 OffsetPtr, &State.Row.Address.SectionIndex);
626 if (ExtractorAddressSize != 0)
630 *OS <<
format(
" (0x%16.16" PRIx64
")", State.Row.Address.Address);
634 case DW_LNE_define_file:
657 const char *
Name = DebugLineData.
getCStr(OffsetPtr);
665 *OS <<
" (" << Name <<
", dir=" << FileEntry.
DirIdx <<
", mod_time=" 667 <<
", length=" << FileEntry.
Length <<
")";
671 case DW_LNE_set_discriminator:
672 State.Row.Discriminator = DebugLineData.
getULEB128(OffsetPtr);
674 *OS <<
" (" << State.Row.Discriminator <<
")";
679 *OS <<
format(
"Unrecognized extended op 0x%02.02" PRIx8, SubOpcode)
680 <<
format(
" length %" PRIx64, Len);
683 (*OffsetPtr) += Len - 1;
688 if (*OffsetPtr - ExtOffset != Len)
690 "unexpected line op length at offset 0x%8.8" PRIx64
691 " expected 0x%2.2" PRIx64
" found 0x%2.2" PRIx64,
692 ExtOffset, Len, *OffsetPtr - ExtOffset);
707 State.appendRowToMatrix();
710 case DW_LNS_advance_pc:
715 uint64_t AddrOffset =
717 State.Row.Address.Address += AddrOffset;
719 *OS <<
" (" << AddrOffset <<
")";
723 case DW_LNS_advance_line:
726 State.Row.Line += DebugLineData.
getSLEB128(OffsetPtr);
728 *OS <<
" (" << State.Row.Line <<
")";
731 case DW_LNS_set_file:
734 State.Row.File = DebugLineData.
getULEB128(OffsetPtr);
736 *OS <<
" (" << State.Row.File <<
")";
739 case DW_LNS_set_column:
742 State.Row.Column = DebugLineData.
getULEB128(OffsetPtr);
744 *OS <<
" (" << State.Row.Column <<
")";
747 case DW_LNS_negate_stmt:
750 State.Row.IsStmt = !State.Row.IsStmt;
753 case DW_LNS_set_basic_block:
756 State.Row.BasicBlock =
true;
759 case DW_LNS_const_add_pc:
773 uint64_t AddrOffset =
775 State.Row.Address.Address += AddrOffset;
778 <<
format(
" (0x%16.16" PRIx64
")", AddrOffset);
782 case DW_LNS_fixed_advance_pc:
794 State.Row.Address.Address += PCOffset;
797 <<
format(
" (0x%4.4" PRIx16
")", PCOffset);
801 case DW_LNS_set_prologue_end:
804 State.Row.PrologueEnd =
true;
807 case DW_LNS_set_epilogue_begin:
810 State.Row.EpilogueBegin =
true;
816 State.Row.Isa = DebugLineData.
getULEB128(OffsetPtr);
818 *OS <<
" (" << (uint64_t)State.Row.Isa <<
")";
828 for (uint8_t
I = 0;
I < OpcodeLength; ++
I) {
831 *OS <<
format(
"Skipping ULEB128 value: 0x%16.16" PRIx64
")\n",
872 uint64_t AddrOffset =
876 State.Row.Line += LineOffset;
877 State.Row.Address.Address += AddrOffset;
880 *OS <<
"address += " << AddrOffset <<
", line += " << LineOffset
886 State.appendRowToMatrix();
892 if (!State.Sequence.Empty)
895 "last sequence in debug line table at offset 0x%8.8" PRIx64
896 " is not terminated",
900 if (!Sequences.empty()) {
901 llvm::sort(Sequences, Sequence::orderByHighPC);
913 uint32_t DWARFDebugLine::LineTable::findRowInSeq(
917 return UnknownRowIndex;
934 return RowPos - Rows.begin();
941 uint32_t Result = lookupAddressImpl(Address);
943 if (Result != UnknownRowIndex ||
949 return lookupAddressImpl(Address);
952 uint32_t DWARFDebugLine::LineTable::lookupAddressImpl(
960 if (It == Sequences.end() || It->SectionIndex != Address.
SectionIndex)
961 return UnknownRowIndex;
962 return findRowInSeq(*It, Address);
967 std::vector<uint32_t> &Result)
const {
970 if (lookupAddressRangeImpl(Address, Size, Result))
978 return lookupAddressRangeImpl(Address, Size, Result);
981 bool DWARFDebugLine::LineTable::lookupAddressRangeImpl(
983 std::vector<uint32_t> &Result)
const {
984 if (Sequences.empty())
994 if (SeqPos == LastSeq || !SeqPos->containsPC(Address))
1002 while (SeqPos != LastSeq && SeqPos->LowPC < EndAddr) {
1007 if (SeqPos == StartPos)
1008 FirstRowIndex = findRowInSeq(CurSeq, Address);
1012 findRowInSeq(CurSeq, {EndAddr - 1, Address.
SectionIndex});
1013 if (LastRowIndex == UnknownRowIndex)
1016 assert(FirstRowIndex != UnknownRowIndex);
1017 assert(LastRowIndex != UnknownRowIndex);
1019 for (
uint32_t I = FirstRowIndex;
I <= LastRowIndex; ++
I) {
1020 Result.push_back(
I);
1057 if (Kind != FileLineInfoKind::AbsoluteFilePath ||
1066 if (getVersion() >= 5) {
1067 if (Entry.
DirIdx < IncludeDirectories.size())
1068 IncludeDir = IncludeDirectories[Entry.
DirIdx].getAsCString().getValue();
1070 if (0 < Entry.
DirIdx && Entry.
DirIdx <= IncludeDirectories.size())
1072 IncludeDirectories[Entry.
DirIdx - 1].getAsCString().getValue();
1083 Result = FilePath.
str();
1091 uint32_t RowIndex = lookupAddress(Address);
1092 if (RowIndex == -1U)
1095 const auto &
Row = Rows[RowIndex];
1113 for (
const auto &
CU : CUs)
1114 if (
auto CUDIE =
CU->getUnitDIE())
1116 LineToUnit.insert(std::make_pair(*StmtOffset, &*
CU));
1117 for (
const auto &TU : TUs)
1118 if (
auto TUDIE = TU->getUnitDIE())
1120 LineToUnit.insert(std::make_pair(*StmtOffset, &*TU));
1127 : DebugLineData(Data),
Context(C) {
1142 "parsing should have terminated");
1144 uint64_t OldOffset = Offset;
1146 if (
Error Err = LT.
parse(DebugLineData, &Offset, Context, U,
1147 RecoverableErrorCallback, OS))
1148 UnrecoverableErrorCallback(std::move(Err));
1149 moveToNextTable(OldOffset, LT.
Prologue);
1156 "parsing should have terminated");
1158 uint64_t OldOffset = Offset;
1161 ErrorCallback(std::move(Err));
1162 moveToNextTable(OldOffset, LT.
Prologue);
1165 DWARFUnit *DWARFDebugLine::SectionParser::prepareToParse(uint64_t Offset) {
1167 auto It = LineToUnit.find(Offset);
1168 if (It != LineToUnit.end())
1174 void DWARFDebugLine::SectionParser::moveToNextTable(uint64_t OldOffset,
SequenceVector::const_iterator SequenceIter
Optional< StringRef > Source
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.
Row(bool DefaultIsStmt=false)
Expected< const LineTable * > getOrParseLineTable(DWARFDataExtractor &DebugLineData, uint64_t Offset, const DWARFContext &Ctx, const DWARFUnit *U, function_ref< void(Error)> RecoverableErrorCallback)
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
uint32_t sizeofTotalLength() const
SmallString< 32 > digest() const
StringRef LNExtendedString(unsigned Encoding)
static bool orderByAddress(const Row &LHS, const Row &RHS)
StringRef LNStandardString(unsigned Standard)
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
raw_ostream & indent(unsigned NumSpaces)
indent - Insert 'NumSpaces' spaces.
uint8_t MinInstLength
The size in bytes of the smallest target machine instruction.
static const uint64_t UndefSection
An efficient, type-erasing, non-owning reference to a callable.
uint32_t Line
An unsigned integer indicating a source line number.
SectionParser(DWARFDataExtractor &Data, const DWARFContext &C, cu_range CUs, tu_range TUs)
void dump(raw_ostream &OS, DIDumpOptions DumpOptions) const
Error takeError()
Take ownership of the stored error.
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.
A format-neutral container for source line information.
object::SectionedAddress Address
The program-counter value corresponding to a machine instruction generated by the compiler and sectio...
void append(SmallVectorImpl< char > &path, const Twine &a, const Twine &b="", const Twine &c="", const Twine &d="")
Append to path.
const llvm::DWARFDebugLine::FileNameEntry & getFileNameEntry(uint64_t Index) const
Get DWARF-version aware access to the file name entry at the provided index.
bool lookupAddressRange(object::SectionedAddress Address, uint64_t Size, std::vector< uint32_t > &Result) const
uint64_t SectionIndex
If relocation information is present then this is the index of the section which contains above addre...
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Represents a series of contiguous machine instructions.
Error parse(const DWARFDataExtractor &DebugLineData, uint64_t *OffsetPtr, const DWARFContext &Ctx, const DWARFUnit *U=nullptr)
void postAppend()
Called after a row is appended to the matrix.
bool is_absolute(const Twine &path, Style style=Style::native)
Is path absolute?
Tagged union holding either a T or a Error.
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
uint8_t LineRange
This parameter affects the meaning of the special opcodes. See below.
uint8_t getAddressByteSize() const
StringRef str() const
Explicit conversion to StringRef.
uint8_t OpcodeBase
The number assigned to the first special opcode.
void reset(bool DefaultIsStmt)
const T & getValue() const LLVM_LVALUE_FUNCTION
uint64_t TotalLength
The size in bytes of the statement information for this compilation unit (not including the total_len...
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
bool HasModTime
Whether filename entries provide a modification timestamp.
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
Optional< uint64_t > toSectionOffset(const Optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract an section offset.
uint8_t EndSequence
A boolean indicating that the current address is that of the first byte after the end of a sequence o...
* if(!EatIfPresent(lltok::kw_thread_local)) return false
ParseOptionalThreadLocal := /*empty.
void dump(raw_ostream &OS) const
LLVM Basic Block Representation.
The instances of the Type class are immutable: once they are created, they are never changed...
LineTable parseNext(function_ref< void(Error)> RecoverableErrorCallback, function_ref< void(Error)> UnrecoverableErrorCallback, raw_ostream *OS=nullptr)
Get the next line table from the section.
Instrumentation for Order File
uint16_t File
An unsigned integer indicating the identity of the source file corresponding to a machine instruction...
bool totalLengthIsValid() const
bool HasLength
Whether filename entries provide a file size.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
bool hasFileAtIndex(uint64_t FileIndex) const
static bool orderByHighPC(const Sequence &LHS, const Sequence &RHS)
void appendSequence(const DWARFDebugLine::Sequence &S)
void dump(raw_ostream &OS, DIDumpOptions DumpOptions) const
Standard .debug_line state machine structure.
void sort(IteratorTy Start, IteratorTy End)
uint16_t Column
An unsigned integer indicating a column number within a source line.
static ErrorSuccess success()
Create a success value.
static DWARFDebugLine::SectionParser::LineToUnitMap buildLineToUnitMap(DWARFDebugLine::SectionParser::cu_range CUs, DWARFDebugLine::SectionParser::tu_range TUs)
std::map< uint64_t, DWARFUnit * > LineToUnitMap
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
void appendRow(const DWARFDebugLine::Row &R)
DWARFContext This data structure is the top level entity that deals with dwarf debug information pars...
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 ...
static void dumpTableHeader(raw_ostream &OS)
std::vector< uint8_t > StandardOpcodeLengths
A range adaptor for a pair of iterators.
This file contains constants used for implementing Dwarf debug support.
const LineTable * getLineTable(uint64_t Offset) const
static void parseV2DirFileTables(const DWARFDataExtractor &DebugLineData, uint64_t *OffsetPtr, uint64_t EndPrologueOffset, DWARFDebugLine::ContentTypeTracker &ContentTypes, std::vector< DWARFFormValue > &IncludeDirectories, std::vector< DWARFDebugLine::FileNameEntry > &FileNames)
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
Error joinErrors(Error E1, Error E2)
Concatenate errors.
Sequence
A sequence of states that a pointer may go through in which an objc_retain and objc_release are actua...
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.
uint8_t DefaultIsStmt
The initial value of theis_stmtregister.
static Error parseV5DirFileTables(const DWARFDataExtractor &DebugLineData, uint64_t *OffsetPtr, const dwarf::FormParams &FormParams, const DWARFContext &Ctx, const DWARFUnit *U, DWARFDebugLine::ContentTypeTracker &ContentTypes, std::vector< DWARFFormValue > &IncludeDirectories, std::vector< DWARFDebugLine::FileNameEntry > &FileNames)
LLVM_NODISCARD const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool containsPC(object::SectionedAddress PC) const
std::array< uint8_t, 16 > Bytes
static bool isPathAbsoluteOnWindowsOrPosix(const Twine &Path)
int8_t LineBase
This parameter affects the meaning of the special opcodes. See below.
LLVM Value Representation.
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.
void skip(function_ref< void(Error)> ErrorCallback)
Skip the current line table and go to the following line table (if present) immediately.
void trackContentType(dwarf::LineNumberEntryFormat ContentType)
Update tracked content types with ContentType.
static llvm::Expected< ContentDescriptors > parseV5EntryFormat(const DWARFDataExtractor &DebugLineData, uint64_t *OffsetPtr, DWARFDebugLine::ContentTypeTracker *ContentTypes)
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
auto upper_bound(R &&Range, T &&Value) -> decltype(adl_begin(Range))
Provide wrappers to std::upper_bound which take ranges instead of having to pass begin/end explicitly...