diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-09-20 23:28:55 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-09-20 23:28:55 +0000 |
commit | da5a80217ec4b4f23cecfc81264faeb1bda4e547 (patch) | |
tree | fabde6d17e1e89208bbc0390a8162e30bb704eb7 /source/Breakpoint | |
parent | e09e254af4db4a27c5f20b3cb74ab65149fff1d4 (diff) | |
download | lldb-da5a80217ec4b4f23cecfc81264faeb1bda4e547.tar.gz |
Add some watchpoint maintenance methods to the Target class.
Plus some minor changes to the WatchpointLocationList and WatchpointLocation classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Breakpoint')
-rw-r--r-- | source/Breakpoint/WatchpointLocation.cpp | 3 | ||||
-rw-r--r-- | source/Breakpoint/WatchpointLocationList.cpp | 18 |
2 files changed, 18 insertions, 3 deletions
diff --git a/source/Breakpoint/WatchpointLocation.cpp b/source/Breakpoint/WatchpointLocation.cpp index b4b9441c9..f647e42d8 100644 --- a/source/Breakpoint/WatchpointLocation.cpp +++ b/source/Breakpoint/WatchpointLocation.cpp @@ -113,7 +113,8 @@ WatchpointLocation::DumpWithLevel(Stream *s, lldb::DescriptionLevel description_ s->Printf("\n declare @ '%s'", m_decl_str.c_str()); if (description_level >= lldb::eDescriptionLevelVerbose) - s->Printf("\n hit_count = %-4u ignore_count = %-4u callback = %8p baton = %8p", + s->Printf("\n hw_index = %i hit_count = %-4u ignore_count = %-4u callback = %8p baton = %8p", + GetHardwareIndex(), GetHitCount(), GetIgnoreCount(), m_callback, diff --git a/source/Breakpoint/WatchpointLocationList.cpp b/source/Breakpoint/WatchpointLocationList.cpp index c39bd5861..4e6dbb782 100644 --- a/source/Breakpoint/WatchpointLocationList.cpp +++ b/source/Breakpoint/WatchpointLocationList.cpp @@ -232,13 +232,27 @@ WatchpointLocationList::GetDescription (Stream *s, lldb::DescriptionLevel level) } void -WatchpointLocationList::ClearAllWatchpointLocations () +WatchpointLocationList::SetEnabledAll (bool enabled) { 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) + pos->second->SetEnabled (enabled); +} + +void +WatchpointLocationList::RemoveAll () +{ + 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); + m_address_to_location.erase(pos); + + collection::iterator p, e = m_locations.end(); + for (p = m_locations.begin(); p != e; ++pos) + m_locations.erase(p); } void |