LLDB  mainline
ThreadPlanRunToAddress.h
Go to the documentation of this file.
1 //===-- ThreadPlanRunToAddress.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_ThreadPlanRunToAddress_h_
10 #define liblldb_ThreadPlanRunToAddress_h_
11 
12 #include <vector>
13 
14 #include "lldb/Target/ThreadPlan.h"
15 #include "lldb/lldb-private.h"
16 
17 namespace lldb_private {
18 
20 public:
21  ThreadPlanRunToAddress(Thread &thread, Address &address, bool stop_others);
22 
24  bool stop_others);
25 
27  const std::vector<lldb::addr_t> &addresses,
28  bool stop_others);
29 
30  ~ThreadPlanRunToAddress() override;
31 
32  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
33 
34  bool ValidatePlan(Stream *error) override;
35 
36  bool ShouldStop(Event *event_ptr) override;
37 
38  bool StopOthers() override;
39 
40  void SetStopOthers(bool new_value) override;
41 
43 
44  bool WillStop() override;
45 
46  bool MischiefManaged() override;
47 
48 protected:
49  bool DoPlanExplainsStop(Event *event_ptr) override;
50 
51  void SetInitialBreakpoints();
52  bool AtOurAddress();
53 
54 private:
55  bool m_stop_others;
56  std::vector<lldb::addr_t>
57  m_addresses; // This is the address we are going to run to.
58  // TODO: Would it be useful to have multiple addresses?
59  std::vector<lldb::break_id_t> m_break_ids; // This is the breakpoint we are
60  // using to stop us at m_address.
61 
62  DISALLOW_COPY_AND_ASSIGN(ThreadPlanRunToAddress);
63 };
64 
65 } // namespace lldb_private
66 
67 #endif // liblldb_ThreadPlanRunToAddress_h_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
void SetStopOthers(bool new_value) override
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
bool DoPlanExplainsStop(Event *event_ptr) override
A section + offset based address class.
Definition: Address.h:80
bool ShouldStop(Event *event_ptr) override
uint64_t addr_t
Definition: lldb-types.h:83
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
ThreadPlanRunToAddress(Thread &thread, Address &address, bool stop_others)