]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/API/SBInstruction.h
Merge ^/head r295902 through r296006.
[FreeBSD/FreeBSD.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 LLDB_API 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     bool
64     HasDelaySlot ();
65
66     void
67     Print (FILE *out);
68
69     bool
70     GetDescription (lldb::SBStream &description);
71
72     bool
73     EmulateWithFrame (lldb::SBFrame &frame, uint32_t evaluate_options);
74
75     bool
76     DumpEmulation (const char * triple); // triple is to specify the architecture, e.g. 'armv6' or 'armv7-apple-ios'
77     
78     bool
79     TestEmulation (lldb::SBStream &output_stream, const char *test_file);
80
81 protected:
82     friend class SBInstructionList;
83
84     SBInstruction (const lldb::InstructionSP &inst_sp);
85
86     void
87     SetOpaque (const lldb::InstructionSP &inst_sp);
88
89 private:
90
91     lldb::InstructionSP  m_opaque_sp;
92 };
93
94
95 } // namespace lldb
96
97 #endif // LLDB_SBInstruction_h_