mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 03:50:17 +08:00
Add cleanup of watchpoint locations during Target::DeleteCurrentProcess().
llvm-svn: 139840
This commit is contained in:
@@ -174,6 +174,9 @@ public:
|
||||
GetDescription (Stream *s,
|
||||
lldb::DescriptionLevel level);
|
||||
|
||||
void
|
||||
ClearAllWatchpointLocations ();
|
||||
|
||||
//------------------------------------------------------------------
|
||||
/// Sets the passed in Locker to hold the Watchpoint Location List mutex.
|
||||
///
|
||||
|
||||
@@ -188,6 +188,16 @@ WatchpointLocationList::GetDescription (Stream *s, lldb::DescriptionLevel level)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
WatchpointLocationList::ClearAllWatchpointLocations ()
|
||||
{
|
||||
Mutex::Locker locker(m_mutex);
|
||||
addr_map::iterator pos, end = m_address_to_location.end();
|
||||
|
||||
for (pos = m_address_to_location.begin(); pos != end; ++pos)
|
||||
m_address_to_location.erase(pos);
|
||||
}
|
||||
|
||||
void
|
||||
WatchpointLocationList::GetListMutex (Mutex::Locker &locker)
|
||||
{
|
||||
|
||||
@@ -124,6 +124,7 @@ Target::DeleteCurrentProcess ()
|
||||
// clean up needs some help from the process.
|
||||
m_breakpoint_list.ClearAllBreakpointSites();
|
||||
m_internal_breakpoint_list.ClearAllBreakpointSites();
|
||||
m_watchpoint_location_list.ClearAllWatchpointLocations();
|
||||
m_process_sp.reset();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user