]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/llvm/tools/lldb/include/lldb/API/SBInstruction.h
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / llvm / tools / lldb / include / lldb / API / SBInstruction.h
1 //===-- SBInstruction.h -----------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLDB_SBInstruction_h_
11 #define LLDB_SBInstruction_h_
12
13 #include "lldb/API/SBDefines.h"
14 #include "lldb/API/SBData.h"
15
16 #include <stdio.h>
17
18 // There's a lot to be fixed here, but need to wait for underlying insn implementation
19 // to be revised & settle down first.
20
21 namespace lldb {
22
23 class SBInstruction
24 {
25 public:
26
27     SBInstruction ();
28
29     SBInstruction (const SBInstruction &rhs);
30     
31     const SBInstruction &
32     operator = (const SBInstruction &rhs);
33
34     ~SBInstruction ();
35
36     bool
37     IsValid();
38
39     SBAddress
40     GetAddress();
41     
42     lldb::AddressClass
43     GetAddressClass ();
44     
45     const char *
46     GetMnemonic (lldb::SBTarget target);
47
48     const char *
49     GetOperands (lldb::SBTarget target);
50     
51     const char *
52     GetComment (lldb::SBTarget target);
53
54     lldb::SBData
55     GetData (lldb::SBTarget target);
56
57     size_t
58     GetByteSize ();
59
60     bool
61     DoesBranch ();
62
63     void
64     Print (FILE *out);
65
66     bool
67     GetDescription (lldb::SBStream &description);
68
69     bool
70     EmulateWithFrame (lldb::SBFrame &frame, uint32_t evaluate_options);
71
72     bool
73     DumpEmulation (const char * triple); // triple is to specify the architecture, e.g. 'armv6' or 'armv7-apple-ios'
74     
75     bool
76     TestEmulation (lldb::SBStream &output_stream, const char *test_file);
77
78 protected:
79     friend class SBInstructionList;
80
81     SBInstruction (const lldb::InstructionSP &inst_sp);
82
83     void
84     SetOpaque (const lldb::InstructionSP &inst_sp);
85
86 private:
87
88     lldb::InstructionSP  m_opaque_sp;
89 };
90
91
92 } // namespace lldb
93
94 #endif // LLDB_SBInstruction_h_