1 | //===-- ThreadPlanStepInstruction.h -----------------------------*- C++ -*-===// |
2 | // |
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 |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef LLDB_TARGET_THREADPLANSTEPINSTRUCTION_H |
10 | #define LLDB_TARGET_THREADPLANSTEPINSTRUCTION_H |
11 | |
12 | #include "lldb/Target/Thread.h" |
13 | #include "lldb/Target/ThreadPlan.h" |
14 | #include "lldb/lldb-private.h" |
15 | |
16 | namespace lldb_private { |
17 | |
18 | class ThreadPlanStepInstruction : public ThreadPlan { |
19 | public: |
20 | ThreadPlanStepInstruction(Thread &thread, bool step_over, bool stop_others, |
21 | Vote report_stop_vote, Vote report_run_vote); |
22 | |
23 | ~ThreadPlanStepInstruction() override; |
24 | |
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; |
33 | |
34 | protected: |
35 | bool DoPlanExplainsStop(Event *event_ptr) override; |
36 | |
37 | void SetUpState(); |
38 | |
39 | private: |
40 | friend lldb::ThreadPlanSP Thread::QueueThreadPlanForStepSingleInstruction( |
41 | bool step_over, bool abort_other_plans, bool stop_other_threads, |
42 | Status &status); |
43 | |
44 | lldb::addr_t m_instruction_addr; |
45 | bool m_stop_other_threads; |
46 | bool m_step_over; |
47 | // These two are used only for the step over case. |
48 | bool m_start_has_symbol; |
49 | StackID m_stack_id; |
50 | StackID m_parent_frame_id; |
51 | |
52 | ThreadPlanStepInstruction(const ThreadPlanStepInstruction &) = delete; |
53 | const ThreadPlanStepInstruction & |
54 | operator=(const ThreadPlanStepInstruction &) = delete; |
55 | }; |
56 | |
57 | } // namespace lldb_private |
58 | |
59 | #endif // LLDB_TARGET_THREADPLANSTEPINSTRUCTION_H |
60 | |