1 //===-- SBBreakpointLocation.h ----------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLDB_API_SBBREAKPOINTLOCATION_H 10 #define LLDB_API_SBBREAKPOINTLOCATION_H 11 12 #include "lldb/API/SBBreakpoint.h" 13 #include "lldb/API/SBDefines.h" 14 15 namespace lldb_private { 16 namespace python { 17 class SWIGBridge; 18 } 19 namespace lua { 20 class SWIGBridge; 21 } 22 } // namespace lldb_private 23 24 namespace lldb { 25 26 class LLDB_API SBBreakpointLocation { 27 public: 28 SBBreakpointLocation(); 29 30 SBBreakpointLocation(const lldb::SBBreakpointLocation &rhs); 31 32 ~SBBreakpointLocation(); 33 34 const lldb::SBBreakpointLocation & 35 operator=(const lldb::SBBreakpointLocation &rhs); 36 37 break_id_t GetID(); 38 39 explicit operator bool() const; 40 41 bool IsValid() const; 42 43 lldb::SBAddress GetAddress(); 44 45 lldb::addr_t GetLoadAddress(); 46 47 void SetEnabled(bool enabled); 48 49 bool IsEnabled(); 50 51 uint32_t GetHitCount(); 52 53 uint32_t GetIgnoreCount(); 54 55 void SetIgnoreCount(uint32_t n); 56 57 void SetCondition(const char *condition); 58 59 const char *GetCondition(); 60 61 void SetAutoContinue(bool auto_continue); 62 63 bool GetAutoContinue(); 64 65 #ifndef SWIG 66 void SetCallback(SBBreakpointHitCallback callback, void *baton); 67 #endif 68 69 void SetScriptCallbackFunction(const char *callback_function_name); 70 71 SBError SetScriptCallbackFunction(const char *callback_function_name, 72 lldb::SBStructuredData &extra_args); 73 74 SBError SetScriptCallbackBody(const char *script_body_text); 75 76 void SetCommandLineCommands(lldb::SBStringList &commands); 77 78 bool GetCommandLineCommands(lldb::SBStringList &commands); 79 80 void SetThreadID(lldb::tid_t sb_thread_id); 81 82 lldb::tid_t GetThreadID(); 83 84 void SetThreadIndex(uint32_t index); 85 86 uint32_t GetThreadIndex() const; 87 88 void SetThreadName(const char *thread_name); 89 90 const char *GetThreadName() const; 91 92 void SetQueueName(const char *queue_name); 93 94 const char *GetQueueName() const; 95 96 bool IsResolved(); 97 98 bool GetDescription(lldb::SBStream &description, DescriptionLevel level); 99 100 SBBreakpoint GetBreakpoint(); 101 102 protected: 103 friend class lldb_private::python::SWIGBridge; 104 friend class lldb_private::lua::SWIGBridge; 105 SBBreakpointLocation(const lldb::BreakpointLocationSP &break_loc_sp); 106 107 private: 108 friend class SBBreakpoint; 109 friend class SBBreakpointCallbackBaton; 110 111 void SetLocation(const lldb::BreakpointLocationSP &break_loc_sp); 112 BreakpointLocationSP GetSP() const; 113 114 lldb::BreakpointLocationWP m_opaque_wp; 115 }; 116 117 } // namespace lldb 118 119 #endif // LLDB_API_SBBREAKPOINTLOCATION_H 120