LLDB mainline
SBInstructionList.h
Go to the documentation of this file.
1//===-- SBInstructionList.h -------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_API_SBINSTRUCTIONLIST_H
10#define LLDB_API_SBINSTRUCTIONLIST_H
11
12#include "lldb/API/SBDefines.h"
13
14#include <cstdio>
15
16namespace lldb {
17
19public:
21
23
24 const SBInstructionList &operator=(const SBInstructionList &rhs);
25
27
28 explicit operator bool() const;
29
30 bool IsValid() const;
31
32 size_t GetSize();
33
34 lldb::SBInstruction GetInstructionAtIndex(uint32_t idx);
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 size_t GetInstructionsCount(const SBAddress &start,
40 const SBAddress &end,
41 bool canSetBreakpoint = false);
42
43 void Clear();
44
45 void AppendInstruction(lldb::SBInstruction inst);
46
47#ifndef SWIG
48 void Print(FILE *out);
49#endif
50
51 void Print(SBFile out);
52
53 void Print(FileSP BORROWED);
54
55 bool GetDescription(lldb::SBStream &description);
56
57 bool DumpEmulationForAllInstructions(const char *triple);
58
59protected:
60 friend class SBFunction;
61 friend class SBSymbol;
62 friend class SBTarget;
63
64 void SetDisassembler(const lldb::DisassemblerSP &opaque_sp);
65 bool GetDescription(lldb_private::Stream &description);
66
67
68private:
70};
71
72} // namespace lldb
73
74#endif // LLDB_API_SBINSTRUCTIONLIST_H
#define LLDB_API
Definition: SBDefines.h:28
lldb::DisassemblerSP m_opaque_sp
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
Definition: SBAddress.h:15
std::shared_ptr< lldb_private::Disassembler > DisassemblerSP
Definition: lldb-forward.h:339
std::shared_ptr< lldb_private::File > FileSP
Definition: lldb-forward.h:351