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