|
LIEF: Library to Instrument Executable Formats Version 1.0.0
|
This class represents an in-memory module which can be an executable or a library. More...
#include <Module.hpp>

Classes | |
| class | Iterator |
Public Member Functions | |
| Module ()=delete | |
| Module (std::unique_ptr< details::Module > impl) | |
| Module (const Module &)=delete | |
| Module & | operator= (const Module &)=delete |
| Module (Module &&) noexcept | |
| Module & | operator= (Module &&) noexcept |
| virtual std::unique_ptr< Module > | clone () const |
| uint64_t | imagebase () const |
| Base address where the module is loaded in memory. | |
| uint64_t | size () const |
| Virtual size of the current module. | |
| uint64_t | end () const |
| End address of the module. | |
| std::string | name () const |
| Name of the module (e.g. libc.so.6, kernel32.dll, libsystem_c.dylib). | |
| std::string | path () const |
| Path of the module. | |
| bool | contains (uintptr_t addr) const |
| Check if the current module contains the given address. | |
| std::vector< uint8_t > | dump () const |
| Return the content of the module as it is currently mapped in memory. | |
| std::vector< uint8_t > | dump (const std::string &filepath) const |
| Same as dump() but also writes the content into the file located at filepath. | |
| std::vector< uint8_t > | dump (std::ostream &os) const |
| Same as dump() but also writes the content into the given output stream. | |
| std::string | to_string () const |
| template<class T> | |
| const T * | as () const |
| This function can be used to downcast a Module instance. | |
| template<class T> | |
| T * | as () |
| virtual | ~Module () |
This class represents an in-memory module which can be an executable or a library.
|
delete |
References Module().
Referenced by as(), clone(), Module(), Module(), Module(), Module(), LIEF::runtime::Module::Iterator::operator*(), LIEF::runtime::Module::Iterator::operator->(), operator<<, operator=(), operator=(), and LIEF::runtime::Module::Iterator::yield().
| LIEF::runtime::Module::Module | ( | std::unique_ptr< details::Module > | impl | ) |
References Module().
|
delete |
References Module().
|
noexcept |
References Module().
|
virtual |
|
inline |
References LIEF_LIFETIMEBOUND, and Module().
|
inline |
This function can be used to downcast a Module instance.
References LIEF_LIFETIMEBOUND.
|
virtual |
|
inline |
Check if the current module contains the given address.
References imagebase(), and size().
|
inline |
Return the content of the module as it is currently mapped in memory.
The returned buffer spans imagebase() over size() bytes. An empty buffer is returned if the imagebase or the size is null.
References imagebase(), and size().
|
inline |
|
inline |
|
inline |
| uint64_t LIEF::runtime::Module::imagebase | ( | ) | const |
Base address where the module is loaded in memory.
References imagebase().
Referenced by contains(), dump(), end(), and imagebase().
| std::string LIEF::runtime::Module::name | ( | ) | const |
Name of the module (e.g. libc.so.6, kernel32.dll, libsystem_c.dylib).
Referenced by LIEF::runtime::android::Module::dlsym(), LIEF::runtime::Linux::Module::dlsym(), LIEF::runtime::osx::Module::dlsym(), and LIEF::runtime::windows::Module::dlsym().
| std::string LIEF::runtime::Module::path | ( | ) | const |
Path of the module.
| uint64_t LIEF::runtime::Module::size | ( | ) | const |
Virtual size of the current module.
References size().
Referenced by contains(), dump(), end(), and size().
| std::string LIEF::runtime::Module::to_string | ( | ) | const |