19 template <
typename... Ts>
23 Stream <<
format(Fmt, Vals...);
42 "not enough space to extract a rangelist encoding");
43 uint8_t Encoding = Data.
getU8(OffsetPtr);
46 case dwarf::DW_RLE_end_of_list:
50 case dwarf::DW_RLE_base_addressx:
51 return createError(
"unsupported rnglists encoding DW_RLE_base_addressx " 52 "at offset 0x%" PRIx32,
54 case dwarf::DW_RLE_startx_endx:
55 return createError(
"unsupported rnglists encoding DW_RLE_startx_endx at " 58 case dwarf::DW_RLE_startx_length:
59 return createError(
"unsupported rnglists encoding DW_RLE_startx_length " 60 "at offset 0x%" PRIx32,
62 case dwarf::DW_RLE_offset_pair: {
63 uint32_t PreviousOffset = *OffsetPtr - 1;
67 return createError(
"read past end of table when reading " 68 "DW_RLE_offset_pair encoding at offset 0x%" PRIx32,
72 case dwarf::DW_RLE_base_address: {
74 return createError(
"insufficient space remaining in table for " 75 "DW_RLE_base_address encoding at offset 0x%" PRIx32,
80 case dwarf::DW_RLE_start_end: {
82 return createError(
"insufficient space remaining in table for " 83 "DW_RLE_start_end encoding " 84 "at offset 0x%" PRIx32,
90 case dwarf::DW_RLE_start_length: {
91 uint32_t PreviousOffset = *OffsetPtr - 1;
95 return createError(
"read past end of table when reading " 96 "DW_RLE_start_length encoding at offset 0x%" PRIx32,
101 return createError(
"unknown rnglists encoding 0x%" PRIx32
102 " at offset 0x%" PRIx32,
103 uint32_t(Encoding), *OffsetPtr - 1);
106 EntryKind = Encoding;
114 if (RLE.EntryKind == dwarf::DW_RLE_end_of_list)
116 if (RLE.EntryKind == dwarf::DW_RLE_base_address) {
117 BaseAddr = {RLE.Value0, RLE.SectionIndex};
126 switch (RLE.EntryKind) {
127 case dwarf::DW_RLE_offset_pair:
128 E.
LowPC = RLE.Value0;
135 case dwarf::DW_RLE_start_end:
136 E.
LowPC = RLE.Value0;
139 case dwarf::DW_RLE_start_length:
140 E.
LowPC = RLE.Value0;
154 uint8_t MaxEncodingStringLength,
161 .
dump(OS, AddrSize, DumpOpts);
171 assert(!EncodingString.empty() &&
"Unknown range entry encoding");
172 OS <<
format(
" [%s%*c", EncodingString.data(),
173 MaxEncodingStringLength - EncodingString.size() + 1,
']');
174 if (EntryKind != dwarf::DW_RLE_end_of_list)
179 case dwarf::DW_RLE_end_of_list:
180 OS << (DumpOpts.
Verbose ?
"" :
"<End of list>");
182 case dwarf::DW_RLE_base_address:
184 CurrentBase = Value0;
187 OS <<
format(
" 0x%*.*" PRIx64, AddrSize * 2, AddrSize * 2, Value0);
189 case dwarf::DW_RLE_start_length:
190 PrintRawEntry(OS, *
this, AddrSize, DumpOpts);
193 case dwarf::DW_RLE_offset_pair:
194 PrintRawEntry(OS, *
this, AddrSize, DumpOpts);
196 .
dump(OS, AddrSize, DumpOpts);
198 case dwarf::DW_RLE_start_end:
Error createError(const char *, const char *, uint32_t)
Compute iterated dominance frontiers using a linear time algorithm.
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
static void dump(StringRef Title, SpillInfo const &Spills)
Container for dump options that control which debug information will be dumped.
void dump(raw_ostream &OS, uint32_t AddressSize, DIDumpOptions DumpOpts={}) const
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
StringRef RangeListEncodingString(unsigned Encoding)
std::string & str()
Flushes the stream contents to the target string and returns the string's reference.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static Error createError(char const *Fmt, const Ts &... Vals)
This file contains constants used for implementing Dwarf debug support.
success
Parameters (see the expansion example below): (the builder, addr, loaded, new_val, ordering, /* OUT.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
A raw_ostream that writes to an std::string.
std::vector< DWARFAddressRange > DWARFAddressRangesVector
DWARFAddressRangesVector - represents a set of absolute address ranges.
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...
A class representing a single range list entry.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...