25 this->GnuStyle = GnuStyle;
31 Set &NewSet = Sets.back();
41 "name lookup table at offset 0x%" PRIx64
" parsing failed: %s",
42 SetOffset,
toString(
C.takeError()).c_str()));
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()));
79 "name lookup table at offset 0x%" PRIx64
" parsing failed: %s",
80 SetOffset,
toString(
C.takeError()).c_str()));
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) {
115 OS <<
'\"' << E.
Name <<
"\"\n";
This file contains constants used for implementing Dwarf debug support.
void extract(DWARFDataExtractor Data, bool GnuStyle, function_ref< void(Error)> RecoverableErrorHandler)
void dump(raw_ostream &OS) const
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.
constexpr const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
An efficient, type-erasing, non-owning reference to a callable.
This class implements an extremely fast bulk output stream that can only output to a stream.
StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage)
StringRef FormatString(DwarfFormat Format)
StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind)
@ C
The default llvm calling convention, compatible with C.
uint8_t getDwarfOffsetByteSize(DwarfFormat Format)
The size of a reference determined by the DWARF 32/64-bit format.
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
const char * toString(DWARFSectionKind Kind)
uint64_t SecOffset
Section offset from the beginning of the compilation unit.
StringRef Name
The name of the object as given by the DW_AT_name attribute of the referenced DIE.
dwarf::PubIndexEntryDescriptor Descriptor
An entry of the various gnu_pub* debug sections.
Each table consists of sets of variable length entries.
uint64_t Length
The total length of the entries for that set, not including the length field itself.
uint64_t Offset
The offset from the beginning of the .debug_info section of the compilation unit header referenced by...
dwarf::DwarfFormat Format
The DWARF format of the set.
std::vector< Entry > Entries
uint64_t Size
The size in bytes of the contents of the .debug_info section generated to represent that compilation ...
uint16_t Version
This number is specific to the name lookup table and is independent of the DWARF version number.
Describes an entry of the various gnu_pub* debug sections.
GDBIndexEntryLinkage Linkage