You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of SWIG 4.0, __swig_getmethods__ and __swig_setmethods__ are no
longer defined. It appears that there's no need to mess with these
internals, we can simplify define the corresponding properties inline.
Originally I wanted to use the swig extension %attribute and
%attributeref to define properties. However, I couldn't find a way to
add documentation to these attributes. Since we already had the
properties defined inline, we might as well keep them.
Differential revision: https://reviews.llvm.org/D63530
llvm-svn: 364974
Copy file name to clipboardExpand all lines: lldb/scripts/interface/SBAddress.i
+10-31
Original file line number
Diff line number
Diff line change
@@ -162,37 +162,16 @@ public:
162
162
'''Convert the address to an hex string'''
163
163
return'0x%x' % int(self)
164
164
165
-
__swig_getmethods__["module"] = GetModule
166
-
if _newclass: module = property(GetModule, None, doc='''A read only property that returns an lldb object that represents the module (lldb.SBModule) that this address resides within.''')
if _newclass: compile_unit = property(GetCompileUnit, None, doc='''A read only property that returns an lldb object that represents the compile unit (lldb.SBCompileUnit) that this address resides within.''')
170
-
171
-
__swig_getmethods__["line_entry"] = GetLineEntry
172
-
if _newclass: line_entry = property(GetLineEntry, None, doc='''A read only property that returns an lldb object that represents the line entry (lldb.SBLineEntry) that this address resides within.''')
173
-
174
-
__swig_getmethods__["function"] = GetFunction
175
-
if _newclass: function = property(GetFunction, None, doc='''A read only property that returns an lldb object that represents the function (lldb.SBFunction) that this address resides within.''')
176
-
177
-
__swig_getmethods__["block"] = GetBlock
178
-
if _newclass: block = property(GetBlock, None, doc='''A read only property that returns an lldb object that represents the block (lldb.SBBlock) that this address resides within.''')
179
-
180
-
__swig_getmethods__["symbol"] = GetSymbol
181
-
if _newclass: symbol = property(GetSymbol, None, doc='''A read only property that returns an lldb object that represents the symbol (lldb.SBSymbol) that this address resides within.''')
182
-
183
-
__swig_getmethods__["offset"] = GetOffset
184
-
if _newclass: offset = property(GetOffset, None, doc='''A read only property that returns the section offset in bytes as an integer.''')
185
-
186
-
__swig_getmethods__["section"] = GetSection
187
-
if _newclass: section = property(GetSection, None, doc='''A read only property that returns an lldb object that represents the section (lldb.SBSection) that this address resides within.''')
188
-
189
-
__swig_getmethods__["file_addr"] = GetFileAddress
190
-
if _newclass: file_addr = property(GetFileAddress, None, doc='''A read only property that returns file address for the section as an integer. This is the address that represents the address as it is found in the object file that defines it.''')
if _newclass: load_addr = property(__get_load_addr_property__, __set_load_addr_property__, doc='''A read/write property that gets/sets the SBAddress using load address. The setter resolves SBAddress using the SBTarget from lldb.target so this property can ONLY be used in the interactive script interpreter (i.e. under the lldb script command) and not in Python based commands, or breakpoint commands.''')
195
-
165
+
module = property(GetModule, None, doc='''A read only property that returns an lldb object that represents the module (lldb.SBModule) that this address resides within.''')
166
+
compile_unit = property(GetCompileUnit, None, doc='''A read only property that returns an lldb object that represents the compile unit (lldb.SBCompileUnit) that this address resides within.''')
167
+
line_entry = property(GetLineEntry, None, doc='''A read only property that returns an lldb object that represents the line entry (lldb.SBLineEntry) that this address resides within.''')
168
+
function = property(GetFunction, None, doc='''A read only property that returns an lldb object that represents the function (lldb.SBFunction) that this address resides within.''')
169
+
block = property(GetBlock, None, doc='''A read only property that returns an lldb object that represents the block (lldb.SBBlock) that this address resides within.''')
170
+
symbol = property(GetSymbol, None, doc='''A read only property that returns an lldb object that represents the symbol (lldb.SBSymbol) that this address resides within.''')
171
+
offset = property(GetOffset, None, doc='''A read only property that returns the section offset in bytes as an integer.''')
172
+
section = property(GetSection, None, doc='''A read only property that returns an lldb object that represents the section (lldb.SBSection) that this address resides within.''')
173
+
file_addr = property(GetFileAddress, None, doc='''A read only property that returns file address for the section as an integer. This is the address that represents the address as it is found in the object file that defines it.''')
174
+
load_addr = property(__get_load_addr_property__, __set_load_addr_property__, doc='''A read/write property that gets/sets the SBAddress using load address. The setter resolves SBAddress using the SBTarget from lldb.target so this property can ONLY be used in the interactive script interpreter (i.e. under the lldb script command) and not in Python based commands, or breakpoint commands.''')
if _newclass: first_child = property(GetFirstChild, None, doc='''A read only property that returns the same result as GetFirstChild().''')
151
-
152
-
__swig_getmethods__["call_site"] = get_call_site
153
-
if _newclass: call_site = property(get_call_site, None, doc='''A read only property that returns a lldb.declaration object that contains the inlined call site file, line and column.''')
154
-
155
-
__swig_getmethods__["sibling"] = GetSibling
156
-
if _newclass: sibling = property(GetSibling, None, doc='''A read only property that returns the same result as GetSibling().''')
157
-
158
-
__swig_getmethods__["name"] = GetInlinedName
159
-
if _newclass: name = property(GetInlinedName, None, doc='''A read only property that returns the same result as GetInlinedName().''')
if _newclass: inlined_block = property(GetContainingInlinedBlock, None, doc='''A read only property that returns the same result as GetContainingInlinedBlock().''')
if _newclass: range = property(get_ranges_access_object, None, doc='''A read only property that allows item access to the address ranges for a block by integer (range = block.range[0]) and by lldb.SBAdddress (find the range that contains the specified lldb.SBAddress like "pc_range = lldb.frame.block.range[frame.addr]").''')
166
-
167
-
__swig_getmethods__["ranges"] = get_ranges_array
168
-
if _newclass: ranges = property(get_ranges_array, None, doc='''A read only property that returns a list() object that contains all of the address ranges for the block.''')
169
-
170
-
__swig_getmethods__["num_ranges"] = GetNumRanges
171
-
if _newclass: num_ranges = property(GetNumRanges, None, doc='''A read only property that returns the same result as GetNumRanges().''')
146
+
parent = property(GetParent, None, doc='''A read only property that returns the same result as GetParent().''')
147
+
first_child = property(GetFirstChild, None, doc='''A read only property that returns the same result as GetFirstChild().''')
148
+
call_site = property(get_call_site, None, doc='''A read only property that returns a lldb.declaration object that contains the inlined call site file, line and column.''')
149
+
sibling = property(GetSibling, None, doc='''A read only property that returns the same result as GetSibling().''')
150
+
name = property(GetInlinedName, None, doc='''A read only property that returns the same result as GetInlinedName().''')
151
+
inlined_block = property(GetContainingInlinedBlock, None, doc='''A read only property that returns the same result as GetContainingInlinedBlock().''')
152
+
range = property(get_ranges_access_object, None, doc='''A read only property that allows item access to the address ranges for a block by integer (range = block.range[0]) and by lldb.SBAdddress (find the range that contains the specified lldb.SBAddress like "pc_range = lldb.frame.block.range[frame.addr]").''')
153
+
ranges = property(get_ranges_array, None, doc='''A read only property that returns a list() object that contains all of the address ranges for the block.''')
154
+
num_ranges = property(GetNumRanges, None, doc='''A read only property that returns the same result as GetNumRanges().''')
if _newclass: locations = property(get_breakpoint_location_list, None, doc='''A read only property that returns a list() of lldb.SBBreakpointLocation objects for this breakpoint.''')
if _newclass: location = property(get_locations_access_object, None, doc='''A read only property that returns an object that can access locations by index (not location ID) (location = bkpt.location[12]).''')
294
-
295
-
__swig_getmethods__["id"] = GetID
296
-
if _newclass: id = property(GetID, None, doc='''A read only property that returns the ID of this breakpoint.''')
297
-
298
-
__swig_getmethods__["enabled"] = IsEnabled
299
-
__swig_setmethods__["enabled"] = SetEnabled
300
-
if _newclass: enabled = property(IsEnabled, SetEnabled, doc='''A read/write property that configures whether this breakpoint is enabled or not.''')
301
-
302
-
__swig_getmethods__["one_shot"] = IsOneShot
303
-
__swig_setmethods__["one_shot"] = SetOneShot
304
-
if _newclass: one_shot = property(IsOneShot, SetOneShot, doc='''A read/write property that configures whether this breakpoint is one-shot (deleted when hit) or not.''')
if _newclass: num_locations = property(GetNumLocations, None, doc='''A read only property that returns the count of locations of this breakpoint.''')
308
-
289
+
locations = property(get_breakpoint_location_list, None, doc='''A read only property that returns a list() of lldb.SBBreakpointLocation objects for this breakpoint.''')
290
+
location = property(get_locations_access_object, None, doc='''A read only property that returns an object that can access locations by index (not location ID) (location = bkpt.location[12]).''')
291
+
id = property(GetID, None, doc='''A read only property that returns the ID of this breakpoint.''')
292
+
enabled = property(IsEnabled, SetEnabled, doc='''A read/write property that configures whether this breakpoint is enabled or not.''')
293
+
one_shot = property(IsOneShot, SetOneShot, doc='''A read/write property that configures whether this breakpoint is one-shot (deleted when hit) or not.''')
294
+
num_locations = property(GetNumLocations, None, doc='''A read only property that returns the count of locations of this breakpoint.''')
Copy file name to clipboardExpand all lines: lldb/scripts/interface/SBCompileUnit.i
+2-5
Original file line number
Diff line number
Diff line change
@@ -126,11 +126,8 @@ public:
126
126
object.'''
127
127
return self.GetNumLineEntries()
128
128
129
-
__swig_getmethods__["file"] = GetFileSpec
130
-
if _newclass: file = property(GetFileSpec, None, doc='''A read only property that returns the same result an lldb object that represents the source file (lldb.SBFileSpec) for the compile unit.''')
if _newclass: num_line_entries = property(GetNumLineEntries, None, doc='''A read only property that returns the number of line entries in a compile unit as an integer.''')
129
+
file = property(GetFileSpec, None, doc='''A read only property that returns the same result an lldb object that represents the source file (lldb.SBFileSpec) for the compile unit.''')
130
+
num_line_entries = property(GetNumLineEntries, None, doc='''A read only property that returns the number of line entries in a compile unit as an integer.''')
0 commit comments