summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2012-03-21 18:28:25 +0000
committerJohnny Chen <johnny.chen@apple.com>2012-03-21 18:28:25 +0000
commit72ee62e030d0f861d8e18db835d33a4f4cc58bde (patch)
tree4072ec25640e05728801207fab993c2786879653 /lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
parent02fc6e86a649f23aff8893b0c06009b6beb3df74 (diff)
downloadbcm5719-llvm-72ee62e030d0f861d8e18db835d33a4f4cc58bde.tar.gz
bcm5719-llvm-72ee62e030d0f861d8e18db835d33a4f4cc58bde.zip
Add missing watchpoint stop info creation logic for arm on the debugger side.
WIP for rdar://problem/9667960 llvm-svn: 153206
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp')
-rw-r--r--lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
index 95be8c51ad3..bc313f75eb2 100644
--- a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
+++ b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
@@ -314,7 +314,7 @@ StopInfoMachException::CreateStopReasonWithMachException
lldb::WatchpointSP wp_sp;
if (target)
wp_sp = target->GetWatchpointList().FindByAddress((lldb::addr_t)exc_sub_code);
- if (wp_sp)
+ if (wp_sp && wp_sp->IsEnabled())
{
// Debugserver may piggyback the hardware index of the fired watchpoint in the exception data.
// Set the hardware index if that's the case.
@@ -337,6 +337,19 @@ StopInfoMachException::CreateStopReasonWithMachException
case llvm::Triple::arm:
if (exc_code == 0x102)
{
+ // It's a watchpoint, then, if the exc_sub_code indicates a known/enabled
+ // data break address from our watchpoint list.
+ lldb::WatchpointSP wp_sp;
+ if (target)
+ wp_sp = target->GetWatchpointList().FindByAddress((lldb::addr_t)exc_sub_code);
+ if (wp_sp && wp_sp->IsEnabled())
+ {
+ // Debugserver may piggyback the hardware index of the fired watchpoint in the exception data.
+ // Set the hardware index if that's the case.
+ if (exc_data_count >=3)
+ wp_sp->SetHardwareIndex((uint32_t)exc_sub_sub_code);
+ return StopInfo::CreateStopReasonWithWatchpointID(thread, wp_sp->GetID());
+ }
// EXC_ARM_DA_DEBUG seems to be reused for EXC_BREAKPOINT as well as EXC_BAD_ACCESS
return StopInfo::CreateStopReasonToTrace(thread);
}
OpenPOWER on IntegriCloud