Files
clang-p2996/lldb/bindings/interface/SBInstructionExtensions.i
Alex Langford 662548c826 [lldb] Replace SB swig interfaces with API headers
Instead of maintaining separate swig interface files, we can use the API
headers directly. They implement the exact same C++ APIs and we can
conditionally include the python extensions as needed. To remove the
swig extensions from the API headers when building the LLDB
framework, we can use the unifdef tool when it is available. Otherwise
we just copy them as-is.

Differential Revision: https://reviews.llvm.org/D142926
2023-02-16 11:18:04 -08:00

26 lines
1.5 KiB
OpenEdge ABL

STRING_EXTENSION_OUTSIDE(SBInstruction)
%extend lldb::SBInstruction {
#ifdef SWIGPYTHON
%pythoncode %{
def __mnemonic_property__ (self):
return self.GetMnemonic (target)
def __operands_property__ (self):
return self.GetOperands (target)
def __comment_property__ (self):
return self.GetComment (target)
def __file_addr_property__ (self):
return self.GetAddress ().GetFileAddress()
def __load_adrr_property__ (self):
return self.GetComment (target)
mnemonic = property(__mnemonic_property__, None, doc='''A read only property that returns the mnemonic for this instruction as a string.''')
operands = property(__operands_property__, None, doc='''A read only property that returns the operands for this instruction as a string.''')
comment = property(__comment_property__, None, doc='''A read only property that returns the comment for this instruction as a string.''')
addr = property(GetAddress, None, doc='''A read only property that returns an lldb object that represents the address (lldb.SBAddress) for this instruction.''')
size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes for this instruction as an integer.''')
is_branch = property(DoesBranch, None, doc='''A read only property that returns a boolean value that indicates if this instruction is a branch instruction.''')
%}
#endif
}