LLDB
mainline
llvm-project
lldb
include
lldb
API
SBMemoryRegionInfo.h
Go to the documentation of this file.
1
//===-- SBMemoryRegionInfo.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_SBMEMORYREGIONINFO_H
10
#define LLDB_API_SBMEMORYREGIONINFO_H
11
12
#include "
lldb/API/SBData.h
"
13
#include "
lldb/API/SBDefines.h
"
14
15
namespace
lldb
{
16
17
class
LLDB_API
SBMemoryRegionInfo
{
18
public
:
19
SBMemoryRegionInfo
();
20
21
SBMemoryRegionInfo
(
const
lldb::SBMemoryRegionInfo
&rhs);
22
23
SBMemoryRegionInfo
(
const
char
*name,
lldb::addr_t
begin,
lldb::addr_t
end,
24
uint32_t permissions,
bool
mapped,
25
bool
stack_memory =
false
);
26
27
~SBMemoryRegionInfo
();
28
29
const
lldb::SBMemoryRegionInfo
&
30
operator=(
const
lldb::SBMemoryRegionInfo
&rhs);
31
32
void
Clear();
33
34
/// Get the base address of this memory range.
35
///
36
/// \return
37
/// The base address of this memory range.
38
lldb::addr_t
GetRegionBase();
39
40
/// Get the end address of this memory range.
41
///
42
/// \return
43
/// The base address of this memory range.
44
lldb::addr_t
GetRegionEnd();
45
46
/// Check if this memory address is marked readable to the process.
47
///
48
/// \return
49
/// true if this memory address is marked readable
50
bool
IsReadable();
51
52
/// Check if this memory address is marked writable to the process.
53
///
54
/// \return
55
/// true if this memory address is marked writable
56
bool
IsWritable();
57
58
/// Check if this memory address is marked executable to the process.
59
///
60
/// \return
61
/// true if this memory address is marked executable
62
bool
IsExecutable();
63
64
/// Check if this memory address is mapped into the process address
65
/// space.
66
///
67
/// \return
68
/// true if this memory address is in the process address space.
69
bool
IsMapped();
70
71
/// Returns the name of the memory region mapped at the given
72
/// address.
73
///
74
/// \return
75
/// In case of memory mapped files it is the absolute path of
76
/// the file otherwise it is a name associated with the memory
77
/// region. If no name can be determined the returns nullptr.
78
const
char
*
GetName
();
79
80
/// Returns whether this memory region has a list of memory pages
81
/// that have been modified -- that are dirty.
82
///
83
/// \return
84
/// True if the dirty page list is available.
85
bool
HasDirtyMemoryPageList();
86
87
/// Returns the number of modified pages -- dirty pages -- in this
88
/// memory region.
89
///
90
/// \return
91
/// The number of dirty page entries will be returned. If
92
/// there are no dirty pages in this memory region, 0 will
93
/// be returned. 0 will also be returned if the dirty page
94
/// list is not available for this memory region -- you must
95
/// use HasDirtyMemoryPageList() to check for that.
96
uint32_t GetNumDirtyPages();
97
98
/// Returns the address of a memory page that has been modified in
99
/// this region.
100
///
101
/// \return
102
/// Returns the address for his dirty page in the list.
103
/// If this memory region does not have a dirty page list,
104
/// LLDB_INVALID_ADDRESS is returned.
105
addr_t
GetDirtyPageAddressAtIndex(uint32_t idx);
106
107
/// Returns the size of a memory page in this region.
108
///
109
/// \return
110
/// Returns the size of the memory pages in this region,
111
/// or 0 if this information is unavailable.
112
int
GetPageSize();
113
114
bool
operator==
(
const
lldb::SBMemoryRegionInfo
&rhs)
const
;
115
116
bool
operator!=(
const
lldb::SBMemoryRegionInfo
&rhs)
const
;
117
118
bool
GetDescription(
lldb::SBStream
&description);
119
120
private
:
121
friend
class
SBProcess
;
122
friend
class
SBMemoryRegionInfoList
;
123
124
friend
class
lldb_private::ScriptInterpreter
;
125
126
lldb_private::MemoryRegionInfo
&ref();
127
128
const
lldb_private::MemoryRegionInfo
&ref()
const
;
129
130
// Unused.
131
SBMemoryRegionInfo
(
const
lldb_private::MemoryRegionInfo
*lldb_object_ptr);
132
133
lldb::MemoryRegionInfoUP
m_opaque_up
;
134
};
135
136
}
// namespace lldb
137
138
#endif
// LLDB_API_SBMEMORYREGIONINFO_H
GetName
static const char * GetName(DWARFDeclContext::Entry entry)
Returns the name of entry if it has one, or the appropriate "anonymous {namespace,...
Definition:
DWARFDeclContext.cpp:17
SBData.h
SBDefines.h
LLDB_API
#define LLDB_API
Definition:
SBDefines.h:28
lldb::SBMemoryRegionInfoList
Definition:
SBMemoryRegionInfoList.h:18
lldb::SBMemoryRegionInfo
Definition:
SBMemoryRegionInfo.h:17
lldb::SBMemoryRegionInfo::m_opaque_up
lldb::MemoryRegionInfoUP m_opaque_up
Definition:
SBMemoryRegionInfo.h:133
lldb::SBMemoryRegionInfo::~SBMemoryRegionInfo
~SBMemoryRegionInfo()
lldb::SBProcess
Definition:
SBProcess.h:29
lldb::SBStream
Definition:
SBStream.h:18
lldb_private::MemoryRegionInfo
Definition:
MemoryRegionInfo.h:21
lldb_private::ScriptInterpreter
Definition:
ScriptInterpreter.h:134
lldb
Definition:
SBAddress.h:15
lldb::MemoryRegionInfoUP
std::unique_ptr< lldb_private::MemoryRegionInfo > MemoryRegionInfoUP
Definition:
lldb-forward.h:363
lldb::addr_t
uint64_t addr_t
Definition:
lldb-types.h:79
lldb::operator==
bool LLDB_API operator==(const SBAddress &lhs, const SBAddress &rhs)
Definition:
SBAddress.cpp:60
Generated on Wed May 1 2024 09:42:48 for LLDB by
1.9.6