1 //===-- SWIG Interface for SBInstruction ------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // There's a lot to be fixed here, but need to wait for underlying insn implementation
12 // to be revised & settle down first.
22 SBInstruction (const SBInstruction &rhs);
29 explicit operator bool() const;
36 GetMnemonic (lldb::SBTarget target);
39 GetOperands (lldb::SBTarget target);
42 GetComment (lldb::SBTarget target);
45 GetData (lldb::SBTarget target);
60 Print (lldb::SBFile out);
63 Print (lldb::FileSP BORROWED);
66 GetDescription (lldb::SBStream &description);
69 EmulateWithFrame (lldb::SBFrame &frame, uint32_t evaluate_options);
72 DumpEmulation (const char * triple); // triple is to specify the architecture, e.g. 'armv6' or 'armv7-apple-ios'
75 TestEmulation (lldb::SBStream &output_stream, const char *test_file);
77 STRING_EXTENSION(SBInstruction)
81 def __mnemonic_property__ (self):
82 return self.GetMnemonic (target)
83 def __operands_property__ (self):
84 return self.GetOperands (target)
85 def __comment_property__ (self):
86 return self.GetComment (target)
87 def __file_addr_property__ (self):
88 return self.GetAddress ().GetFileAddress()
89 def __load_adrr_property__ (self):
90 return self.GetComment (target)
92 mnemonic = property(__mnemonic_property__, None, doc='''A read only property that returns the mnemonic for this instruction as a string.''')
93 operands = property(__operands_property__, None, doc='''A read only property that returns the operands for this instruction as a string.''')
94 comment = property(__comment_property__, None, doc='''A read only property that returns the comment for this instruction as a string.''')
95 addr = property(GetAddress, None, doc='''A read only property that returns an lldb object that represents the address (lldb.SBAddress) for this instruction.''')
96 size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes for this instruction as an integer.''')
97 is_branch = property(DoesBranch, None, doc='''A read only property that returns a boolean value that indicates if this instruction is a branch instruction.''')