]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanRunToAddress.h
MFV r330973: 9164 assert: newds == os->os_dsl_dataset
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Target / ThreadPlanRunToAddress.h
1 //===-- ThreadPlanRunToAddress.h --------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_ThreadPlanRunToAddress_h_
11 #define liblldb_ThreadPlanRunToAddress_h_
12
13 // C Includes
14 // C++ Includes
15 #include <vector>
16
17 // Other libraries and framework includes
18 // Project includes
19 #include "lldb/Target/ThreadPlan.h"
20 #include "lldb/lldb-private.h"
21
22 namespace lldb_private {
23
24 class ThreadPlanRunToAddress : public ThreadPlan {
25 public:
26   ThreadPlanRunToAddress(Thread &thread, Address &address, bool stop_others);
27
28   ThreadPlanRunToAddress(Thread &thread, lldb::addr_t address,
29                          bool stop_others);
30
31   ThreadPlanRunToAddress(Thread &thread,
32                          const std::vector<lldb::addr_t> &addresses,
33                          bool stop_others);
34
35   ~ThreadPlanRunToAddress() override;
36
37   void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
38
39   bool ValidatePlan(Stream *error) override;
40
41   bool ShouldStop(Event *event_ptr) override;
42
43   bool StopOthers() override;
44
45   void SetStopOthers(bool new_value) override;
46
47   lldb::StateType GetPlanRunState() override;
48
49   bool WillStop() override;
50
51   bool MischiefManaged() override;
52
53 protected:
54   bool DoPlanExplainsStop(Event *event_ptr) override;
55
56   void SetInitialBreakpoints();
57   bool AtOurAddress();
58
59 private:
60   bool m_stop_others;
61   std::vector<lldb::addr_t>
62       m_addresses; // This is the address we are going to run to.
63                    // TODO: Would it be useful to have multiple addresses?
64   std::vector<lldb::break_id_t> m_break_ids; // This is the breakpoint we are
65                                              // using to stop us at m_address.
66
67   DISALLOW_COPY_AND_ASSIGN(ThreadPlanRunToAddress);
68 };
69
70 } // namespace lldb_private
71
72 #endif // liblldb_ThreadPlanRunToAddress_h_