void DWARFDIE::GetDeclContextDIEs (DWARFDIECollection &decl_context_dies) const { if (IsValid()) { DWARFDIE parent_decl_ctx_die = m_die->GetParentDeclContextDIE (GetDWARF(), GetCU()); if (parent_decl_ctx_die && parent_decl_ctx_die.GetDIE() != GetDIE()) { decl_context_dies.Append(parent_decl_ctx_die); parent_decl_ctx_die.GetDeclContextDIEs (decl_context_dies); } } }
size_t DWARFCompileUnit::AppendDIEsWithTag(const dw_tag_t tag, DWARFDIECollection &dies, uint32_t depth) const { size_t old_size = dies.Size(); DWARFDebugInfoEntry::const_iterator pos; DWARFDebugInfoEntry::const_iterator end = m_die_array.end(); for (pos = m_die_array.begin(); pos != end; ++pos) { if (pos->Tag() == tag) dies.Append(DWARFDIE(this, &(*pos))); } // Return the number of DIEs added to the collection return dies.Size() - old_size; }