mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
DebugInfo: Avoid emitting pubtype entries for type DIEs that just indirect to a type unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195698 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -34,27 +34,29 @@ static void dumpPubSection(raw_ostream &OS, StringRef Name, StringRef Data,
|
||||
OS << "\n." << Name << " contents:\n";
|
||||
DataExtractor pubNames(Data, LittleEndian, 0);
|
||||
uint32_t offset = 0;
|
||||
OS << "length = " << format("0x%08x", pubNames.getU32(&offset));
|
||||
OS << " version = " << format("0x%04x", pubNames.getU16(&offset));
|
||||
OS << " unit_offset = " << format("0x%08x", pubNames.getU32(&offset));
|
||||
OS << " unit_size = " << format("0x%08x", pubNames.getU32(&offset)) << '\n';
|
||||
if (GnuStyle)
|
||||
OS << "Offset Linkage Kind Name\n";
|
||||
else
|
||||
OS << "Offset Name\n";
|
||||
while (pubNames.isValidOffset(offset)) {
|
||||
OS << "length = " << format("0x%08x", pubNames.getU32(&offset));
|
||||
OS << " version = " << format("0x%04x", pubNames.getU16(&offset));
|
||||
OS << " unit_offset = " << format("0x%08x", pubNames.getU32(&offset));
|
||||
OS << " unit_size = " << format("0x%08x", pubNames.getU32(&offset)) << '\n';
|
||||
if (GnuStyle)
|
||||
OS << "Offset Linkage Kind Name\n";
|
||||
else
|
||||
OS << "Offset Name\n";
|
||||
|
||||
while (offset < Data.size()) {
|
||||
uint32_t dieRef = pubNames.getU32(&offset);
|
||||
if (dieRef == 0)
|
||||
break;
|
||||
OS << format("0x%8.8x ", dieRef);
|
||||
if (GnuStyle) {
|
||||
PubIndexEntryDescriptor desc(pubNames.getU8(&offset));
|
||||
OS << format("%-8s", dwarf::GDBIndexEntryLinkageString(desc.Linkage))
|
||||
<< ' ' << format("%-8s", dwarf::GDBIndexEntryKindString(desc.Kind))
|
||||
<< ' ';
|
||||
while (offset < Data.size()) {
|
||||
uint32_t dieRef = pubNames.getU32(&offset);
|
||||
if (dieRef == 0)
|
||||
break;
|
||||
OS << format("0x%8.8x ", dieRef);
|
||||
if (GnuStyle) {
|
||||
PubIndexEntryDescriptor desc(pubNames.getU8(&offset));
|
||||
OS << format("%-8s", dwarf::GDBIndexEntryLinkageString(desc.Linkage))
|
||||
<< ' ' << format("%-8s", dwarf::GDBIndexEntryKindString(desc.Kind))
|
||||
<< ' ';
|
||||
}
|
||||
OS << '\"' << pubNames.getCStr(&offset) << "\"\n";
|
||||
}
|
||||
OS << '\"' << pubNames.getCStr(&offset) << "\"\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user