ThreadPlanRunToAddress.h revision 24943d2ee8bfaa7cf5893e4709143924157a5c1e
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// Other libraries and framework includes 16// Project includes 17#include "lldb/lldb-private.h" 18#include "lldb/Target/ThreadPlan.h" 19 20namespace lldb_private { 21 22class ThreadPlanRunToAddress : public ThreadPlan 23{ 24public: 25 ThreadPlanRunToAddress (Thread &thread, 26 Address &address, 27 bool stop_others); 28 29 ThreadPlanRunToAddress (Thread &thread, 30 lldb::addr_t address, 31 bool stop_others); 32 33 virtual 34 ~ThreadPlanRunToAddress (); 35 36 virtual void 37 GetDescription (Stream *s, lldb::DescriptionLevel level); 38 39 virtual bool 40 ValidatePlan (Stream *error); 41 42 virtual bool 43 PlanExplainsStop (); 44 45 virtual bool 46 ShouldStop (Event *event_ptr); 47 48 virtual bool 49 StopOthers (); 50 51 virtual void 52 SetStopOthers (bool new_value); 53 54 virtual lldb::StateType 55 RunState (); 56 57 virtual bool 58 WillStop (); 59 60 virtual bool 61 MischiefManaged (); 62 63protected: 64 void SetInitialBreakpoint(); 65 bool AtOurAddress(); 66private: 67 bool m_stop_others; 68 lldb::addr_t m_address; // This is the address we are going to run to. 69 // TODO: Would it be useful to have multiple addresses? 70 lldb::user_id_t m_break_id; // This is the breakpoint we are using to stop us at m_address. 71 72 DISALLOW_COPY_AND_ASSIGN (ThreadPlanRunToAddress); 73 74}; 75 76} // namespace lldb_private 77 78#endif // liblldb_ThreadPlanRunToAddress_h_ 79