[Lldb-commits] [lldb] r153206 - /lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp
Johnny Chen
johnny.chen at apple.com
Wed Mar 21 11:28:25 PDT 2012
Author: johnny
Date: Wed Mar 21 13:28:25 2012
New Revision: 153206
URL: http://llvm.org/viewvc/llvm-project?rev=153206&view=rev
Log:
Add missing watchpoint stop info creation logic for arm on the debugger side.
WIP for rdar://problem/9667960
Modified:
lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp
Modified: lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp?rev=153206&r1=153205&r2=153206&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp Wed Mar 21 13:28:25 2012
@@ -314,7 +314,7 @@
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 @@
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);
}
More information about the lldb-commits
mailing list