void BreakpointLocationList::SwapLocation(
    BreakpointLocationSP to_location_sp,
    BreakpointLocationSP from_location_sp) {
  if (!from_location_sp || !to_location_sp)
    return;

  m_address_to_location.erase(to_location_sp->GetAddress());
  to_location_sp->SwapLocation(from_location_sp);
  RemoveLocation(from_location_sp);
  m_address_to_location[to_location_sp->GetAddress()] = to_location_sp;
  to_location_sp->ResolveBreakpointSite();
}
Esempio n. 2
0
lldb::break_id_t
BreakpointLocationList::Add (BreakpointLocationSP &bp_loc_sp)
{
    if (bp_loc_sp)
    {
        Mutex::Locker locker (m_mutex);
        m_locations.push_back (bp_loc_sp);
        m_address_to_location[bp_loc_sp->GetAddress()] = bp_loc_sp;
        return bp_loc_sp->GetID();
    }
    return LLDB_INVALID_BREAK_ID;
}
Esempio n. 3
0
 bool operator() (const BreakpointLocationSP& bp_loc_sp) const
 {
     return Address::CompareFileAddress(m_addr, bp_loc_sp->GetAddress()) == 0;
 }