xref: /freebsd/contrib/llvm-project/lldb/bindings/interface/SBFunctionExtensions.i (revision 5f757f3ff9144b609b3c433dfd370cc6bdc191ad)
106c3fb27SDimitry Andric STRING_EXTENSION_OUTSIDE(SBFunction)
206c3fb27SDimitry Andric 
306c3fb27SDimitry Andric %extend lldb::SBFunction {
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 
1106c3fb27SDimitry Andric         def get_instructions_from_current_target (self):
1206c3fb27SDimitry Andric             return self.GetInstructions (target)
1306c3fb27SDimitry Andric 
1406c3fb27SDimitry Andric         addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this function.''')
1506c3fb27SDimitry 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 function.''')
1606c3fb27SDimitry Andric         block = property(GetBlock, None, doc='''A read only property that returns an lldb object that represents the top level lexical block (lldb.SBBlock) for this function.''')
1706c3fb27SDimitry Andric         instructions = property(get_instructions_from_current_target, None, doc='''A read only property that returns an lldb object that represents the instructions (lldb.SBInstructionList) for this function.''')
1806c3fb27SDimitry Andric         mangled = property(GetMangledName, None, doc='''A read only property that returns the mangled (linkage) name for this function as a string.''')
1906c3fb27SDimitry Andric         name = property(GetName, None, doc='''A read only property that returns the name for this function as a string.''')
2006c3fb27SDimitry Andric         prologue_size = property(GetPrologueByteSize, None, doc='''A read only property that returns the size in bytes of the prologue instructions as an unsigned integer.''')
2106c3fb27SDimitry Andric         type = property(GetType, None, doc='''A read only property that returns an lldb object that represents the return type (lldb.SBType) for this function.''')
2206c3fb27SDimitry Andric     %}
2306c3fb27SDimitry Andric #endif
2406c3fb27SDimitry Andric }
25