- if (!DWOCUs.empty())
- return;
- uint32_t offset = 0;
- const DataExtractor &DIData =
- DataExtractor(getInfoDWOSection().Data, isLittleEndian(), 0);
- while (DIData.isValidOffset(offset)) {
- std::unique_ptr<DWARFCompileUnit> DWOCU(new DWARFCompileUnit(*this,
- getDebugAbbrevDWO(), getInfoDWOSection().Data, getRangeDWOSection(),
- getStringDWOSection(), getStringOffsetDWOSection(), getAddrSection(),
- &getInfoDWOSection().Relocs, isLittleEndian(), DWOCUs));
- if (!DWOCU->extract(DIData, &offset)) {
- break;
- }
- DWOCUs.push_back(std::move(DWOCU));
- offset = DWOCUs.back()->getNextUnitOffset();
- }