summaryrefslogtreecommitdiffstats
path: root/lldb/source/Breakpoint/WatchpointList.cpp
diff options
context:
space:
mode:
authorTed Woodward <ted.woodward@codeaurora.org>2015-12-07 19:38:58 +0000
committerTed Woodward <ted.woodward@codeaurora.org>2015-12-07 19:38:58 +0000
commit65a47b31b3958f6d4088049177d94f3e11308cd8 (patch)
tree9c1866a91315f944ab35d84d0d5d122170e050ac /lldb/source/Breakpoint/WatchpointList.cpp
parenta6bdd70f4bf0893be2303c1a57ca1910a5c4262a (diff)
downloadbcm5719-llvm-65a47b31b3958f6d4088049177d94f3e11308cd8.tar.gz
bcm5719-llvm-65a47b31b3958f6d4088049177d94f3e11308cd8.zip
Fix watchpoint check to use watchpoint ranges
Summary: Watchpoints, unlike breakpoints, have an address range. This patch changes WatchpointList::FindByAddress() to match on any address in the watchpoint range, instead of only matching on the watchpoint's base address. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14932 llvm-svn: 254931
Diffstat (limited to 'lldb/source/Breakpoint/WatchpointList.cpp')
-rw-r--r--lldb/source/Breakpoint/WatchpointList.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Breakpoint/WatchpointList.cpp b/lldb/source/Breakpoint/WatchpointList.cpp
index 472bae06b44..64bf5cd63ed 100644
--- a/lldb/source/Breakpoint/WatchpointList.cpp
+++ b/lldb/source/Breakpoint/WatchpointList.cpp
@@ -75,10 +75,15 @@ WatchpointList::FindByAddress (lldb::addr_t addr) const
{
wp_collection::const_iterator pos, end = m_watchpoints.end();
for (pos = m_watchpoints.begin(); pos != end; ++pos)
- if ((*pos)->GetLoadAddress() == addr) {
+ {
+ lldb::addr_t wp_addr = (*pos)->GetLoadAddress();
+ uint32_t wp_bytesize = (*pos)->GetByteSize();
+ if ((wp_addr <= addr) && ((wp_addr + wp_bytesize) > addr))
+ {
wp_sp = *pos;
break;
}
+ }
}
return wp_sp;
OpenPOWER on IntegriCloud