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