+void DWARFContext::parseDWOTypeUnits() {
+ const TypeSectionMap &Sections = getTypesDWOSections();
+ for (TypeSectionMap::const_iterator I = Sections.begin(), E = Sections.end();
+ I != E; ++I) {
+ uint32_t offset = 0;
+ const DataExtractor &DIData =
+ DataExtractor(I->second.Data, isLittleEndian(), 0);
+ while (DIData.isValidOffset(offset)) {
+ OwningPtr<DWARFTypeUnit> TU(new DWARFTypeUnit(
+ getDebugAbbrevDWO(), I->second.Data, getAbbrevDWOSection(),
+ getRangeDWOSection(), getStringDWOSection(),
+ getStringOffsetDWOSection(), getAddrSection(), &I->second.Relocs,
+ isLittleEndian()));
+ if (!TU->extract(DIData, &offset))
+ break;
+ DWOTUs.push_back(TU.take());
+ offset = DWOTUs.back()->getNextUnitOffset();
+ }
+ }
+}
+