19 std::memset(&HeaderData, 0,
sizeof(
Header));
20 ArangeDescriptors.clear();
26 ArangeDescriptors.clear();
60 const uint32_t header_size = *offset_ptr - Offset;
61 const uint32_t tuple_size = HeaderData.
AddrSize * 2;
62 uint32_t first_tuple_offset = 0;
63 while (first_tuple_offset < header_size)
64 first_tuple_offset += tuple_size;
66 *offset_ptr = Offset + first_tuple_offset;
70 static_assert(
sizeof(arangeDescriptor.
Address) ==
71 sizeof(arangeDescriptor.
Length),
72 "Different datatypes for addresses and sizes!");
82 ArangeDescriptors.push_back(arangeDescriptor);
87 return !ArangeDescriptors.empty();
93 OS <<
format(
"Address Range Header: length = 0x%8.8x, version = 0x%4.4x, ",
95 <<
format(
"cu_offset = 0x%8.8x, addr_size = 0x%2.2x, seg_size = 0x%2.2x\n",
98 const uint32_t hex_width = HeaderData.
AddrSize * 2;
99 for (
const auto &Desc : ArangeDescriptors) {
100 OS <<
format(
"[0x%*.*" PRIx64
" -", hex_width, hex_width, Desc.Address)
101 <<
format(
" 0x%*.*" PRIx64
")\n",
102 hex_width, hex_width, Desc.getEndAddress());
format_object< Ts...> format(const char *Fmt, const Ts &...Vals)
These are helper functions used to produce formatted output.
void dump(raw_ostream &OS) const
bool extract(DataExtractor data, uint32_t *offset_ptr)
This class implements an extremely fast bulk output stream that can only output to a stream...