]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/API/SBInstructionList.h
Merge clang 7.0.1 and several follow-up changes
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / API / SBInstructionList.h
1 //===-- SBInstructionList.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_SBInstructionList_h_
11 #define LLDB_SBInstructionList_h_
12
13 #include "lldb/API/SBDefines.h"
14
15 #include <stdio.h>
16
17 namespace lldb {
18
19 class LLDB_API SBInstructionList {
20 public:
21   SBInstructionList();
22
23   SBInstructionList(const SBInstructionList &rhs);
24
25   const SBInstructionList &operator=(const SBInstructionList &rhs);
26
27   ~SBInstructionList();
28
29   bool IsValid() const;
30
31   size_t GetSize();
32
33   lldb::SBInstruction GetInstructionAtIndex(uint32_t idx);
34
35   // ----------------------------------------------------------------------
36   // Returns the number of instructions between the start and end address. If
37   // canSetBreakpoint is true then the count will be the number of
38   // instructions on which a breakpoint can be set.
39   // ----------------------------------------------------------------------
40   size_t GetInstructionsCount(const SBAddress &start,
41                               const SBAddress &end,
42                               bool canSetBreakpoint = false);                                   
43
44   void Clear();
45
46   void AppendInstruction(lldb::SBInstruction inst);
47
48   void Print(FILE *out);
49
50   bool GetDescription(lldb::SBStream &description);
51
52   bool DumpEmulationForAllInstructions(const char *triple);
53
54 protected:
55   friend class SBFunction;
56   friend class SBSymbol;
57   friend class SBTarget;
58
59   void SetDisassembler(const lldb::DisassemblerSP &opaque_sp);
60
61 private:
62   lldb::DisassemblerSP m_opaque_sp;
63 };
64
65 } // namespace lldb
66
67 #endif // LLDB_SBInstructionList_h_