LLDB  mainline
ThreadPlanStepUntil.h
Go to the documentation of this file.
1 //===-- ThreadPlanStepUntil.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_THREADPLANSTEPUNTIL_H
10 #define LLDB_TARGET_THREADPLANSTEPUNTIL_H
11 
12 #include "lldb/Target/Thread.h"
13 #include "lldb/Target/ThreadPlan.h"
14 
15 namespace lldb_private {
16 
18 public:
19  ~ThreadPlanStepUntil() override;
20 
21  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
22  bool ValidatePlan(Stream *error) override;
23  bool ShouldStop(Event *event_ptr) override;
24  bool StopOthers() override;
26  bool WillStop() override;
27  bool MischiefManaged() override;
28 
29 protected:
30  bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
31  bool DoPlanExplainsStop(Event *event_ptr) override;
32 
33  ThreadPlanStepUntil(Thread &thread, lldb::addr_t *address_list,
34  size_t num_addresses, bool stop_others,
35  uint32_t frame_idx = 0);
36 
37  void AnalyzeStop();
38 
39 private:
48 
49  typedef std::map<lldb::addr_t, lldb::break_id_t> until_collection;
52 
53  void Clear();
54 
55  friend lldb::ThreadPlanSP Thread::QueueThreadPlanForStepUntil(
56  bool abort_other_plans, lldb::addr_t *address_list, size_t num_addresses,
57  bool stop_others, uint32_t frame_idx, Status &status);
58 
59  // Need an appropriate marker for the current stack so we can tell step out
60  // from step in.
61 
62  ThreadPlanStepUntil(const ThreadPlanStepUntil &) = delete;
63  const ThreadPlanStepUntil &operator=(const ThreadPlanStepUntil &) = delete;
64 };
65 
66 } // namespace lldb_private
67 
68 #endif // LLDB_TARGET_THREADPLANSTEPUNTIL_H
lldb_private::ThreadPlanStepUntil::ValidatePlan
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
Definition: ThreadPlanStepUntil.cpp:124
lldb_private::Event
Definition: Event.h:182
lldb_private::ThreadPlanStepUntil::DoPlanExplainsStop
bool DoPlanExplainsStop(Event *event_ptr) override
Definition: ThreadPlanStepUntil.cpp:253
lldb_private::ThreadPlanStepUntil::GetPlanRunState
lldb::StateType GetPlanRunState() override
Definition: ThreadPlanStepUntil.cpp:275
lldb_private::ThreadPlanStepUntil::m_should_stop
bool m_should_stop
Definition: ThreadPlanStepUntil.h:45
lldb_private::ThreadPlanStepUntil::GetDescription
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
Definition: ThreadPlanStepUntil.cpp:97
lldb_private::ThreadPlanStepUntil::m_stepped_out
bool m_stepped_out
Definition: ThreadPlanStepUntil.h:44
lldb_private::ThreadPlanStepUntil::m_stack_id
StackID m_stack_id
Definition: ThreadPlanStepUntil.h:40
lldb_private::Stream
Definition: Stream.h:28
lldb_private::ThreadPlanStepUntil::m_until_points
until_collection m_until_points
Definition: ThreadPlanStepUntil.h:50
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::ThreadPlanStepUntil::m_stop_others
bool m_stop_others
Definition: ThreadPlanStepUntil.h:51
lldb_private::ThreadPlanStepUntil::m_return_bp_id
lldb::break_id_t m_return_bp_id
Definition: ThreadPlanStepUntil.h:42
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::ThreadPlan
Definition: ThreadPlan.h:287
lldb_private::ThreadPlanStepUntil::until_collection
std::map< lldb::addr_t, lldb::break_id_t > until_collection
Definition: ThreadPlanStepUntil.h:49
lldb_private::Thread
Definition: Thread.h:61
lldb_private::ThreadPlanStepUntil::Clear
void Clear()
Definition: ThreadPlanStepUntil.cpp:82
lldb_private::ThreadPlanStepUntil::m_step_from_insn
lldb::addr_t m_step_from_insn
Definition: ThreadPlanStepUntil.h:41
lldb_private::ThreadPlanStepUntil::m_explains_stop
bool m_explains_stop
Definition: ThreadPlanStepUntil.h:47
lldb::break_id_t
int32_t break_id_t
Definition: lldb-types.h:88
lldb_private::ThreadPlanStepUntil
Definition: ThreadPlanStepUntil.h:17
lldb_private::ThreadPlanStepUntil::m_return_addr
lldb::addr_t m_return_addr
Definition: ThreadPlanStepUntil.h:43
lldb_private::ThreadPlanStepUntil::StopOthers
bool StopOthers() override
Definition: ThreadPlanStepUntil.cpp:273
lldb_private::ThreadPlanStepUntil::AnalyzeStop
void AnalyzeStop()
Definition: ThreadPlanStepUntil.cpp:144
Thread.h
lldb_private::ThreadPlanStepUntil::DoWillResume
bool DoWillResume(lldb::StateType resume_state, bool current_plan) override
Definition: ThreadPlanStepUntil.cpp:277
lldb_private::ThreadPlanStepUntil::ThreadPlanStepUntil
ThreadPlanStepUntil(Thread &thread, lldb::addr_t *address_list, size_t num_addresses, bool stop_others, uint32_t frame_idx=0)
Definition: ThreadPlanStepUntil.cpp:26
ThreadPlan.h
lldb_private::Status
Definition: Status.h:44
uint32_t
lldb_private::ThreadPlanStepUntil::WillStop
bool WillStop() override
Definition: ThreadPlanStepUntil.cpp:299
lldb_private::Thread::QueueThreadPlanForStepUntil
virtual lldb::ThreadPlanSP QueueThreadPlanForStepUntil(bool abort_other_plans, lldb::addr_t *address_list, size_t num_addresses, bool stop_others, uint32_t frame_idx, Status &status)
Definition: Thread.cpp:1359
lldb_private::ThreadPlanStepUntil::MischiefManaged
bool MischiefManaged() override
Definition: ThreadPlanStepUntil.cpp:314
lldb_private::ThreadPlanStepUntil::ShouldStop
bool ShouldStop(Event *event_ptr) override
Definition: ThreadPlanStepUntil.cpp:260
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::ThreadPlanStepUntil::~ThreadPlanStepUntil
~ThreadPlanStepUntil() override
Definition: ThreadPlanStepUntil.cpp:80
lldb_private::StackID
Definition: StackID.h:17
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:73
lldb_private::ThreadPlanStepUntil::operator=
const ThreadPlanStepUntil & operator=(const ThreadPlanStepUntil &)=delete
lldb_private::ThreadPlanStepUntil::m_ran_analyze
bool m_ran_analyze
Definition: ThreadPlanStepUntil.h:46
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition: lldb-enumerations.h:207