xref: /freebsd/contrib/llvm-project/lldb/bindings/interface/SBLineEntryExtensions.i (revision 5f757f3ff9144b609b3c433dfd370cc6bdc191ad)
106c3fb27SDimitry Andric STRING_EXTENSION_OUTSIDE(SBLineEntry)
206c3fb27SDimitry Andric 
306c3fb27SDimitry Andric %extend lldb::SBLineEntry {
406c3fb27SDimitry Andric #ifdef SWIGPYTHON
506c3fb27SDimitry Andric     %pythoncode %{
6*5f757f3fSDimitry Andric         # operator== is a free function, which swig does not handle, so we inject
7*5f757f3fSDimitry Andric         # our own equality operator here
8*5f757f3fSDimitry Andric         def __eq__(self, other):
9*5f757f3fSDimitry Andric             return not self.__ne__(other)
10*5f757f3fSDimitry Andric 
11*5f757f3fSDimitry Andric         def __int__(self):
12*5f757f3fSDimitry Andric             return self.GetLine()
13*5f757f3fSDimitry Andric 
14*5f757f3fSDimitry Andric         def __hex__(self):
15*5f757f3fSDimitry Andric             return self.GetStartAddress()
1606c3fb27SDimitry Andric         file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this line entry.''')
1706c3fb27SDimitry Andric         line = property(GetLine, None, doc='''A read only property that returns the 1 based line number for this line entry, a return value of zero indicates that no line information is available.''')
1806c3fb27SDimitry Andric         column = property(GetColumn, None, doc='''A read only property that returns the 1 based column number for this line entry, a return value of zero indicates that no column information is available.''')
1906c3fb27SDimitry Andric         addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this line entry.''')
2006c3fb27SDimitry Andric         end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this line entry.''')
2106c3fb27SDimitry Andric     %}
2206c3fb27SDimitry Andric #endif
2306c3fb27SDimitry Andric }
24