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
25
27
28 explicit operator bool() const;
29
30 bool IsValid() const;
31
32 size_t GetSize();
33
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
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 // Writes assembly instructions to `description` with load addresses using
58 // `exe_ctx`.
59 bool GetDescription(lldb::SBStream &description,
61
62 bool DumpEmulationForAllInstructions(const char *triple);
63
64protected:
65 friend class SBFunction;
66 friend class SBSymbol;
67 friend class SBTarget;
68
69 void SetDisassembler(const lldb::DisassemblerSP &opaque_sp);
70 bool GetDescription(lldb_private::Stream &description,
71 lldb_private::ExecutionContext *exe_ctx = nullptr);
72
73private:
75};
76
77} // namespace lldb
78
79#endif // LLDB_API_SBINSTRUCTIONLIST_H
#define LLDB_API
Definition SBDefines.h:28
bool DumpEmulationForAllInstructions(const char *triple)
bool GetDescription(lldb::SBStream &description)
lldb::SBInstruction GetInstructionAtIndex(uint32_t idx)
size_t GetInstructionsCount(const SBAddress &start, const SBAddress &end, bool canSetBreakpoint=false)
void SetDisassembler(const lldb::DisassemblerSP &opaque_sp)
void AppendInstruction(lldb::SBInstruction inst)
const SBInstructionList & operator=(const SBInstructionList &rhs)
lldb::DisassemblerSP m_opaque_sp
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A stream class that can stream formatted output to a file.
Definition Stream.h:28
std::shared_ptr< lldb_private::Disassembler > DisassemblerSP
std::shared_ptr< lldb_private::File > FileSP