]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/bindings/interface/SBBreakpointLocation.i
Update to bmake-20200710
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / bindings / interface / SBBreakpointLocation.i
1 //===-- SWIG Interface for SBBreakpointLocation -----------------*- 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 namespace lldb {
10
11 %feature("docstring",
12 "Represents one unique instance (by address) of a logical breakpoint.
13
14 A breakpoint location is defined by the breakpoint that produces it,
15 and the address that resulted in this particular instantiation.
16 Each breakpoint location has its settable options.
17
18 SBBreakpoint contains SBBreakpointLocation(s). See docstring of SBBreakpoint
19 for retrieval of an SBBreakpointLocation from an SBBreakpoint."
20 ) SBBreakpointLocation;
21 class SBBreakpointLocation
22 {
23 public:
24
25     SBBreakpointLocation ();
26
27     SBBreakpointLocation (const lldb::SBBreakpointLocation &rhs);
28
29     ~SBBreakpointLocation ();
30
31     break_id_t
32     GetID ();
33
34     bool
35     IsValid() const;
36
37     explicit operator bool() const;
38
39     lldb::SBAddress
40     GetAddress();
41
42     lldb::addr_t
43     GetLoadAddress ();
44
45     void
46     SetEnabled(bool enabled);
47
48     bool
49     IsEnabled ();
50
51     uint32_t
52     GetHitCount ();
53
54     uint32_t
55     GetIgnoreCount ();
56
57     void
58     SetIgnoreCount (uint32_t n);
59
60     %feature("docstring", "
61     The breakpoint location stops only if the condition expression evaluates
62     to true.") SetCondition;
63     void
64     SetCondition (const char *condition);
65
66     %feature("docstring", "
67     Get the condition expression for the breakpoint location.") GetCondition;
68     const char *
69     GetCondition ();
70
71     bool GetAutoContinue();
72
73     void SetAutoContinue(bool auto_continue);
74
75     %feature("docstring", "
76     Set the callback to the given Python function name.
77     The function takes three arguments (frame, bp_loc, dict).") SetScriptCallbackFunction;
78     void
79     SetScriptCallbackFunction (const char *callback_function_name);
80
81     %feature("docstring", "
82     Set the name of the script function to be called when the breakpoint is hit.
83     To use this variant, the function should take (frame, bp_loc, extra_args, dict) and
84     when the breakpoint is hit the extra_args will be passed to the callback function.") SetScriptCallbackFunction;
85     SBError
86     SetScriptCallbackFunction (const char *callback_function_name,
87                                SBStructuredData &extra_args);
88
89     %feature("docstring", "
90     Provide the body for the script function to be called when the breakpoint location is hit.
91     The body will be wrapped in a function, which be passed two arguments:
92     'frame' - which holds the bottom-most SBFrame of the thread that hit the breakpoint
93     'bpno'  - which is the SBBreakpointLocation to which the callback was attached.
94
95     The error parameter is currently ignored, but will at some point hold the Python
96     compilation diagnostics.
97     Returns true if the body compiles successfully, false if not.") SetScriptCallbackBody;
98     SBError
99     SetScriptCallbackBody (const char *script_body_text);
100
101     void SetCommandLineCommands(SBStringList &commands);
102
103     bool GetCommandLineCommands(SBStringList &commands);
104
105     void
106     SetThreadID (lldb::tid_t sb_thread_id);
107
108     lldb::tid_t
109     GetThreadID ();
110
111     void
112     SetThreadIndex (uint32_t index);
113
114     uint32_t
115     GetThreadIndex() const;
116
117     void
118     SetThreadName (const char *thread_name);
119
120     const char *
121     GetThreadName () const;
122
123     void
124     SetQueueName (const char *queue_name);
125
126     const char *
127     GetQueueName () const;
128
129     bool
130     IsResolved ();
131
132     bool
133     GetDescription (lldb::SBStream &description, DescriptionLevel level);
134
135     SBBreakpoint
136     GetBreakpoint ();
137
138     STRING_EXTENSION_LEVEL(SBBreakpointLocation, lldb::eDescriptionLevelFull)
139 };
140
141 } // namespace lldb