LLDB  mainline
ThreadPlanStepInstruction.h
Go to the documentation of this file.
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 liblldb_ThreadPlanStepInstruction_h_
10 #define liblldb_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 
19 public:
20  ThreadPlanStepInstruction(Thread &thread, bool step_over, bool stop_others,
21  Vote stop_vote, Vote 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;
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  DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepInstruction);
53 };
54 
55 } // namespace lldb_private
56 
57 #endif // liblldb_ThreadPlanStepInstruction_h_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
ThreadPlanStepInstruction(Thread &thread, bool step_over, bool stop_others, Vote stop_vote, Vote run_vote)
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
bool DoPlanExplainsStop(Event *event_ptr) override
virtual lldb::ThreadPlanSP QueueThreadPlanForStepSingleInstruction(bool step_over, bool abort_other_plans, bool stop_other_threads, Status &status)
Queues the plan used to step one instruction from the current PC of thread.
Definition: Thread.cpp:1370
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
uint64_t addr_t
Definition: lldb-types.h:83
An error handling class.
Definition: Status.h:44