1 //===-- ThreadPlanStepInstruction.h -----------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_ThreadPlanStepInstruction_h_
10 #define liblldb_ThreadPlanStepInstruction_h_
12 #include "lldb/Target/Thread.h"
13 #include "lldb/Target/ThreadPlan.h"
14 #include "lldb/lldb-private.h"
16 namespace lldb_private {
18 class ThreadPlanStepInstruction : public ThreadPlan {
20 ThreadPlanStepInstruction(Thread &thread, bool step_over, bool stop_others,
21 Vote stop_vote, Vote run_vote);
23 ~ThreadPlanStepInstruction() override;
25 void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
26 bool ValidatePlan(Stream *error) override;
27 bool ShouldStop(Event *event_ptr) override;
28 bool StopOthers() override;
29 lldb::StateType GetPlanRunState() override;
30 bool WillStop() override;
31 bool MischiefManaged() override;
32 bool IsPlanStale() override;
35 bool DoPlanExplainsStop(Event *event_ptr) override;
40 friend lldb::ThreadPlanSP Thread::QueueThreadPlanForStepSingleInstruction(
41 bool step_over, bool abort_other_plans, bool stop_other_threads,
44 lldb::addr_t m_instruction_addr;
45 bool m_stop_other_threads;
47 // These two are used only for the step over case.
48 bool m_start_has_symbol;
50 StackID m_parent_frame_id;
52 DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepInstruction);
55 } // namespace lldb_private
57 #endif // liblldb_ThreadPlanStepInstruction_h_