getDebugFrame()->dump(OS);
}
+ if (DumpType == DIDT_All || DumpType == DIDT_Macro) {
+ OS << "\n.debug_macinfo contents:\n";
+ getDebugMacro()->dump(OS);
+ }
+
uint32_t offset = 0;
if (DumpType == DIDT_All || DumpType == DIDT_Aranges) {
OS << "\n.debug_aranges contents:\n";
DataExtractor CUIndexData(getCUIndexSection(), isLittleEndian(),
savedAddressByteSize);
DWARFUnitIndex CUIndex;
- CUIndex.parse(CUIndexData);
- CUIndex.dump(OS);
+ if (CUIndex.parse(CUIndexData))
+ CUIndex.dump(OS);
+ }
+
+ if (DumpType == DIDT_All || DumpType == DIDT_TUIndex) {
+ OS << "\n.debug_tu_index contents:\n";
+ DataExtractor TUIndexData(getTUIndexSection(), isLittleEndian(),
+ savedAddressByteSize);
+ DWARFUnitIndex TUIndex;
+ if (TUIndex.parse(TUIndexData))
+ TUIndex.dump(OS);
}
if (DumpType == DIDT_All || DumpType == DIDT_LineDwo) {
return DebugFrame.get();
}
+const DWARFDebugMacro *DWARFContext::getDebugMacro() {
+ if (Macro)
+ return Macro.get();
+
+ DataExtractor MacinfoData(getMacinfoSection(), isLittleEndian(), 0);
+ Macro.reset(new DWARFDebugMacro());
+ Macro->parse(MacinfoData);
+ return Macro.get();
+}
+
const DWARFLineTable *
DWARFContext::getLineTableForUnit(DWARFUnit *U) {
if (!Line)
.Case("debug_frame", &DebugFrameSection)
.Case("debug_str", &StringSection)
.Case("debug_ranges", &RangeSection)
+ .Case("debug_macinfo", &MacinfoSection)
.Case("debug_pubnames", &PubNamesSection)
.Case("debug_pubtypes", &PubTypesSection)
.Case("debug_gnu_pubnames", &GnuPubNamesSection)
.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) {