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 { 16 17 class LLDB_API SBBreakpointLocation { 18 public: 19 SBBreakpointLocation(); 20 21 SBBreakpointLocation(const lldb::SBBreakpointLocation &rhs); 22 23 ~SBBreakpointLocation(); 24 25 const lldb::SBBreakpointLocation & 26 operator=(const lldb::SBBreakpointLocation &rhs); 27 28 break_id_t GetID(); 29 30 explicit operator bool() const; 31 32 bool IsValid() const; 33 34 lldb::SBAddress GetAddress(); 35 36 lldb::addr_t GetLoadAddress(); 37 38 void SetEnabled(bool enabled); 39 40 bool IsEnabled(); 41 42 uint32_t GetHitCount(); 43 44 uint32_t GetIgnoreCount(); 45 46 void SetIgnoreCount(uint32_t n); 47 48 void SetCondition(const char *condition); 49 50 const char *GetCondition(); 51 52 void SetAutoContinue(bool auto_continue); 53 54 bool GetAutoContinue(); 55 56 void SetScriptCallbackFunction(const char *callback_function_name); 57 58 SBError SetScriptCallbackFunction(const char *callback_function_name, 59 lldb::SBStructuredData &extra_args); 60 61 SBError SetScriptCallbackBody(const char *script_body_text); 62 63 void SetCommandLineCommands(lldb::SBStringList &commands); 64 65 bool GetCommandLineCommands(lldb::SBStringList &commands); 66 67 void SetThreadID(lldb::tid_t sb_thread_id); 68 69 lldb::tid_t GetThreadID(); 70 71 void SetThreadIndex(uint32_t index); 72 73 uint32_t GetThreadIndex() const; 74 75 void SetThreadName(const char *thread_name); 76 77 const char *GetThreadName() const; 78 79 void SetQueueName(const char *queue_name); 80 81 const char *GetQueueName() const; 82 83 bool IsResolved(); 84 85 bool GetDescription(lldb::SBStream &description, DescriptionLevel level); 86 87 SBBreakpoint GetBreakpoint(); 88 89 SBBreakpointLocation(const lldb::BreakpointLocationSP &break_loc_sp); 90 91 private: 92 friend class SBBreakpoint; 93 friend class SBBreakpointCallbackBaton; 94 95 void SetLocation(const lldb::BreakpointLocationSP &break_loc_sp); 96 BreakpointLocationSP GetSP() const; 97 98 lldb::BreakpointLocationWP m_opaque_wp; 99 }; 100 101 } // namespace lldb 102 103 #endif // LLDB_API_SBBREAKPOINTLOCATION_H 104