DIDT_AppleNamespaces,
DIDT_AppleObjC,
DIDT_CUIndex,
+ DIDT_TUIndex,
};
class DIContext {
virtual const DWARFSection& getAppleNamespacesSection() = 0;
virtual const DWARFSection& getAppleObjCSection() = 0;
virtual StringRef getCUIndexSection() = 0;
+ virtual StringRef getTUIndexSection() = 0;
static bool isSupportedVersion(unsigned version) {
return version == 2 || version == 3 || version == 4;
DWARFSection AppleNamespacesSection;
DWARFSection AppleObjCSection;
StringRef CUIndexSection;
+ StringRef TUIndexSection;
SmallVector<SmallString<32>, 4> UncompressedSections;
return AddrSection;
}
StringRef getCUIndexSection() override { return CUIndexSection; }
+ StringRef getTUIndexSection() override { return TUIndexSection; }
};
}
CUIndex.dump(OS);
}
+ if (DumpType == DIDT_All || DumpType == DIDT_TUIndex) {
+ OS << "\n.debug_tu_index contents:\n";
+ DataExtractor TUIndexData(getTUIndexSection(), isLittleEndian(),
+ savedAddressByteSize);
+ DWARFUnitIndex TUIndex;
+ TUIndex.parse(TUIndexData);
+ TUIndex.dump(OS);
+ }
+
if (DumpType == DIDT_All || DumpType == DIDT_LineDwo) {
OS << "\n.debug_line.dwo contents:\n";
unsigned stmtOffset = 0;
.Case("apple_namespac", &AppleNamespacesSection.Data)
.Case("apple_objc", &AppleObjCSection.Data)
.Case("debug_cu_index", &CUIndexSection)
+ .Case("debug_tu_index", &TUIndexSection)
// Any more debug info sections go here.
.Default(nullptr);
if (SectionData) {
; foo b;
; CHECK: .debug_cu_index contents:
-; CHECK: version: 2
-; CHECK: columns: 4
-; CHECK: units: 2
-; CHECK: buckets: 16
+; CHECK-NEXT: Index header:
+; CHECK-NEXT: version: 2
+; CHECK-NEXT: columns: 4
+; CHECK-NEXT: units: 2
+; CHECK-NEXT: buckets: 16
+
+; CHECK: .debug_tu_index contents:
+; CHECK-NEXT: Index header:
+; CHECK-NEXT: version: 2
+; CHECK-NEXT: columns: 4
+; CHECK-NEXT: units: 1
+; CHECK-NEXT: buckets: 16
-; TODO: debug_tu_index
; TODO: dump the index contents
; TODO: use the index section offset info to correctly dump debug_info