1 //===-- SBBreakpointName.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_SBBREAKPOINTNAME_H 10 #define LLDB_API_SBBREAKPOINTNAME_H 11 12 #include "lldb/API/SBDefines.h" 13 14 class SBBreakpointNameImpl; 15 16 namespace lldb { 17 18 class LLDB_API SBBreakpointName { 19 public: 20 // typedef bool (*BreakpointHitCallback)(void *baton, SBProcess &process, 21 // SBThread &thread, 22 // lldb::SBBreakpointLocation &location); 23 24 SBBreakpointName(); 25 26 SBBreakpointName(SBTarget &target, const char *name); 27 28 SBBreakpointName(SBBreakpoint &bkpt, const char *name); 29 30 SBBreakpointName(const lldb::SBBreakpointName &rhs); 31 32 ~SBBreakpointName(); 33 34 const lldb::SBBreakpointName &operator=(const lldb::SBBreakpointName &rhs); 35 36 // Tests to see if the opaque breakpoint object in this object matches the 37 // opaque breakpoint object in "rhs". 38 bool operator==(const lldb::SBBreakpointName &rhs); 39 40 bool operator!=(const lldb::SBBreakpointName &rhs); 41 42 explicit operator bool() const; 43 44 bool IsValid() const; 45 46 const char *GetName() const; 47 48 void SetEnabled(bool enable); 49 50 bool IsEnabled(); 51 52 void SetOneShot(bool one_shot); 53 54 bool IsOneShot() const; 55 56 void SetIgnoreCount(uint32_t count); 57 58 uint32_t GetIgnoreCount() const; 59 60 void SetCondition(const char *condition); 61 62 const char *GetCondition(); 63 64 void SetAutoContinue(bool auto_continue); 65 66 bool GetAutoContinue(); 67 68 void SetThreadID(lldb::tid_t sb_thread_id); 69 70 lldb::tid_t GetThreadID(); 71 72 void SetThreadIndex(uint32_t index); 73 74 uint32_t GetThreadIndex() const; 75 76 void SetThreadName(const char *thread_name); 77 78 const char *GetThreadName() const; 79 80 void SetQueueName(const char *queue_name); 81 82 const char *GetQueueName() const; 83 84 #ifndef SWIG 85 void SetCallback(SBBreakpointHitCallback callback, void *baton); 86 #endif 87 88 void SetScriptCallbackFunction(const char *callback_function_name); 89 90 SBError SetScriptCallbackFunction(const char *callback_function_name, 91 SBStructuredData &extra_args); 92 93 void SetCommandLineCommands(lldb::SBStringList &commands); 94 95 bool GetCommandLineCommands(lldb::SBStringList &commands); 96 97 SBError SetScriptCallbackBody(const char *script_body_text); 98 99 const char *GetHelpString() const; 100 void SetHelpString(const char *help_string); 101 102 bool GetAllowList() const; 103 void SetAllowList(bool value); 104 105 bool GetAllowDelete(); 106 void SetAllowDelete(bool value); 107 108 bool GetAllowDisable(); 109 void SetAllowDisable(bool value); 110 111 bool GetDescription(lldb::SBStream &description); 112 113 private: 114 friend class SBTarget; 115 116 lldb_private::BreakpointName *GetBreakpointName() const; 117 void UpdateName(lldb_private::BreakpointName &bp_name); 118 119 std::unique_ptr<SBBreakpointNameImpl> m_impl_up; 120 }; 121 122 } // namespace lldb 123 124 #endif // LLDB_API_SBBREAKPOINTNAME_H 125