1 %extend lldb
::SBAddressRangeList
{
5 '''Return the number of address ranges in a lldb.SBAddressRangeList object.'''
9 '''Iterate over all the address ranges in a lldb.SBAddressRangeList object.'''
10 return lldb_iter
(self
, 'GetSize'
, 'GetAddressRangeAtIndex'
)
12 def __getitem__
(self
, idx
):
13 '''Get the address range at a given index in an lldb.SBAddressRangeList object.'''
14 if not isinstance
(idx
, int
):
15 raise TypeError
("unsupported index type: %s" % type
(idx
))
17 if not
(-count
<= idx
< count
):
18 raise IndexError
("list index out of range")
20 return self.GetAddressRangeAtIndex
(idx
)
24 stream
= lldb.SBStream
()
25 self.GetDescription
(stream
, lldb.target if lldb.target else lldb.SBTarget
())
26 return stream.GetData
()