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 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 
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;
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 
47  // These two are used only for the step over case.
51 
54  operator=(const ThreadPlanStepInstruction &) = delete;
55 };
56 
57 } // namespace lldb_private
58 
59 #endif // LLDB_TARGET_THREADPLANSTEPINSTRUCTION_H
lldb_private::ThreadPlanStepInstruction::m_parent_frame_id
StackID m_parent_frame_id
Definition: ThreadPlanStepInstruction.h:50
lldb_private::ThreadPlanStepInstruction::ThreadPlanStepInstruction
ThreadPlanStepInstruction(Thread &thread, bool step_over, bool stop_others, Vote report_stop_vote, Vote report_run_vote)
Definition: ThreadPlanStepInstruction.cpp:23
lldb_private::Event
Definition: Event.h:182
lldb_private::ThreadPlanStepInstruction::MischiefManaged
bool MischiefManaged() override
Definition: ThreadPlanStepInstruction.cpp:245
lldb_private::Stream
Definition: Stream.h:28
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::ThreadPlanStepInstruction
Definition: ThreadPlanStepInstruction.h:18
lldb_private::ThreadPlanStepInstruction::StopOthers
bool StopOthers() override
Definition: ThreadPlanStepInstruction.cpp:237
lldb_private::ThreadPlanStepInstruction::~ThreadPlanStepInstruction
~ThreadPlanStepInstruction() override
lldb_private::ThreadPlanStepInstruction::m_stack_id
StackID m_stack_id
Definition: ThreadPlanStepInstruction.h:49
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::ThreadPlan
Definition: ThreadPlan.h:287
lldb_private::ThreadPlanStepInstruction::GetPlanRunState
lldb::StateType GetPlanRunState() override
Definition: ThreadPlanStepInstruction.cpp:239
lldb_private::ThreadPlanStepInstruction::ValidatePlan
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
Definition: ThreadPlanStepInstruction.cpp:83
lldb_private::ThreadPlanStepInstruction::SetUpState
void SetUpState()
Definition: ThreadPlanStepInstruction.cpp:39
lldb_private::Thread
Definition: Thread.h:61
lldb_private::ThreadPlanStepInstruction::m_start_has_symbol
bool m_start_has_symbol
Definition: ThreadPlanStepInstruction.h:48
lldb_private::ThreadPlanStepInstruction::operator=
const ThreadPlanStepInstruction & operator=(const ThreadPlanStepInstruction &)=delete
lldb_private::ThreadPlanStepInstruction::m_instruction_addr
lldb::addr_t m_instruction_addr
Definition: ThreadPlanStepInstruction.h:44
lldb_private::ThreadPlanStepInstruction::IsPlanStale
bool IsPlanStale() override
Definition: ThreadPlanStepInstruction.cpp:98
Thread.h
lldb_private::ThreadPlanStepInstruction::WillStop
bool WillStop() override
Definition: ThreadPlanStepInstruction.cpp:243
lldb-private.h
ThreadPlan.h
lldb_private::ThreadPlanStepInstruction::ShouldStop
bool ShouldStop(Event *event_ptr) override
Definition: ThreadPlanStepInstruction.cpp:128
lldb_private::Status
Definition: Status.h:44
lldb_private::Vote
Vote
Definition: lldb-private-enumerations.h:59
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::ThreadPlanStepInstruction::GetDescription
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
Definition: ThreadPlanStepInstruction.cpp:53
lldb_private::StackID
Definition: StackID.h:17
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:73
lldb_private::Thread::QueueThreadPlanForStepSingleInstruction
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:1237
lldb_private::ThreadPlanStepInstruction::m_step_over
bool m_step_over
Definition: ThreadPlanStepInstruction.h:46
lldb_private::ThreadPlanStepInstruction::m_stop_other_threads
bool m_stop_other_threads
Definition: ThreadPlanStepInstruction.h:45
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition: lldb-enumerations.h:207
lldb_private::ThreadPlanStepInstruction::DoPlanExplainsStop
bool DoPlanExplainsStop(Event *event_ptr) override
Definition: ThreadPlanStepInstruction.cpp:89