15 using namespace llvm::dwarf;
19 : GnuStyle(GnuStyle) {
24 Set &SetData = Sets.back();
31 while (Offset < Data.
size()) {
35 uint8_t IndexEntryValue = GnuStyle ? PubNames.
getU8(&Offset) : 0;
44 OS <<
"\n." << Name <<
" contents: a\n";
45 for (
const Set &S : Sets) {
46 OS <<
"length = " <<
format(
"0x%08x", S.Length);
47 OS <<
" version = " <<
format(
"0x%04x", S.Version);
48 OS <<
" unit_offset = " <<
format(
"0x%08x", S.Offset);
49 OS <<
" unit_size = " <<
format(
"0x%08x", S.Size) <<
'\n';
50 OS << (GnuStyle ?
"Offset Linkage Kind Name\n"
53 for (
const Entry &
E : S.Entries) {
59 OS <<
format(
"%-8s", EntryLinkage.
data()) <<
' '
62 OS <<
'\"' << E.
Name <<
"\"\n";
const char * Name
The name of the object as given by the DW_AT_name attribute of the referenced DIE.
llvm::dwarf::PubIndexEntryDescriptor Descriptor
An entry of the various gnu_pub* debug sections.
Each table consists of sets of variable length entries.
void dump(StringRef Name, raw_ostream &OS) const
Decsribes an entry of the various gnu_pub* debug sections.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
static GCRegistry::Add< CoreCLRGC > E("coreclr","CoreCLR-compatible GC")
format_object< Ts...> format(const char *Fmt, const Ts &...Vals)
These are helper functions used to produce formatted output.
StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind)
uint32_t Size
The size in bytes of the contents of the .debug_info section generated to represent that compilation ...
uint32_t Length
The total length of the entries for that set, not including the length field itself.
StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage)
GDBIndexEntryLinkage Linkage
DWARFDebugPubTable(StringRef Data, bool LittleEndian, bool GnuStyle)
uint32_t Offset
The offset from the beginning of the .debug_info section of the compilation unit header referenced by...
uint32_t SecOffset
Section offset from the beginning of the compilation unit.
std::vector< Entry > Entries
uint16_t Version
This number is specific to the name lookup table and is independent of the DWARF version number...
This class implements an extremely fast bulk output stream that can only output to a stream...
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
StringRef - Represent a constant reference to a string, i.e.