LIEF: Library to Instrument Executable Formats
Version 1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
DyldSharedCache
MappingInfo.hpp
Go to the documentation of this file.
1
/* Copyright 2017 - 2026 R. Thomas
2
* Copyright 2017 - 2026 Quarkslab
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#ifndef LIEF_DSC_MAPPING_INFO_H
17
#define LIEF_DSC_MAPPING_INFO_H
18
#include "
LIEF/visibility.h
"
19
#include "
LIEF/iterators.hpp
"
20
21
#include <memory>
22
#include <cstdint>
23
24
namespace
LIEF
{
25
namespace
dsc
{
26
27
namespace
details
{
28
class
MappingInfo;
29
class
MappingInfoIt;
30
}
31
36
class
LIEF_API
MappingInfo
{
37
public
:
39
class
LIEF_API
Iterator
40
:
public
iterator_facade_base
<Iterator, std::random_access_iterator_tag,
41
std::unique_ptr<MappingInfo>, std::ptrdiff_t,
42
MappingInfo*, std::unique_ptr<MappingInfo>> {
43
public
:
44
using
implementation
= details::MappingInfoIt;
45
46
Iterator
(std::unique_ptr<details::MappingInfoIt> impl);
47
Iterator
(
const
Iterator
&);
48
Iterator
&
operator=
(
const
Iterator
&);
49
50
Iterator
(
Iterator
&&) noexcept;
51
Iterator
& operator=(
Iterator
&&) noexcept;
52
53
~
Iterator
();
54
bool
operator<(const
Iterator
& rhs) const;
55
56
std
::ptrdiff_t operator-(const
Iterator
& R) const;
57
58
Iterator
& operator+=(
std
::ptrdiff_t n);
59
Iterator
& operator-=(
std
::ptrdiff_t n);
60
61
friend
LIEF_API
bool
operator==(const
Iterator
& LHS, const
Iterator
& RHS);
62
63
friend
LIEF_API
bool
operator!=(const
Iterator
& LHS, const
Iterator
& RHS) {
64
return
!(LHS == RHS);
65
}
66
67
std::unique_ptr<MappingInfo>
operator*
()
const
;
68
69
private
:
70
std::unique_ptr<details::MappingInfoIt> impl_;
71
};
72
73
MappingInfo
(std::unique_ptr<details::MappingInfo> impl);
74
~MappingInfo
();
75
77
uint64_t
address
()
const
;
78
80
uint64_t
size
()
const
;
81
83
uint64_t
end_address
()
const
{
84
return
address
() +
size
();
85
}
86
88
uint64_t
file_offset
()
const
;
89
91
uint32_t
max_prot
()
const
;
92
94
uint32_t
init_prot
()
const
;
95
96
private
:
97
std::unique_ptr<details::MappingInfo> impl_;
98
};
99
100
}
101
}
102
#endif
LIEF::dsc::MappingInfo::Iterator::Iterator
Iterator(Iterator &&) noexcept
LIEF::dsc::MappingInfo::Iterator::operator=
Iterator & operator=(const Iterator &)
LIEF::dsc::MappingInfo::Iterator::implementation
details::MappingInfoIt implementation
Definition
MappingInfo.hpp:44
LIEF::dsc::MappingInfo::Iterator::operator*
std::unique_ptr< MappingInfo > operator*() const
LIEF::dsc::MappingInfo::Iterator::Iterator
Iterator(const Iterator &)
LIEF::dsc::MappingInfo::Iterator::Iterator
Iterator(std::unique_ptr< details::MappingInfoIt > impl)
LIEF::dsc::MappingInfo::size
uint64_t size() const
Size of the region being mapped.
LIEF::dsc::MappingInfo::max_prot
uint32_t max_prot() const
Max memory protection.
LIEF::dsc::MappingInfo::file_offset
uint64_t file_offset() const
On-disk file offset.
LIEF::dsc::MappingInfo::end_address
uint64_t end_address() const
End virtual address of the region.
Definition
MappingInfo.hpp:83
LIEF::dsc::MappingInfo::init_prot
uint32_t init_prot() const
Initial memory protection.
LIEF::dsc::MappingInfo::MappingInfo
MappingInfo(std::unique_ptr< details::MappingInfo > impl)
LIEF::dsc::MappingInfo::~MappingInfo
~MappingInfo()
LIEF::dsc::MappingInfo::address
uint64_t address() const
The in-memory address where this dyld shared cache region is mapped.
LIEF::iterator_facade_base
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
Definition
iterators.hpp:685
iterators.hpp
LIEF::dsc::details
Definition
DyldSharedCache/DyldSharedCache.hpp:35
LIEF::dsc
Namespace related to the dyld shared cache support.
Definition
caching.hpp:22
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:40
std
Definition
string.h:155
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:43
Generated by
1.17.0