1 //===-- SBInstruction.h -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_SBInstruction_h_
11 #define LLDB_SBInstruction_h_
13 #include "lldb/API/SBData.h"
14 #include "lldb/API/SBDefines.h"
18 // There's a lot to be fixed here, but need to wait for underlying insn
19 // implementation to be revised & settle down first.
21 class InstructionImpl;
25 class LLDB_API SBInstruction {
29 SBInstruction(const SBInstruction &rhs);
31 const SBInstruction &operator=(const SBInstruction &rhs);
37 SBAddress GetAddress();
39 const char *GetMnemonic(lldb::SBTarget target);
41 const char *GetOperands(lldb::SBTarget target);
43 const char *GetComment(lldb::SBTarget target);
45 lldb::SBData GetData(lldb::SBTarget target);
53 bool CanSetBreakpoint();
55 void Print(FILE *out);
57 bool GetDescription(lldb::SBStream &description);
59 bool EmulateWithFrame(lldb::SBFrame &frame, uint32_t evaluate_options);
61 bool DumpEmulation(const char *triple); // triple is to specify the
62 // architecture, e.g. 'armv6' or
65 bool TestEmulation(lldb::SBStream &output_stream, const char *test_file);
68 friend class SBInstructionList;
70 SBInstruction(const lldb::DisassemblerSP &disasm_sp,
71 const lldb::InstructionSP &inst_sp);
73 void SetOpaque(const lldb::DisassemblerSP &disasm_sp,
74 const lldb::InstructionSP &inst_sp);
76 lldb::InstructionSP GetOpaque();
79 std::shared_ptr<InstructionImpl> m_opaque_sp;
84 #endif // LLDB_SBInstruction_h_