diff options
Diffstat (limited to 'source/Target/StopInfo.cpp')
-rw-r--r-- | source/Target/StopInfo.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/source/Target/StopInfo.cpp b/source/Target/StopInfo.cpp index a37a4079ff116..4b57ca65a2dff 100644 --- a/source/Target/StopInfo.cpp +++ b/source/Target/StopInfo.cpp @@ -40,7 +40,8 @@ StopInfo::StopInfo (Thread &thread, uint64_t value) : m_resume_id (thread.GetProcess()->GetResumeID()), m_value (value), m_override_should_notify (eLazyBoolCalculate), - m_override_should_stop (eLazyBoolCalculate) + m_override_should_stop (eLazyBoolCalculate), + m_extended_info() { } @@ -181,6 +182,7 @@ public: { ExecutionContext exe_ctx (thread_sp->GetStackFrameAtIndex(0)); StoppointCallbackContext context (event_ptr, exe_ctx, true); + bp_site_sp->BumpHitCounts(); m_should_stop = bp_site_sp->ShouldStop (&context); } else @@ -402,10 +404,21 @@ protected: // Let's copy the breakpoint locations out of the site and store them in a local list. That way if // one of the breakpoint actions changes the site, then we won't be operating on a bad list. + // For safety's sake let's also grab an extra reference to the breakpoint owners of the locations we're + // going to examine, since the locations are going to have to get back to their breakpoints, and the + // locations don't keep their owners alive. I'm just sticking the BreakpointSP's in a vector since + // I'm only really using it to locally increment their retain counts. BreakpointLocationCollection site_locations; + std::vector<lldb::BreakpointSP> location_owners; + for (size_t j = 0; j < num_owners; j++) - site_locations.Add(bp_site_sp->GetOwnerAtIndex(j)); + { + BreakpointLocationSP loc(bp_site_sp->GetOwnerAtIndex(j)); + site_locations.Add(loc); + location_owners.push_back(loc->GetBreakpoint().shared_from_this()); + + } for (size_t j = 0; j < num_owners; j++) { @@ -689,14 +702,13 @@ protected: assert (stored_stop_info_sp.get() == this); ThreadPlanSP new_plan_sp(thread_sp->QueueThreadPlanForStepSingleInstruction(false, // step-over - false, // abort_other_plans - true)); // stop_other_threads + false, // abort_other_plans + true)); // stop_other_threads new_plan_sp->SetIsMasterPlan (true); new_plan_sp->SetOkayToDiscard (false); new_plan_sp->SetPrivate (true); process->GetThreadList().SetSelectedThreadByID (thread_sp->GetID()); - process->Resume (); - process->WaitForProcessToStop (NULL); + process->ResumeSynchronous(NULL); process->GetThreadList().SetSelectedThreadByID (thread_sp->GetID()); thread_sp->SetStopInfo(stored_stop_info_sp); } |