LIEF: Library to Instrument Executable Formats Version 0.16.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_DSC_DYLD_SHARED_CACHE_H
17#define LIEF_DSC_DYLD_SHARED_CACHE_H
38 enum class VERSION : uint32_t {
57 enum class DYLD_TARGET_PLATFORM : uint32_t {
69 WATCHOS_SIMULATOR = 9,
72 VISIONOS_SIMULATOR = 12,
78 enum class DYLD_TARGET_ARCH {
95 using dylib_iterator = iterator_range<Dylib::Iterator>;
98 using mapping_info_iterator = iterator_range<MappingInfo::Iterator>;
101 using subcache_iterator = iterator_range<SubCache::Iterator>;
107 static std::unique_ptr<DyldSharedCache>
from_path(
const std::string& path,
110 const std::string& arch =
"");
111 static std::unique_ptr<DyldSharedCache>
from_files(
const std::vector<std::string>& path);
132 DYLD_TARGET_PLATFORM
platform()
const;
135 DYLD_TARGET_ARCH
arch()
const;
223 std::unique_ptr<details::DyldSharedCache> impl_;
225inline std::unique_ptr<DyldSharedCache>
load(
const std::string& path,
246 const std::string& arch =
"")
250inline std::unique_ptr<DyldSharedCache>
load(
const std::vector<std::string>& files)
This class represents a dyld shared cache file.
Definition DyldSharedCache/DyldSharedCache.hpp:36
std::string filepath() const
Full path to the original dyld shared cache file associated with object (e.g. /home/lief/downloads/vi...
void flush_cache() const
Flush internal information into the on-disk cache (see: enable_caching)
uint64_t load_address() const
Based address of this cache.
dylib_iterator libraries() const
Return an interator over the libraries embedded in this dyld shared cache.
void enable_caching(const std::string &target_cache_dir) const
When enabled, this function allows to record and to keep in cache, dyld shared cache information that...
DyldSharedCache(std::unique_ptr< details::DyldSharedCache > impl)
bool has_subcaches() const
True if the subcaches are associated with this cache.
DYLD_TARGET_ARCH arch() const
Architecture targeted by this cache.
DYLD_TARGET_PLATFORM platform() const
Platform targeted by this cache (e.g. vision-os)
std::unique_ptr< Dylib > find_lib_from_path(const std::string &path) const
Find the Dylib whose Dylib::path matches the provided path.
static std::unique_ptr< DyldSharedCache > from_path(const std::string &path, const std::string &arch="")
See the load functions for the details.
std::unique_ptr< Dylib > find_lib_from_name(const std::string &name) const
Find the Dylib whose filename of Dylib::path matches the provided name.
std::string arch_name() const
Name of the architecture targeted by this cache (x86_64h)
std::string filename() const
Filename of the dyld shared file associated with this object.
std::unique_ptr< Dylib > find_lib_from_va(uint64_t va) const
Find the Dylib that encompasses the given virtual address. It returns a nullptr if a Dylib can't be f...
mapping_info_iterator mapping_info() const
Return an interator over the mapping information of this dyld shared cache.
static std::unique_ptr< DyldSharedCache > from_files(const std::vector< std::string > &path)
See the load functions for the details.
subcache_iterator subcaches() const
Return an interator over the subcaches associated with this (main) dyld shared cache.
VERSION version() const
Version of dyld used by this cache.
Definition DyldSharedCache/DyldSharedCache.hpp:31
Namespace related to the dyld shared cache support.
Definition caching.hpp:22
std::unique_ptr< DyldSharedCache > load(const std::string &path, const std::string &arch="")
Load a shared cache from a single file or from a directory specified by the path parameter.
Definition DyldSharedCache/DyldSharedCache.hpp:245
LIEF namespace.
Definition Abstract/Binary.hpp:32
#define LIEF_API
Definition visibility.h:41