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
20 // to be revised & settle down first.
22 class InstructionImpl;
26 class LLDB_API SBInstruction {
30 SBInstruction(const SBInstruction &rhs);
32 const SBInstruction &operator=(const SBInstruction &rhs);
38 SBAddress GetAddress();
40 lldb::AddressClass GetAddressClass();
42 const char *GetMnemonic(lldb::SBTarget target);
44 const char *GetOperands(lldb::SBTarget target);
46 const char *GetComment(lldb::SBTarget target);
48 lldb::SBData GetData(lldb::SBTarget target);
56 bool CanSetBreakpoint();
58 void Print(FILE *out);
60 bool GetDescription(lldb::SBStream &description);
62 bool EmulateWithFrame(lldb::SBFrame &frame, uint32_t evaluate_options);
64 bool DumpEmulation(const char *triple); // triple is to specify the
65 // architecture, e.g. 'armv6' or
68 bool TestEmulation(lldb::SBStream &output_stream, const char *test_file);
71 friend class SBInstructionList;
73 SBInstruction(const lldb::DisassemblerSP &disasm_sp,
74 const lldb::InstructionSP &inst_sp);
76 void SetOpaque(const lldb::DisassemblerSP &disasm_sp,
77 const lldb::InstructionSP &inst_sp);
79 lldb::InstructionSP GetOpaque();
82 std::shared_ptr<InstructionImpl> m_opaque_sp;
87 #endif // LLDB_SBInstruction_h_