Go to the documentation of this file.
20 using namespace dwarf;
25 this->GnuStyle = GnuStyle;
28 while (
Data.isValidOffset(Offset)) {
31 Set &NewSet = Sets.back();
41 "name lookup table at offset 0x%" PRIx64
" parsing failed: %s",
42 SetOffset,
toString(
C.takeError()).c_str()));
46 Offset =
C.tell() + NewSet.
Length;
57 RecoverableErrorHandler(
59 "name lookup table at offset 0x%" PRIx64
60 " does not have a complete header: %s",
61 SetOffset,
toString(
C.takeError()).c_str()));
69 uint8_t IndexEntryValue = GnuStyle ? SetData.
getU8(
C) : 0;
79 "name lookup table at offset 0x%" PRIx64
" parsing failed: %s",
80 SetOffset,
toString(
C.takeError()).c_str()));
83 if (
C.tell() != Offset)
86 "name lookup table at offset 0x%" PRIx64
87 " has a terminator at offset 0x%" PRIx64
88 " before the expected end at 0x%" PRIx64,
89 SetOffset,
C.tell() - OffsetSize, Offset - OffsetSize));
94 for (
const Set &
S : Sets) {
96 OS <<
"length = " <<
format(
"0x%0*" PRIx64, OffsetDumpWidth,
S.Length);
98 OS <<
", version = " <<
format(
"0x%04x",
S.Version);
99 OS <<
", unit_offset = "
100 <<
format(
"0x%0*" PRIx64, OffsetDumpWidth,
S.Offset);
101 OS <<
", unit_size = " <<
format(
"0x%0*" PRIx64, OffsetDumpWidth,
S.Size)
103 OS << (GnuStyle ?
"Offset Linkage Kind Name\n"
106 for (
const Entry &
E :
S.Entries) {
107 OS <<
format(
"0x%0*" PRIx64
" ", OffsetDumpWidth,
E.SecOffset);
112 OS <<
format(
"%-8s", EntryLinkage.
data()) <<
' '
115 OS <<
'\"' <<
E.Name <<
"\"\n";
This is an optimization pass for GlobalISel generic memory operations.
Each table consists of sets of variable length entries.
std::vector< Entry > Entries
void dump(raw_ostream &OS) const
StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage)
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
uint64_t Offset
The offset from the beginning of the .debug_info section of the compilation unit header referenced by...
(vector float) vec_cmpeq(*A, *B) C
StringRef FormatString(DwarfFormat Format)
This class implements an extremely fast bulk output stream that can only output to a stream.
StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind)
uint64_t Length
The total length of the entries for that set, not including the length field itself.
An efficient, type-erasing, non-owning reference to a callable.
Optional< const char * > toString(const Optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract a string value from it.
uint64_t Size
The size in bytes of the contents of the .debug_info section generated to represent that compilation ...
StringRef - Represent a constant reference to a string, i.e.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
Lightweight error class with error context and mandatory checking.
void extract(DWARFDataExtractor Data, bool GnuStyle, function_ref< void(Error)> RecoverableErrorHandler)
Describes an entry of the various gnu_pub* debug sections.
const LLVM_NODISCARD char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
uint16_t Version
This number is specific to the name lookup table and is independent of the DWARF version number.
uint8_t getDwarfOffsetByteSize(DwarfFormat Format)
The size of a reference determined by the DWARF 32/64-bit format.
dwarf::DwarfFormat Format
The DWARF format of the set.