xref: /openbsd-src/gnu/llvm/lldb/include/lldb/API/SBBreakpointLocation.h (revision f6aab3d83b51b91c24247ad2c2573574de475a82)
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 SetCallback(SBBreakpointHitCallback callback, void *baton);
57 
58   void SetScriptCallbackFunction(const char *callback_function_name);
59 
60   SBError SetScriptCallbackFunction(const char *callback_function_name,
61                                     lldb::SBStructuredData &extra_args);
62 
63   SBError SetScriptCallbackBody(const char *script_body_text);
64 
65   void SetCommandLineCommands(lldb::SBStringList &commands);
66 
67   bool GetCommandLineCommands(lldb::SBStringList &commands);
68 
69   void SetThreadID(lldb::tid_t sb_thread_id);
70 
71   lldb::tid_t GetThreadID();
72 
73   void SetThreadIndex(uint32_t index);
74 
75   uint32_t GetThreadIndex() const;
76 
77   void SetThreadName(const char *thread_name);
78 
79   const char *GetThreadName() const;
80 
81   void SetQueueName(const char *queue_name);
82 
83   const char *GetQueueName() const;
84 
85   bool IsResolved();
86 
87   bool GetDescription(lldb::SBStream &description, DescriptionLevel level);
88 
89   SBBreakpoint GetBreakpoint();
90 
91   SBBreakpointLocation(const lldb::BreakpointLocationSP &break_loc_sp);
92 
93 private:
94   friend class SBBreakpoint;
95   friend class SBBreakpointCallbackBaton;
96 
97   void SetLocation(const lldb::BreakpointLocationSP &break_loc_sp);
98   BreakpointLocationSP GetSP() const;
99 
100   lldb::BreakpointLocationWP m_opaque_wp;
101 };
102 
103 } // namespace lldb
104 
105 #endif // LLDB_API_SBBREAKPOINTLOCATION_H
106