|
LIEF: Library to Instrument Executable Formats Version 1.0.0
|
Namespaces | |
| namespace | android |
| namespace | details |
| namespace | Linux |
| namespace | osx |
| namespace | windows |
Classes | |
| class | Host |
| This class represents the current host. More... | |
| class | Memory |
| This class exposes API to access and manage memory. More... | |
| class | Module |
| This class represents an in-memory module which can be an executable or a library. More... | |
| class | Process |
| This structure represents the current process and provides functions to query process-level information. More... | |
Typedefs | |
| using | instructions_it = iterator_range<assembly::Instruction::Iterator> |
| using | modules_t = iterator_range<Module::Iterator> |
Enumerations | |
| enum class | PLATFORMS : uint32_t { NONE = 0 , LINUX , WINDOWS , ANDROID_ , OSX , IOS } |
| enum class | ARCH : uint32_t { NONE , X86_64 , ARM64 , RISCV64 } |
Functions | |
| std::vector< uint8_t > | assemble (uint64_t addr, const std::string &Asm, assembly::AssemblerConfig &config=assembly::AssemblerConfig::default_config()) |
| Assemble the provided assembly code at the specified (absolute) virtual address. | |
| std::vector< uint8_t > | assemble (uint64_t address, const llvm::MCInst &inst) |
| Assemble the provided LLVM MCInst instruction at the specified (absolute) virtual address and return the generated assembly bytes. | |
| std::vector< uint8_t > | assemble (uint64_t address, const std::vector< llvm::MCInst > &insts) |
| Assemble the provided sequence of LLVM MCInst instructions at the specified (absolute) virtual address and return the generated assembly bytes. | |
| instructions_it | disassemble (uintptr_t addr) |
| Start disassembling instructions at the given absolute virtual address. | |
| modules_t | modules () |
| Return an iterator over the different modules loaded in the current process. | |
| std::unique_ptr< Module > | module_from_name (const std::string &name) |
| Find the module with the given name. | |
| std::unique_ptr< Module > | module_from_path (const std::string &path) |
| Find the module with the given path. | |
| std::unique_ptr< Module > | module_from_addr (uintptr_t addr) |
| Find the module that encompasses the given virtual address (absolute). | |
|
strong |
|
strong |
| std::vector< uint8_t > LIEF::runtime::assemble | ( | uint64_t | addr, |
| const std::string & | Asm, | ||
| assembly::AssemblerConfig & | config = assembly::AssemblerConfig::default_config() ) |
Assemble the provided assembly code at the specified (absolute) virtual address.
The function returns the generated assembly bytes.
If you need to configure the assembly engine or to define addresses for symbols, you can provide your own assembly::AssemblerConfig instance.
References LIEF::assembly::AssemblerConfig::default_config(), and LIEF_API.
| std::vector< uint8_t > LIEF::runtime::assemble | ( | uint64_t | address, |
| const llvm::MCInst & | inst ) |
Assemble the provided LLVM MCInst instruction at the specified (absolute) virtual address and return the generated assembly bytes.
References LIEF_API.
| std::vector< uint8_t > LIEF::runtime::assemble | ( | uint64_t | address, |
| const std::vector< llvm::MCInst > & | insts ) |
Assemble the provided sequence of LLVM MCInst instructions at the specified (absolute) virtual address and return the generated assembly bytes.
References LIEF_API.
| instructions_it LIEF::runtime::disassemble | ( | uintptr_t | addr | ) |
Start disassembling instructions at the given absolute virtual address.
References LIEF_API.
|
inline |
Find the module that encompasses the given virtual address (absolute).
References module_from_addr(), and modules().
Referenced by module_from_addr().
|
inline |
Find the module with the given name.
References module_from_name(), and modules().
Referenced by module_from_name().
|
inline |
Find the module with the given path.
References module_from_path(), and modules().
Referenced by module_from_path().
| modules_t LIEF::runtime::modules | ( | ) |
Return an iterator over the different modules loaded in the current process.
References LIEF_API, and modules().
Referenced by module_from_addr(), module_from_name(), module_from_path(), and modules().