Exemple #1
0
// Add a watchpoint to the list.
lldb::watch_id_t
WatchpointList::Add (const WatchpointSP &wp_sp)
{
    Mutex::Locker locker (m_mutex);
    wp_sp->SetID(++m_next_wp_id);
    m_watchpoints.push_back(wp_sp);
    return wp_sp->GetID();
}
// Add a watchpoint to the list.
lldb::watch_id_t
WatchpointList::Add (const WatchpointSP &wp_sp, bool notify)
{
    Mutex::Locker locker (m_mutex);
    wp_sp->SetID(++m_next_wp_id);
    m_watchpoints.push_back(wp_sp);
    if (notify)
    {
        if (wp_sp->GetTarget().EventTypeHasListeners(Target::eBroadcastBitWatchpointChanged))
            wp_sp->GetTarget().BroadcastEvent (Target::eBroadcastBitWatchpointChanged,
                                               new Watchpoint::WatchpointEventData (eWatchpointEventTypeAdded, wp_sp));
    }
    return wp_sp->GetID();
}
 bool operator() (const WatchpointSP &wp) const
 {
     return m_watch_id == wp->GetID();
 }