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;
50  until_collection m_until_points;
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 
63 };
64 
65 } // namespace lldb_private
66 
67 #endif // LLDB_TARGET_THREADPLANSTEPUNTIL_H
std::map< lldb::addr_t, lldb::break_id_t > until_collection
A class that represents a running process on the host machine.
bool DoWillResume(lldb::StateType resume_state, bool current_plan) override
int32_t break_id_t
Definition: lldb-types.h:88
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
ThreadPlanStepUntil(Thread &thread, lldb::addr_t *address_list, size_t num_addresses, bool stop_others, uint32_t frame_idx=0)
DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepUntil)
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
StateType
Process and Thread States.
uint64_t addr_t
Definition: lldb-types.h:83
bool ShouldStop(Event *event_ptr) override
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:1360
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
lldb::StateType GetPlanRunState() override
bool DoPlanExplainsStop(Event *event_ptr) override
An error handling class.
Definition: Status.h:44