File indexing completed on 2026-05-10 08:42:42
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_API_SBINSTRUCTION_H
0010 #define LLDB_API_SBINSTRUCTION_H
0011
0012 #include "lldb/API/SBData.h"
0013 #include "lldb/API/SBDefines.h"
0014
0015 #include <cstdio>
0016
0017
0018
0019
0020 class InstructionImpl;
0021
0022 namespace lldb {
0023
0024 class LLDB_API SBInstruction {
0025 public:
0026 SBInstruction();
0027
0028 SBInstruction(const SBInstruction &rhs);
0029
0030 const SBInstruction &operator=(const SBInstruction &rhs);
0031
0032 ~SBInstruction();
0033
0034 explicit operator bool() const;
0035
0036 bool IsValid();
0037
0038 SBAddress GetAddress();
0039
0040 const char *GetMnemonic(lldb::SBTarget target);
0041
0042 const char *GetOperands(lldb::SBTarget target);
0043
0044 const char *GetComment(lldb::SBTarget target);
0045
0046 lldb::InstructionControlFlowKind GetControlFlowKind(lldb::SBTarget target);
0047
0048 lldb::SBData GetData(lldb::SBTarget target);
0049
0050 size_t GetByteSize();
0051
0052 bool DoesBranch();
0053
0054 bool HasDelaySlot();
0055
0056 bool CanSetBreakpoint();
0057
0058 #ifndef SWIG
0059 void Print(FILE *out);
0060 #endif
0061
0062 void Print(SBFile out);
0063
0064 void Print(FileSP BORROWED);
0065
0066 bool GetDescription(lldb::SBStream &description);
0067
0068 bool EmulateWithFrame(lldb::SBFrame &frame, uint32_t evaluate_options);
0069
0070 bool DumpEmulation(const char *triple);
0071
0072
0073
0074 bool TestEmulation(lldb::SBStream &output_stream, const char *test_file);
0075
0076 protected:
0077 friend class SBInstructionList;
0078
0079 SBInstruction(const lldb::DisassemblerSP &disasm_sp,
0080 const lldb::InstructionSP &inst_sp);
0081
0082 void SetOpaque(const lldb::DisassemblerSP &disasm_sp,
0083 const lldb::InstructionSP &inst_sp);
0084
0085 lldb::InstructionSP GetOpaque();
0086
0087 private:
0088 std::shared_ptr<InstructionImpl> m_opaque_sp;
0089 };
0090
0091 }
0092
0093 #endif