//---------------------------------------------------------------------- // DWARFAbbreviationDeclarationSet::Extract() //---------------------------------------------------------------------- bool DWARFAbbreviationDeclarationSet::Extract(const DWARFDataExtractor &data, lldb::offset_t *offset_ptr) { const lldb::offset_t begin_offset = *offset_ptr; m_offset = begin_offset; Clear(); DWARFAbbreviationDeclaration abbrevDeclaration; dw_uleb128_t prev_abbr_code = 0; while (abbrevDeclaration.Extract(data, offset_ptr)) { m_decls.push_back(abbrevDeclaration); if (m_idx_offset == 0) m_idx_offset = abbrevDeclaration.Code(); else { if (prev_abbr_code + 1 != abbrevDeclaration.Code()) m_idx_offset = UINT32_MAX; // Out of order indexes, we can't do O(1) lookups... } prev_abbr_code = abbrevDeclaration.Code(); } return begin_offset != *offset_ptr; }