1 //===-- ThreadPlanRunToAddress.h --------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_ThreadPlanRunToAddress_h_
11 #define liblldb_ThreadPlanRunToAddress_h_
17 // Other libraries and framework includes
19 #include "lldb/Target/ThreadPlan.h"
20 #include "lldb/lldb-private.h"
22 namespace lldb_private {
24 class ThreadPlanRunToAddress : public ThreadPlan {
26 ThreadPlanRunToAddress(Thread &thread, Address &address, bool stop_others);
28 ThreadPlanRunToAddress(Thread &thread, lldb::addr_t address,
31 ThreadPlanRunToAddress(Thread &thread,
32 const std::vector<lldb::addr_t> &addresses,
35 ~ThreadPlanRunToAddress() override;
37 void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
39 bool ValidatePlan(Stream *error) override;
41 bool ShouldStop(Event *event_ptr) override;
43 bool StopOthers() override;
45 void SetStopOthers(bool new_value) override;
47 lldb::StateType GetPlanRunState() override;
49 bool WillStop() override;
51 bool MischiefManaged() override;
54 bool DoPlanExplainsStop(Event *event_ptr) override;
56 void SetInitialBreakpoints();
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.
67 DISALLOW_COPY_AND_ASSIGN(ThreadPlanRunToAddress);
70 } // namespace lldb_private
72 #endif // liblldb_ThreadPlanRunToAddress_h_