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_
15 #include "lldb/Target/ThreadPlan.h"
16 #include "lldb/lldb-private.h"
18 namespace lldb_private {
20 class ThreadPlanRunToAddress : public ThreadPlan {
22 ThreadPlanRunToAddress(Thread &thread, Address &address, bool stop_others);
24 ThreadPlanRunToAddress(Thread &thread, lldb::addr_t address,
27 ThreadPlanRunToAddress(Thread &thread,
28 const std::vector<lldb::addr_t> &addresses,
31 ~ThreadPlanRunToAddress() override;
33 void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
35 bool ValidatePlan(Stream *error) override;
37 bool ShouldStop(Event *event_ptr) override;
39 bool StopOthers() override;
41 void SetStopOthers(bool new_value) override;
43 lldb::StateType GetPlanRunState() override;
45 bool WillStop() override;
47 bool MischiefManaged() override;
50 bool DoPlanExplainsStop(Event *event_ptr) override;
52 void SetInitialBreakpoints();
57 std::vector<lldb::addr_t>
58 m_addresses; // This is the address we are going to run to.
59 // TODO: Would it be useful to have multiple addresses?
60 std::vector<lldb::break_id_t> m_break_ids; // This is the breakpoint we are
61 // using to stop us at m_address.
63 DISALLOW_COPY_AND_ASSIGN(ThreadPlanRunToAddress);
66 } // namespace lldb_private
68 #endif // liblldb_ThreadPlanRunToAddress_h_