LLDB
mainline
llvm-project
lldb
include
lldb
API
SBAddress.h
Go to the documentation of this file.
1
//===-- SBAddress.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_SBADDRESS_H
10
#define LLDB_API_SBADDRESS_H
11
12
#include "
lldb/API/SBDefines.h
"
13
#include "
lldb/API/SBModule.h
"
14
15
namespace
lldb
{
16
17
class
LLDB_API
SBAddress
{
18
public
:
19
SBAddress
();
20
21
SBAddress
(
const
lldb::SBAddress
&rhs);
22
23
SBAddress
(
lldb::SBSection
section,
lldb::addr_t
offset);
24
25
// Create an address by resolving a load address using the supplied target
26
SBAddress
(
lldb::addr_t
load_addr,
lldb::SBTarget
&target);
27
28
~
SBAddress
();
29
30
const
lldb::SBAddress
&operator=(
const
lldb::SBAddress
&rhs);
31
32
explicit
operator
bool()
const
;
33
34
// operator== is a free function
35
36
bool
operator!=
(
const
SBAddress
&rhs)
const
;
37
38
bool
IsValid()
const
;
39
40
void
Clear();
41
42
addr_t
GetFileAddress()
const
;
43
44
addr_t
GetLoadAddress(
const
lldb::SBTarget
&target)
const
;
45
46
void
SetAddress(
lldb::SBSection
section,
lldb::addr_t
offset);
47
48
void
SetLoadAddress(
lldb::addr_t
load_addr,
lldb::SBTarget
&target);
49
bool
OffsetAddress(
addr_t
offset);
50
51
bool
GetDescription(
lldb::SBStream
&description);
52
53
// The following queries can lookup symbol information for a given address.
54
// An address might refer to code or data from an existing module, or it
55
// might refer to something on the stack or heap. The following functions
56
// will only return valid values if the address has been resolved to a code
57
// or data address using "void SBAddress::SetLoadAddress(...)" or
58
// "lldb::SBAddress SBTarget::ResolveLoadAddress (...)".
59
lldb::SBSymbolContext
GetSymbolContext(
uint32_t
resolve_scope);
60
61
// The following functions grab individual objects for a given address and
62
// are less efficient if you want more than one symbol related objects. Use
63
// one of the following when you want multiple debug symbol related objects
64
// for an address:
65
// lldb::SBSymbolContext SBAddress::GetSymbolContext (uint32_t
66
// resolve_scope);
67
// lldb::SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const
68
// SBAddress &addr, uint32_t resolve_scope);
69
// One or more bits from the SymbolContextItem enumerations can be logically
70
// OR'ed together to more efficiently retrieve multiple symbol objects.
71
72
lldb::SBSection
GetSection();
73
74
lldb::addr_t
GetOffset();
75
76
lldb::SBModule
GetModule();
77
78
lldb::SBCompileUnit
GetCompileUnit();
79
80
lldb::SBFunction
GetFunction();
81
82
lldb::SBBlock
GetBlock();
83
84
lldb::SBSymbol
GetSymbol();
85
86
lldb::SBLineEntry
GetLineEntry();
87
88
protected
:
89
friend
class
SBBlock
;
90
friend
class
SBBreakpoint
;
91
friend
class
SBBreakpointLocation
;
92
friend
class
SBFrame
;
93
friend
class
SBFunction
;
94
friend
class
SBLineEntry
;
95
friend
class
SBInstruction
;
96
friend
class
SBModule
;
97
friend
class
SBSection
;
98
friend
class
SBSymbol
;
99
friend
class
SBSymbolContext
;
100
friend
class
SBTarget
;
101
friend
class
SBThread
;
102
friend
class
SBThreadPlan
;
103
friend
class
SBValue
;
104
friend
class
SBQueueItem
;
105
106
lldb_private::Address
*operator->();
107
108
const
lldb_private::Address
*operator->()
const
;
109
110
friend
bool
LLDB_API
operator==
(
const
SBAddress
&lhs,
const
SBAddress
&rhs);
111
112
lldb_private::Address
*get();
113
114
lldb_private::Address
&ref();
115
116
const
lldb_private::Address
&ref()
const
;
117
118
SBAddress
(
const
lldb_private::Address
&address);
119
120
void
SetAddress(
const
lldb_private::Address
&address);
121
122
private
:
123
std::unique_ptr<lldb_private::Address>
m_opaque_up
;
124
};
125
126
bool
LLDB_API
operator==
(
const
SBAddress
&lhs,
const
SBAddress
&rhs);
127
128
}
// namespace lldb
129
130
#endif // LLDB_API_SBADDRESS_H
lldb::SBBreakpointLocation
Definition:
SBBreakpointLocation.h:17
lldb::SBThread
Definition:
SBThread.h:20
SBDefines.h
SBModule.h
lldb::SBCompileUnit
Definition:
SBCompileUnit.h:17
lldb::SBValue
Definition:
SBValue.h:21
lldb::SBSymbol
Definition:
SBSymbol.h:19
lldb::addr_t
uint64_t addr_t
Definition:
lldb-types.h:83
lldb::SBQueueItem
Definition:
SBQueueItem.h:17
lldb::SBTarget
Definition:
SBTarget.h:29
lldb::SBFrame
Definition:
SBFrame.h:17
lldb::SBThreadPlan
Definition:
SBThreadPlan.h:18
lldb::SBBlock
Definition:
SBBlock.h:19
lldb::operator==
bool LLDB_API operator==(const SBAddress &lhs, const SBAddress &rhs)
Definition:
SBAddress.cpp:60
lldb::SBFunction
Definition:
SBFunction.h:18
lldb::SBSection
Definition:
SBSection.h:17
lldb_private::operator!=
bool operator!=(const Address &lhs, const Address &rhs)
Definition:
Address.cpp:1022
lldb::SBSymbolContext
Definition:
SBSymbolContext.h:22
uint32_t
lldb_private::Address
Definition:
Address.h:59
lldb::SBBreakpoint
Definition:
SBBreakpoint.h:18
lldb::SBModule
Definition:
SBModule.h:20
lldb::SBInstruction
Definition:
SBInstruction.h:24
lldb::SBAddress::m_opaque_up
std::unique_ptr< lldb_private::Address > m_opaque_up
Definition:
SBAddress.h:123
lldb::SBLineEntry
Definition:
SBLineEntry.h:18
lldb::SBAddress
Definition:
SBAddress.h:17
lldb::SBStream
Definition:
SBStream.h:18
lldb::SBAddress
class LLDB_API SBAddress
Definition:
SBDefines.h:33
lldb
Definition:
SBAddress.h:15
LLDB_API
#define LLDB_API
Definition:
SBDefines.h:26
Generated on Fri Jan 27 2023 18:14:53 for LLDB by
1.8.17