Go to the documentation of this file.
34 std::memset(&HeaderData, 0,
sizeof(
Header));
35 ArangeDescriptors.clear();
42 ArangeDescriptors.clear();
78 "parsing address ranges table at offset 0x%" PRIx64
88 "the length of address range table at offset "
89 "0x%" PRIx64
" exceeds section size",
93 "address range table at offset 0x%" PRIx64, Offset))
97 "non-zero segment selector size in address range "
98 "table at offset 0x%" PRIx64
" is not supported",
106 if (full_length % tuple_size != 0)
109 "address range table at offset 0x%" PRIx64
110 " has length that is not a multiple of the tuple size",
114 const uint32_t header_size = *offset_ptr - Offset;
116 while (first_tuple_offset < header_size)
117 first_tuple_offset += tuple_size;
120 if (full_length <= first_tuple_offset)
123 "address range table at offset 0x%" PRIx64
124 " has an insufficient length to contain any entries",
127 *offset_ptr = Offset + first_tuple_offset;
131 static_assert(
sizeof(arangeDescriptor.
Address) ==
132 sizeof(arangeDescriptor.
Length),
133 "Different datatypes for addresses and sizes!");
136 uint64_t end_offset = Offset + full_length;
137 while (*offset_ptr < end_offset) {
144 if (arangeDescriptor.
Length == 0 && arangeDescriptor.
Address == 0) {
145 if (*offset_ptr == end_offset)
149 "address range table at offset 0x%" PRIx64
150 " has a premature terminator entry at offset 0x%" PRIx64,
151 Offset, EntryOffset));
154 ArangeDescriptors.push_back(arangeDescriptor);
158 "address range table at offset 0x%" PRIx64
159 " is not terminated by null entry",
165 OS <<
"Address Range Header: "
166 <<
format(
"length = 0x%0*" PRIx64
", ", OffsetDumpWidth, HeaderData.
Length)
169 <<
format(
"cu_offset = 0x%0*" PRIx64
", ", OffsetDumpWidth,
174 for (
const auto &Desc : ArangeDescriptors) {
This is an optimization pass for GlobalISel generic memory operations.
void dump(raw_ostream &OS) const
static ErrorSuccess success()
Create a success value.
uint64_t getEndAddress() const
StringRef FormatString(DwarfFormat Format)
static Error checkAddressSizeSupported(unsigned AddressSize, std::error_code EC, char const *Fmt, const Ts &...Vals)
This class implements an extremely fast bulk output stream that can only output to a stream.
An efficient, type-erasing, non-owning reference to a callable.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Subclass of Error for the sole purpose of identifying the success path in the type system.
uint8_t getUnitLengthFieldByteSize(DwarfFormat Format)
Get the byte size of the unit length field depending on the DWARF format.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
Error extract(DWARFDataExtractor data, uint64_t *offset_ptr, function_ref< void(Error)> WarningHandler)
void dump(raw_ostream &OS, uint32_t AddressSize) const
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
const char * toString(DWARFSectionKind Kind)
Lightweight error class with error context and mandatory checking.
SmallVectorImpl< T >::const_pointer c_str(SmallVectorImpl< T > &str)
uint8_t getDwarfOffsetByteSize(DwarfFormat Format)
The size of a reference determined by the DWARF 32/64-bit format.