16#ifndef LIEF_RUNTIME_MEMORY_LAYOUT_H
17#define LIEF_RUNTIME_MEMORY_LAYOUT_H
44 name_(std::move(
name)),
101 :
public iterator_facade_base<Iterator, std::forward_iterator_tag, Region,
102 std::ptrdiff_t, const Region*, const Region&> {
105 using iterator_facade_base::operator++;
120 return !(LHS == RHS);
138 std::unique_ptr<
details::MemoryLayoutIt> impl_;
139 mutable std::unique_ptr<
Region> cached_;
Definition iterators.hpp:595
Iterator(Iterator &&) noexcept
details::MemoryLayoutIt implementation
Definition MemoryLayout.hpp:104
Iterator(const Iterator &)
Iterator & operator=(const Iterator &)
const Region & operator*() const
std::unique_ptr< Region > yield()
Transfer ownership of the region at the current position to the caller. Returns nullptr if the iterat...
A contiguous range of memory mapped in the current process.
Definition MemoryLayout.hpp:40
uint64_t addr() const
Address at which the region starts.
Definition MemoryLayout.hpp:66
bool contains(uint64_t addr) const
Whether the given address is within this region.
Definition MemoryLayout.hpp:81
friend std::ostream & operator<<(std::ostream &os, const Region ®ion)
Definition MemoryLayout.hpp:87
uint64_t size() const
Size of the region.
Definition MemoryLayout.hpp:71
std::string_view name() const
Name associated with the region: name/path of the module mapped at this address (e....
Definition MemoryLayout.hpp:61
std::string to_string() const
Region & operator=(const Region &)=default
Region(Region &&) noexcept=default
uint64_t end_addr() const
Address at which the region ends.
Definition MemoryLayout.hpp:76
Region(const Region &)=default
Region(std::string name, uint64_t addr, uint64_t size)
Definition MemoryLayout.hpp:43
This class exposes the memory layout of the current process.
Definition MemoryLayout.hpp:37
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Definition MemoryLayout.hpp:32
Definition android/Host.hpp:24
iterator_range< MemoryLayout::Iterator > memory_layout_it
Definition MemoryLayout.hpp:143
memory_layout_it memory_layout()
Return an iterator over the memory layout of the current process.
#define LIEF_API
Definition visibility.h:45