[Lldb-commits] [lldb] r139840 - in /lldb/trunk: include/lldb/Breakpoint/WatchpointLocationList.h source/Breakpoint/WatchpointLocationList.cpp source/Target/Target.cpp
Johnny Chen
johnny.chen at apple.com
Thu Sep 15 13:54:25 PDT 2011
Author: johnny
Date: Thu Sep 15 15:54:25 2011
New Revision: 139840
URL: http://llvm.org/viewvc/llvm-project?rev=139840&view=rev
Log:
Add cleanup of watchpoint locations during Target::DeleteCurrentProcess().
Modified:
lldb/trunk/include/lldb/Breakpoint/WatchpointLocationList.h
lldb/trunk/source/Breakpoint/WatchpointLocationList.cpp
lldb/trunk/source/Target/Target.cpp
Modified: lldb/trunk/include/lldb/Breakpoint/WatchpointLocationList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/WatchpointLocationList.h?rev=139840&r1=139839&r2=139840&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/WatchpointLocationList.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/WatchpointLocationList.h Thu Sep 15 15:54:25 2011
@@ -174,6 +174,9 @@
GetDescription (Stream *s,
lldb::DescriptionLevel level);
+ void
+ ClearAllWatchpointLocations ();
+
//------------------------------------------------------------------
/// Sets the passed in Locker to hold the Watchpoint Location List mutex.
///
Modified: lldb/trunk/source/Breakpoint/WatchpointLocationList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/WatchpointLocationList.cpp?rev=139840&r1=139839&r2=139840&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/WatchpointLocationList.cpp (original)
+++ lldb/trunk/source/Breakpoint/WatchpointLocationList.cpp Thu Sep 15 15:54:25 2011
@@ -189,6 +189,16 @@
}
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)
{
return locker.Reset (m_mutex.GetMutex());
Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=139840&r1=139839&r2=139840&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Thu Sep 15 15:54:25 2011
@@ -124,6 +124,7 @@
// 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();
}
}
More information about the lldb-commits
mailing list