size_t BreakpointLocationList::FindInModule (Module *module, BreakpointLocationCollection& bp_loc_list) { Mutex::Locker locker (m_mutex); const size_t orig_size = bp_loc_list.GetSize(); collection::iterator pos, end = m_locations.end(); for (pos = m_locations.begin(); pos != end; ++pos) { bool seen = false; BreakpointLocationSP break_loc = (*pos); const Section *section = break_loc->GetAddress().GetSection(); if (section) { if (section->GetModule() == module) { if (!seen) { seen = true; bp_loc_list.Add (break_loc); } } } } return bp_loc_list.GetSize() - orig_size; }
size_t BreakpointSite::CopyOwnersList(BreakpointLocationCollection &out_collection) { std::lock_guard<std::recursive_mutex> guard(m_owners_mutex); for (BreakpointLocationSP loc_sp : m_owners.BreakpointLocations()) { out_collection.Add(loc_sp); } return out_collection.GetSize(); }
size_t BreakpointSite::CopyOwnersList (BreakpointLocationCollection &out_collection) { Mutex::Locker locker(m_owners_mutex); for (BreakpointLocationSP loc_sp : m_owners.BreakpointLocations()) { out_collection.Add(loc_sp); } return out_collection.GetSize(); }
size_t BreakpointLocationList::FindInModule( Module *module, BreakpointLocationCollection &bp_loc_list) { std::lock_guard<std::recursive_mutex> guard(m_mutex); const size_t orig_size = bp_loc_list.GetSize(); collection::iterator pos, end = m_locations.end(); for (pos = m_locations.begin(); pos != end; ++pos) { BreakpointLocationSP break_loc = (*pos); SectionSP section_sp(break_loc->GetAddress().GetSection()); if (section_sp && section_sp->GetModule().get() == module) { bp_loc_list.Add(break_loc); } } return bp_loc_list.GetSize() - orig_size; }