ThreadPlanCallFunction.h revision 745ac7a5826fe7c392007941a4046bfb1a8dff81
1//===-- ThreadPlanCallFunction.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_ThreadPlanCallFunction_h_ 11#define liblldb_ThreadPlanCallFunction_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/Thread.h" 19#include "lldb/Target/ThreadPlan.h" 20 21namespace lldb_private { 22 23class ThreadPlanCallFunction : public ThreadPlan 24{ 25public: 26 ThreadPlanCallFunction (Thread &thread, 27 Address &function, 28 lldb::addr_t arg, 29 bool stop_other_threads, 30 bool discard_on_error = true, 31 lldb::addr_t *this_arg = 0); 32 33 ThreadPlanCallFunction (Thread &thread, 34 Address &function, 35 ValueList &args, 36 bool stop_other_threads, 37 bool discard_on_error = true); 38 39 virtual 40 ~ThreadPlanCallFunction (); 41 42 virtual void 43 GetDescription (Stream *s, lldb::DescriptionLevel level); 44 45 virtual bool 46 ValidatePlan (Stream *error); 47 48 virtual bool 49 PlanExplainsStop (); 50 51 virtual bool 52 ShouldStop (Event *event_ptr); 53 54 virtual bool 55 StopOthers (); 56 57 virtual void 58 SetStopOthers (bool new_value); 59 60 virtual lldb::StateType 61 GetPlanRunState (); 62 63 virtual void 64 DidPush (); 65 66 virtual bool 67 WillStop (); 68 69 virtual bool 70 MischiefManaged (); 71 72 virtual bool 73 IsMasterPlan() 74 { 75 return true; 76 } 77 78protected: 79private: 80 void 81 DoTakedown (); 82 83 void 84 SetBreakpoints (); 85 86 void 87 ClearBreakpoints (); 88 89 bool 90 BreakpointsExplainStop (); 91 92 bool m_use_abi; 93 bool m_valid; 94 bool m_stop_other_threads; 95 Address m_function_addr; 96 Address m_start_addr; 97 lldb::addr_t m_arg_addr; 98 ValueList *m_args; 99 Process &m_process; 100 Thread &m_thread; 101 Thread::RegisterCheckpoint m_register_backup; 102 lldb::ThreadPlanSP m_subplan_sp; 103 LanguageRuntime *m_cxx_language_runtime; 104 LanguageRuntime *m_objc_language_runtime; 105 106 DISALLOW_COPY_AND_ASSIGN (ThreadPlanCallFunction); 107}; 108 109} // namespace lldb_private 110 111#endif // liblldb_ThreadPlanCallFunction_h_ 112