• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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   void SetCallback(SBBreakpointHitCallback callback, void *baton);
85 
86   void SetScriptCallbackFunction(const char *callback_function_name);
87 
88   SBError SetScriptCallbackFunction(const char *callback_function_name,
89                                     SBStructuredData &extra_args);
90 
91   void SetCommandLineCommands(lldb::SBStringList &commands);
92 
93   bool GetCommandLineCommands(lldb::SBStringList &commands);
94 
95   SBError SetScriptCallbackBody(const char *script_body_text);
96 
97   const char *GetHelpString() const;
98   void SetHelpString(const char *help_string);
99 
100   bool GetAllowList() const;
101   void SetAllowList(bool value);
102 
103   bool GetAllowDelete();
104   void SetAllowDelete(bool value);
105 
106   bool GetAllowDisable();
107   void SetAllowDisable(bool value);
108 
109   bool GetDescription(lldb::SBStream &description);
110 
111 private:
112   friend class SBTarget;
113 
114   lldb_private::BreakpointName *GetBreakpointName() const;
115   void UpdateName(lldb_private::BreakpointName &bp_name);
116 
117   std::unique_ptr<SBBreakpointNameImpl> m_impl_up;
118 };
119 
120 } // namespace lldb
121 
122 #endif // LLDB_API_SBBREAKPOINTNAME_H
123