summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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