コード例 #1
0
ファイル: DWARFCompileUnit.cpp プロジェクト: kraj/lldb
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;
}
コード例 #2
0
ファイル: DWARFUnit.cpp プロジェクト: llvm-project/lldb
size_t DWARFUnit::AppendDIEsWithTag(const dw_tag_t tag,
                                    std::vector<DWARFDIE> &dies,
                                    uint32_t depth) const {
  size_t old_size = dies.size();
  {
    llvm::sys::ScopedReader lock(m_die_array_mutex);
    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.emplace_back(this, &(*pos));
    }
  }

  // Return the number of DIEs added to the collection
  return dies.size() - old_size;
}