diff --git a/lldb/include/lldb/Target/Thread.h b/lldb/include/lldb/Target/Thread.h --- a/lldb/include/lldb/Target/Thread.h +++ b/lldb/include/lldb/Target/Thread.h @@ -781,10 +781,10 @@ /// \param[in] stop_other_threads /// \b true if we will stop other threads while we single step this one. /// - /// \param[in] stop_vote + /// \param[in] report_stop_vote /// See standard meanings for the stop & run votes in ThreadPlan.h. /// - /// \param[in] run_vote + /// \param[in] report_run_vote /// See standard meanings for the stop & run votes in ThreadPlan.h. /// /// \param[out] status @@ -800,7 +800,7 @@ /// plan could not be queued. virtual lldb::ThreadPlanSP QueueThreadPlanForStepOut( bool abort_other_plans, SymbolContext *addr_context, bool first_insn, - bool stop_other_threads, Vote stop_vote, Vote run_vote, + bool stop_other_threads, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, Status &status, LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate); @@ -830,10 +830,10 @@ /// \param[in] stop_other_threads /// \b true if we will stop other threads while we single step this one. /// - /// \param[in] stop_vote + /// \param[in] report_stop_vote /// See standard meanings for the stop & run votes in ThreadPlan.h. /// - /// \param[in] run_vote + /// \param[in] report_run_vote /// See standard meanings for the stop & run votes in ThreadPlan.h. /// /// \param[in] frame_idx @@ -864,7 +864,7 @@ /// plan could not be queued. virtual lldb::ThreadPlanSP QueueThreadPlanForStepOutNoShouldStop( bool abort_other_plans, SymbolContext *addr_context, bool first_insn, - bool stop_other_threads, Vote stop_vote, Vote run_vote, + bool stop_other_threads, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, Status &status, bool continue_to_next_branch = false); /// Gets the plan used to step through the code that steps from a function 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 @@ -260,8 +260,8 @@ // One other little detail here, sometimes a plan will push another plan onto // the plan stack to do some part of the first plan's job, and it would be // convenient to tell that plan how it should respond to ShouldReportStop. -// You can do that by setting the stop_vote in the child plan when you create -// it. +// You can do that by setting the report_stop_vote in the child plan when you +// create it. // // Suppressing the initial eStateRunning event: // @@ -275,8 +275,9 @@ // eVoteNo from ShouldReportStop, to force a running event to be reported // return eVoteYes, in general though you should return eVoteNoOpinion which // will allow the ThreadList to figure out the right thing to do. The -// run_vote argument to the constructor works like stop_vote, and is a way for -// a plan to instruct a sub-plan on how to respond to ShouldReportStop. +// report_run_vote argument to the constructor works like report_stop_vote, and +// is a way for a plan to instruct a sub-plan on how to respond to +// ShouldReportStop. class ThreadPlan : public std::enable_shared_from_this, public UserID { @@ -472,7 +473,7 @@ protected: // Constructors and Destructors ThreadPlan(ThreadPlanKind kind, const char *name, Thread &thread, - Vote stop_vote, Vote run_vote); + Vote report_stop_vote, Vote report_run_vote); // Classes that inherit from ThreadPlan can see and modify these @@ -515,8 +516,8 @@ Status m_status; Process &m_process; lldb::tid_t m_tid; - Vote m_stop_vote; - Vote m_run_vote; + Vote m_report_stop_vote; + Vote m_report_run_vote; bool m_takes_iteration_count; bool m_could_not_resolve_hw_bp; int32_t m_iteration_count = 1; 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 @@ -18,7 +18,7 @@ class ThreadPlanStepInstruction : public ThreadPlan { public: ThreadPlanStepInstruction(Thread &thread, bool step_over, bool stop_others, - Vote stop_vote, Vote run_vote); + Vote report_stop_vote, Vote report_run_vote); ~ThreadPlanStepInstruction() 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 @@ -18,8 +18,8 @@ class ThreadPlanStepOut : public ThreadPlan, public ThreadPlanShouldStopHere { public: ThreadPlanStepOut(Thread &thread, SymbolContext *addr_context, - bool first_insn, bool stop_others, Vote stop_vote, - Vote run_vote, uint32_t frame_idx, + bool first_insn, bool stop_others, Vote report_stop_vote, + Vote report_run_vote, uint32_t frame_idx, LazyBool step_out_avoids_code_without_debug_info, bool continue_to_next_branch = false, bool gather_return_value = true); @@ -76,8 +76,9 @@ friend lldb::ThreadPlanSP Thread::QueueThreadPlanForStepOut( bool abort_other_plans, SymbolContext *addr_context, bool first_insn, - bool stop_others, Vote stop_vote, Vote run_vote, uint32_t frame_idx, - Status &status, LazyBool step_out_avoids_code_without_debug_info); + bool stop_others, Vote report_stop_vote, Vote report_run_vote, + uint32_t frame_idx, Status &status, + LazyBool step_out_avoids_code_without_debug_info); void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info); // Need an appropriate marker for the current stack so we can tell step out diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -3374,14 +3374,14 @@ should_resume = !m_thread_list.ShouldStop(event_ptr); if (was_restarted || should_resume || m_resume_requested) { - Vote stop_vote = m_thread_list.ShouldReportStop(event_ptr); + Vote report_stop_vote = m_thread_list.ShouldReportStop(event_ptr); LLDB_LOGF(log, "Process::ShouldBroadcastEvent: should_resume: %i state: " - "%s was_restarted: %i stop_vote: %d.", + "%s was_restarted: %i report_stop_vote: %d.", should_resume, StateAsCString(state), was_restarted, - stop_vote); + report_stop_vote); - switch (stop_vote) { + switch (report_stop_vote) { case eVoteYes: return_value = true; break; diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -1306,11 +1306,12 @@ ThreadPlanSP Thread::QueueThreadPlanForStepOut( bool abort_other_plans, SymbolContext *addr_context, bool first_insn, - bool stop_other_threads, Vote stop_vote, Vote run_vote, uint32_t frame_idx, - Status &status, LazyBool step_out_avoids_code_without_debug_info) { + bool stop_other_threads, Vote report_stop_vote, Vote report_run_vote, + uint32_t frame_idx, Status &status, + LazyBool step_out_avoids_code_without_debug_info) { ThreadPlanSP thread_plan_sp(new ThreadPlanStepOut( - *this, addr_context, first_insn, stop_other_threads, stop_vote, run_vote, - frame_idx, step_out_avoids_code_without_debug_info)); + *this, addr_context, first_insn, stop_other_threads, report_stop_vote, + report_run_vote, frame_idx, step_out_avoids_code_without_debug_info)); status = QueueThreadPlan(thread_plan_sp, abort_other_plans); return thread_plan_sp; @@ -1318,13 +1319,14 @@ ThreadPlanSP Thread::QueueThreadPlanForStepOutNoShouldStop( bool abort_other_plans, SymbolContext *addr_context, bool first_insn, - bool stop_other_threads, Vote stop_vote, Vote run_vote, uint32_t frame_idx, - Status &status, bool continue_to_next_branch) { + bool stop_other_threads, Vote report_stop_vote, Vote report_run_vote, + uint32_t frame_idx, Status &status, bool continue_to_next_branch) { const bool calculate_return_value = false; // No need to calculate the return value here. ThreadPlanSP thread_plan_sp(new ThreadPlanStepOut( - *this, addr_context, first_insn, stop_other_threads, stop_vote, run_vote, - frame_idx, eLazyBoolNo, continue_to_next_branch, calculate_return_value)); + *this, addr_context, first_insn, stop_other_threads, report_stop_vote, + report_run_vote, frame_idx, eLazyBoolNo, continue_to_next_branch, + calculate_return_value)); ThreadPlanStepOut *new_plan = static_cast(thread_plan_sp.get()); 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 @@ -20,9 +20,9 @@ // ThreadPlan constructor ThreadPlan::ThreadPlan(ThreadPlanKind kind, const char *name, Thread &thread, - Vote stop_vote, Vote run_vote) + Vote report_stop_vote, Vote report_run_vote) : m_process(*thread.GetProcess().get()), m_tid(thread.GetID()), - m_stop_vote(stop_vote), m_run_vote(run_vote), + m_report_stop_vote(report_stop_vote), m_report_run_vote(report_run_vote), m_takes_iteration_count(false), m_could_not_resolve_hw_bp(false), m_thread(&thread), m_kind(kind), m_name(name), m_plan_complete_mutex(), m_cached_plan_explains_stop(eLazyBoolCalculate), m_plan_complete(false), @@ -78,7 +78,7 @@ Vote ThreadPlan::ShouldReportStop(Event *event_ptr) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP)); - if (m_stop_vote == eVoteNoOpinion) { + if (m_report_stop_vote == eVoteNoOpinion) { ThreadPlan *prev_plan = GetPreviousPlan(); if (prev_plan) { Vote prev_vote = prev_plan->ShouldReportStop(event_ptr); @@ -86,17 +86,17 @@ return prev_vote; } } - LLDB_LOG(log, "Returning vote: {0}", m_stop_vote); - return m_stop_vote; + LLDB_LOG(log, "Returning vote: {0}", m_report_stop_vote); + return m_report_stop_vote; } Vote ThreadPlan::ShouldReportRun(Event *event_ptr) { - if (m_run_vote == eVoteNoOpinion) { + if (m_report_run_vote == eVoteNoOpinion) { ThreadPlan *prev_plan = GetPreviousPlan(); if (prev_plan) return prev_plan->ShouldReportRun(event_ptr); } - return m_run_vote; + return m_report_run_vote; } void ThreadPlan::ClearThreadCache() { m_thread = nullptr; } 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 @@ -70,8 +70,8 @@ } bool ThreadPlanBase::ShouldStop(Event *event_ptr) { - m_stop_vote = eVoteYes; - m_run_vote = eVoteYes; + m_report_stop_vote = eVoteYes; + m_report_run_vote = eVoteYes; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP)); @@ -82,8 +82,8 @@ case eStopReasonInvalid: case eStopReasonNone: // This - m_run_vote = eVoteNoOpinion; - m_stop_vote = eVoteNo; + m_report_run_vote = eVoteNoOpinion; + m_report_stop_vote = eVoteNo; return false; case eStopReasonBreakpoint: @@ -106,11 +106,11 @@ // with "restarted" so the UI will know to wait and expect the consequent // "running". if (stop_info_sp->ShouldNotify(event_ptr)) { - m_stop_vote = eVoteYes; - m_run_vote = eVoteYes; + m_report_stop_vote = eVoteYes; + m_report_run_vote = eVoteYes; } else { - m_stop_vote = eVoteNo; - m_run_vote = eVoteNo; + m_report_stop_vote = eVoteNo; + m_report_run_vote = eVoteNo; } return false; @@ -156,9 +156,9 @@ // We're not going to stop, but while we are here, let's figure out // whether to report this. if (stop_info_sp->ShouldNotify(event_ptr)) - m_stop_vote = eVoteYes; + m_report_stop_vote = eVoteYes; else - m_stop_vote = eVoteNo; + m_report_stop_vote = eVoteNo; } return false; @@ -167,8 +167,8 @@ } } else { - m_run_vote = eVoteNoOpinion; - m_stop_vote = eVoteNo; + m_report_run_vote = eVoteNoOpinion; + m_report_stop_vote = eVoteNo; } // If there's no explicit reason to stop, then we will continue. @@ -185,8 +185,8 @@ bool current_plan) { // Reset these to the default values so we don't set them wrong, then not get // asked for a while, then return the wrong answer. - m_run_vote = eVoteNoOpinion; - m_stop_vote = eVoteNo; + m_report_run_vote = eVoteNoOpinion; + m_report_stop_vote = eVoteNo; return true; } 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 @@ -23,10 +23,11 @@ ThreadPlanStepInstruction::ThreadPlanStepInstruction(Thread &thread, bool step_over, bool stop_other_threads, - Vote stop_vote, - Vote run_vote) + Vote report_stop_vote, + Vote report_run_vote) : ThreadPlan(ThreadPlan::eKindStepInstruction, - "Step over single instruction", thread, stop_vote, run_vote), + "Step over single instruction", thread, report_stop_vote, + report_run_vote), m_instruction_addr(0), m_stop_other_threads(stop_other_threads), m_step_over(step_over) { m_takes_iteration_count = true; 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 @@ -33,11 +33,11 @@ // ThreadPlanStepOut: Step out of the current frame ThreadPlanStepOut::ThreadPlanStepOut( Thread &thread, SymbolContext *context, bool first_insn, bool stop_others, - Vote stop_vote, Vote run_vote, uint32_t frame_idx, + Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, LazyBool step_out_avoids_code_without_debug_info, bool continue_to_next_branch, bool gather_return_value) - : ThreadPlan(ThreadPlan::eKindStepOut, "Step out", thread, stop_vote, - run_vote), + : ThreadPlan(ThreadPlan::eKindStepOut, "Step out", thread, report_stop_vote, + report_run_vote), ThreadPlanShouldStopHere(this), m_step_from_insn(LLDB_INVALID_ADDRESS), m_return_bp_id(LLDB_INVALID_BREAK_ID), m_return_addr(LLDB_INVALID_ADDRESS), m_stop_others(stop_others),