xref: /freebsd/contrib/llvm-project/lldb/bindings/interface/SBInstructionExtensions.i (revision a03411e84728e9b267056fd31c7d1d9d1dc1b01e)
1 STRING_EXTENSION_OUTSIDE(SBInstruction)
2 
3 %extend lldb::SBInstruction {
4 #ifdef SWIGPYTHON
5     %pythoncode %{
6         def __mnemonic_property__ (self):
7             return self.GetMnemonic (target)
8         def __operands_property__ (self):
9             return self.GetOperands (target)
10         def __comment_property__ (self):
11             return self.GetComment (target)
12         def __file_addr_property__ (self):
13             return self.GetAddress ().GetFileAddress()
14         def __load_adrr_property__ (self):
15             return self.GetComment (target)
16 
17         mnemonic = property(__mnemonic_property__, None, doc='''A read only property that returns the mnemonic for this instruction as a string.''')
18         operands = property(__operands_property__, None, doc='''A read only property that returns the operands for this instruction as a string.''')
19         comment = property(__comment_property__, None, doc='''A read only property that returns the comment for this instruction as a string.''')
20         addr = property(GetAddress, None, doc='''A read only property that returns an lldb object that represents the address (lldb.SBAddress) for this instruction.''')
21         size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes for this instruction as an integer.''')
22         is_branch = property(DoesBranch, None, doc='''A read only property that returns a boolean value that indicates if this instruction is a branch instruction.''')
23     %}
24 #endif
25 }
26