LLDB
mainline
llvm-project
lldb
include
lldb
API
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
16
namespace
lldb
{
17
18
class
LLDB_API
SBInstructionList
{
19
public
:
20
SBInstructionList
();
21
22
SBInstructionList
(
const
SBInstructionList
&rhs);
23
24
const
SBInstructionList
&
operator=
(
const
SBInstructionList
&rhs);
25
26
~SBInstructionList
();
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
// Writes assembly instructions to `description` with load addresses using
58
// `exe_ctx`.
59
bool
GetDescription
(
lldb::SBStream
&description,
60
lldb::SBExecutionContext
&exe_ctx);
61
62
bool
DumpEmulationForAllInstructions
(
const
char
*triple);
63
64
protected
:
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
73
private
:
74
lldb::DisassemblerSP
m_opaque_sp
;
75
};
76
77
}
// namespace lldb
78
79
#endif
// LLDB_API_SBINSTRUCTIONLIST_H
SBDefines.h
LLDB_API
#define LLDB_API
Definition
SBDefines.h:28
bool
lldb::SBAddress
Definition
SBAddress.h:17
lldb::SBExecutionContext
Definition
SBExecutionContext.h:27
lldb::SBFile
Definition
SBFile.h:18
lldb::SBInstructionList::DumpEmulationForAllInstructions
bool DumpEmulationForAllInstructions(const char *triple)
Definition
SBInstructionList.cpp:197
lldb::SBInstructionList::GetDescription
bool GetDescription(lldb::SBStream &description)
Definition
SBInstructionList.cpp:138
lldb::SBInstructionList::IsValid
bool IsValid() const
Definition
SBInstructionList.cpp:44
lldb::SBInstructionList::GetSize
size_t GetSize()
Definition
SBInstructionList.cpp:54
lldb::SBInstructionList::Clear
void Clear()
Definition
SBInstructionList.cpp:100
lldb::SBInstructionList::SBInstructionList
SBInstructionList()
Definition
SBInstructionList.cpp:26
lldb::SBInstructionList::GetInstructionAtIndex
lldb::SBInstruction GetInstructionAtIndex(uint32_t idx)
Definition
SBInstructionList.cpp:62
lldb::SBInstructionList::SBSymbol
friend class SBSymbol
Definition
SBInstructionList.h:66
lldb::SBInstructionList::SBTarget
friend class SBTarget
Definition
SBInstructionList.h:67
lldb::SBInstructionList::GetInstructionsCount
size_t GetInstructionsCount(const SBAddress &start, const SBAddress &end, bool canSetBreakpoint=false)
Definition
SBInstructionList.cpp:73
lldb::SBInstructionList::SetDisassembler
void SetDisassembler(const lldb::DisassemblerSP &opaque_sp)
Definition
SBInstructionList.cpp:110
lldb::SBInstructionList::AppendInstruction
void AppendInstruction(lldb::SBInstruction inst)
Definition
SBInstructionList.cpp:106
lldb::SBInstructionList::Print
void Print(FILE *out)
Definition
SBInstructionList.cpp:114
lldb::SBInstructionList::~SBInstructionList
~SBInstructionList()
lldb::SBInstructionList::SBFunction
friend class SBFunction
Definition
SBInstructionList.h:65
lldb::SBInstructionList::operator=
const SBInstructionList & operator=(const SBInstructionList &rhs)
Definition
SBInstructionList.cpp:34
lldb::SBInstructionList::m_opaque_sp
lldb::DisassemblerSP m_opaque_sp
Definition
SBInstructionList.h:74
lldb::SBInstruction
Definition
SBInstruction.h:24
lldb::SBStream
Definition
SBStream.h:22
lldb_private::ExecutionContext
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
Definition
ExecutionContext.h:304
lldb_private::Stream
A stream class that can stream formatted output to a file.
Definition
Stream.h:28
lldb
Definition
SBAddress.h:15
lldb::DisassemblerSP
std::shared_ptr< lldb_private::Disassembler > DisassemblerSP
Definition
lldb-forward.h:345
lldb::FileSP
std::shared_ptr< lldb_private::File > FileSP
Definition
lldb-forward.h:357
Generated on
for LLDB by
1.14.0