diff --git a/lldb/include/lldb/Target/ThreadPlan.h b/lldb/include/lldb/Target/ThreadPlan.h --- a/lldb/include/lldb/Target/ThreadPlan.h +++ b/lldb/include/lldb/Target/ThreadPlan.h @@ -377,7 +377,7 @@ // then calls DoWillResume. bool WillResume(lldb::StateType resume_state, bool current_plan); - virtual bool WillStop() = 0; + virtual void WillStop(); bool IsMasterPlan() { return m_is_master_plan; } @@ -579,7 +579,7 @@ bool MischiefManaged() override; - bool WillStop() override; + void WillStop() override; bool IsBasePlan() override { return true; } diff --git a/lldb/include/lldb/Target/ThreadPlanBase.h b/lldb/include/lldb/Target/ThreadPlanBase.h --- a/lldb/include/lldb/Target/ThreadPlanBase.h +++ b/lldb/include/lldb/Target/ThreadPlanBase.h @@ -31,7 +31,6 @@ Vote ShouldReportStop(Event *event_ptr) override; bool StopOthers() override; lldb::StateType GetPlanRunState() override; - bool WillStop() override; bool MischiefManaged() override; bool OkayToDiscard() override { return false; } diff --git a/lldb/include/lldb/Target/ThreadPlanCallFunction.h b/lldb/include/lldb/Target/ThreadPlanCallFunction.h --- a/lldb/include/lldb/Target/ThreadPlanCallFunction.h +++ b/lldb/include/lldb/Target/ThreadPlanCallFunction.h @@ -46,8 +46,6 @@ void DidPush() override; - bool WillStop() override; - bool MischiefManaged() override; // To get the return value from a function call you must create a diff --git a/lldb/include/lldb/Target/ThreadPlanCallOnFunctionExit.h b/lldb/include/lldb/Target/ThreadPlanCallOnFunctionExit.h --- a/lldb/include/lldb/Target/ThreadPlanCallOnFunctionExit.h +++ b/lldb/include/lldb/Target/ThreadPlanCallOnFunctionExit.h @@ -37,8 +37,6 @@ bool ShouldStop(Event *event_ptr) override; - bool WillStop() override; - protected: bool DoPlanExplainsStop(Event *event_ptr) override; diff --git a/lldb/include/lldb/Target/ThreadPlanPython.h b/lldb/include/lldb/Target/ThreadPlanPython.h --- a/lldb/include/lldb/Target/ThreadPlanPython.h +++ b/lldb/include/lldb/Target/ThreadPlanPython.h @@ -43,7 +43,7 @@ bool MischiefManaged() override; - bool WillStop() override; + void WillStop() override; bool StopOthers() override { return m_stop_others; } diff --git a/lldb/include/lldb/Target/ThreadPlanRunToAddress.h b/lldb/include/lldb/Target/ThreadPlanRunToAddress.h --- a/lldb/include/lldb/Target/ThreadPlanRunToAddress.h +++ b/lldb/include/lldb/Target/ThreadPlanRunToAddress.h @@ -41,8 +41,6 @@ lldb::StateType GetPlanRunState() override; - bool WillStop() override; - bool MischiefManaged() override; protected: diff --git a/lldb/include/lldb/Target/ThreadPlanStepInstruction.h b/lldb/include/lldb/Target/ThreadPlanStepInstruction.h --- a/lldb/include/lldb/Target/ThreadPlanStepInstruction.h +++ b/lldb/include/lldb/Target/ThreadPlanStepInstruction.h @@ -27,7 +27,6 @@ bool ShouldStop(Event *event_ptr) override; bool StopOthers() override; lldb::StateType GetPlanRunState() override; - bool WillStop() override; bool MischiefManaged() override; bool IsPlanStale() override; diff --git a/lldb/include/lldb/Target/ThreadPlanStepOut.h b/lldb/include/lldb/Target/ThreadPlanStepOut.h --- a/lldb/include/lldb/Target/ThreadPlanStepOut.h +++ b/lldb/include/lldb/Target/ThreadPlanStepOut.h @@ -31,7 +31,7 @@ bool ShouldStop(Event *event_ptr) override; bool StopOthers() override; lldb::StateType GetPlanRunState() override; - bool WillStop() override; + void WillStop() override; bool MischiefManaged() override; void DidPush() override; bool IsPlanStale() override; diff --git a/lldb/include/lldb/Target/ThreadPlanStepOverBreakpoint.h b/lldb/include/lldb/Target/ThreadPlanStepOverBreakpoint.h --- a/lldb/include/lldb/Target/ThreadPlanStepOverBreakpoint.h +++ b/lldb/include/lldb/Target/ThreadPlanStepOverBreakpoint.h @@ -25,7 +25,7 @@ bool ShouldStop(Event *event_ptr) override; bool StopOthers() override; lldb::StateType GetPlanRunState() override; - bool WillStop() override; + void WillStop() override; void WillPop() override; bool MischiefManaged() override; void ThreadDestroyed() override; diff --git a/lldb/include/lldb/Target/ThreadPlanStepRange.h b/lldb/include/lldb/Target/ThreadPlanStepRange.h --- a/lldb/include/lldb/Target/ThreadPlanStepRange.h +++ b/lldb/include/lldb/Target/ThreadPlanStepRange.h @@ -33,7 +33,6 @@ Vote ShouldReportStop(Event *event_ptr) override; bool StopOthers() override; lldb::StateType GetPlanRunState() override; - bool WillStop() override; bool MischiefManaged() override; void DidPush() override; bool IsPlanStale() override; diff --git a/lldb/include/lldb/Target/ThreadPlanStepThrough.h b/lldb/include/lldb/Target/ThreadPlanStepThrough.h --- a/lldb/include/lldb/Target/ThreadPlanStepThrough.h +++ b/lldb/include/lldb/Target/ThreadPlanStepThrough.h @@ -23,7 +23,6 @@ bool ShouldStop(Event *event_ptr) override; bool StopOthers() override; lldb::StateType GetPlanRunState() override; - bool WillStop() override; bool MischiefManaged() override; void DidPush() override; diff --git a/lldb/include/lldb/Target/ThreadPlanStepUntil.h b/lldb/include/lldb/Target/ThreadPlanStepUntil.h --- a/lldb/include/lldb/Target/ThreadPlanStepUntil.h +++ b/lldb/include/lldb/Target/ThreadPlanStepUntil.h @@ -23,7 +23,7 @@ bool ShouldStop(Event *event_ptr) override; bool StopOthers() override; lldb::StateType GetPlanRunState() override; - bool WillStop() override; + void WillStop() override; bool MischiefManaged() override; protected: diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h @@ -48,8 +48,6 @@ void DidPush() override; - bool WillStop() override; - protected: bool DoPlanExplainsStop(Event *event_ptr) override; diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp @@ -194,8 +194,6 @@ return IsPlanComplete(); } -bool AppleThreadPlanStepThroughObjCTrampoline::WillStop() { return true; } - // Objective-C uses optimized dispatch functions for some common and seldom // overridden methods. For instance // [object respondsToSelector:]; diff --git a/lldb/source/Target/ThreadPlan.cpp b/lldb/source/Target/ThreadPlan.cpp --- a/lldb/source/Target/ThreadPlan.cpp +++ b/lldb/source/Target/ThreadPlan.cpp @@ -142,6 +142,8 @@ return success; } +void ThreadPlan::WillStop() {} + lldb::user_id_t ThreadPlan::GetNextID() { static uint32_t g_nextPlanID = 0; return ++g_nextPlanID; @@ -221,7 +223,7 @@ return true; } -bool ThreadPlanNull::WillStop() { +void ThreadPlanNull::WillStop() { #ifdef LLDB_CONFIGURATION_DEBUG fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64 @@ -234,7 +236,6 @@ ", ptid = 0x%" PRIx64 ")", LLVM_PRETTY_FUNCTION, m_tid, GetThread().GetProtocolID()); #endif - return true; } bool ThreadPlanNull::DoPlanExplainsStop(Event *event_ptr) { diff --git a/lldb/source/Target/ThreadPlanBase.cpp b/lldb/source/Target/ThreadPlanBase.cpp --- a/lldb/source/Target/ThreadPlanBase.cpp +++ b/lldb/source/Target/ThreadPlanBase.cpp @@ -179,8 +179,6 @@ StateType ThreadPlanBase::GetPlanRunState() { return eStateRunning; } -bool ThreadPlanBase::WillStop() { return true; } - bool ThreadPlanBase::DoWillResume(lldb::StateType resume_state, bool current_plan) { // Reset these to the default values so we don't set them wrong, then not get diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp --- a/lldb/source/Target/ThreadPlanCallFunction.cpp +++ b/lldb/source/Target/ThreadPlanCallFunction.cpp @@ -379,8 +379,6 @@ #endif } -bool ThreadPlanCallFunction::WillStop() { return true; } - bool ThreadPlanCallFunction::MischiefManaged() { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP)); diff --git a/lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp b/lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp --- a/lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp +++ b/lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp @@ -76,13 +76,6 @@ return false; } -bool ThreadPlanCallOnFunctionExit::WillStop() { - // The code looks like the return value is ignored via ThreadList:: - // ShouldStop(). This is called when we really are going to stop. We don't - // care and don't need to do anything here. - return false; -} - bool ThreadPlanCallOnFunctionExit::DoPlanExplainsStop(Event *event_ptr) { // We don't ever explain a stop. The only stop that is relevant to us // directly is the step_out plan we added to do the heavy lifting of getting diff --git a/lldb/source/Target/ThreadPlanPython.cpp b/lldb/source/Target/ThreadPlanPython.cpp --- a/lldb/source/Target/ThreadPlanPython.cpp +++ b/lldb/source/Target/ThreadPlanPython.cpp @@ -168,9 +168,8 @@ m_class_name.c_str()); } -bool ThreadPlanPython::WillStop() { +void ThreadPlanPython::WillStop() { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD)); LLDB_LOGF(log, "%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION, m_class_name.c_str()); - return true; } diff --git a/lldb/source/Target/ThreadPlanRunToAddress.cpp b/lldb/source/Target/ThreadPlanRunToAddress.cpp --- a/lldb/source/Target/ThreadPlanRunToAddress.cpp +++ b/lldb/source/Target/ThreadPlanRunToAddress.cpp @@ -166,8 +166,6 @@ StateType ThreadPlanRunToAddress::GetPlanRunState() { return eStateRunning; } -bool ThreadPlanRunToAddress::WillStop() { return true; } - bool ThreadPlanRunToAddress::MischiefManaged() { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP)); diff --git a/lldb/source/Target/ThreadPlanStepInstruction.cpp b/lldb/source/Target/ThreadPlanStepInstruction.cpp --- a/lldb/source/Target/ThreadPlanStepInstruction.cpp +++ b/lldb/source/Target/ThreadPlanStepInstruction.cpp @@ -239,8 +239,6 @@ return eStateStepping; } -bool ThreadPlanStepInstruction::WillStop() { return true; } - bool ThreadPlanStepInstruction::MischiefManaged() { if (IsPlanComplete()) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP)); diff --git a/lldb/source/Target/ThreadPlanStepOut.cpp b/lldb/source/Target/ThreadPlanStepOut.cpp --- a/lldb/source/Target/ThreadPlanStepOut.cpp +++ b/lldb/source/Target/ThreadPlanStepOut.cpp @@ -404,14 +404,12 @@ return true; } -bool ThreadPlanStepOut::WillStop() { +void ThreadPlanStepOut::WillStop() { if (m_return_bp_id != LLDB_INVALID_BREAK_ID) { Breakpoint *return_bp = GetTarget().GetBreakpointByID(m_return_bp_id).get(); if (return_bp != nullptr) return_bp->SetEnabled(false); } - - return true; } bool ThreadPlanStepOut::MischiefManaged() { diff --git a/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp b/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp --- a/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp +++ b/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp @@ -129,9 +129,8 @@ return true; } -bool ThreadPlanStepOverBreakpoint::WillStop() { +void ThreadPlanStepOverBreakpoint::WillStop() { ReenableBreakpointSite(); - return true; } void ThreadPlanStepOverBreakpoint::WillPop() { diff --git a/lldb/source/Target/ThreadPlanStepRange.cpp b/lldb/source/Target/ThreadPlanStepRange.cpp --- a/lldb/source/Target/ThreadPlanStepRange.cpp +++ b/lldb/source/Target/ThreadPlanStepRange.cpp @@ -422,8 +422,6 @@ } } -bool ThreadPlanStepRange::WillStop() { return true; } - StateType ThreadPlanStepRange::GetPlanRunState() { if (m_next_branch_bp_sp) return eStateRunning; diff --git a/lldb/source/Target/ThreadPlanStepThrough.cpp b/lldb/source/Target/ThreadPlanStepThrough.cpp --- a/lldb/source/Target/ThreadPlanStepThrough.cpp +++ b/lldb/source/Target/ThreadPlanStepThrough.cpp @@ -217,8 +217,6 @@ return true; } -bool ThreadPlanStepThrough::WillStop() { return true; } - void ThreadPlanStepThrough::ClearBackstopBreakpoint() { if (m_backstop_bkpt_id != LLDB_INVALID_BREAK_ID) { m_process.GetTarget().RemoveBreakpointByID(m_backstop_bkpt_id); diff --git a/lldb/source/Target/ThreadPlanStepUntil.cpp b/lldb/source/Target/ThreadPlanStepUntil.cpp --- a/lldb/source/Target/ThreadPlanStepUntil.cpp +++ b/lldb/source/Target/ThreadPlanStepUntil.cpp @@ -295,7 +295,7 @@ return true; } -bool ThreadPlanStepUntil::WillStop() { +void ThreadPlanStepUntil::WillStop() { Target &target = GetTarget(); Breakpoint *return_bp = target.GetBreakpointByID(m_return_bp_id).get(); if (return_bp != nullptr) @@ -307,7 +307,6 @@ if (until_bp != nullptr) until_bp->SetEnabled(false); } - return true; } bool ThreadPlanStepUntil::MischiefManaged() {