Go to the documentation of this file.
15#ifndef LIEF_ASM_ENGINE_H
16#define LIEF_ASM_ENGINE_H
35 public:
using instructions_it = iterator_range<Instruction::Iterator>;
40 Engine(std::unique_ptr<details::Engine> impl);
46 Engine& operator=(Engine&&) noexcept;
47 instructions_it disassemble(const uint8_t* buffer,
size_t size, uint64_t addr);
51 instructions_it disassemble(const std::vector<uint8_t>& bytes, uint64_t addr) {
55 return disassemble(bytes.data(), bytes.size(), addr);
58 std::vector<uint8_t>
assemble(uint64_t address,
const std::string& Asm);
59 std::vector<uint8_t>
assemble(uint64_t address,
const std::string& Asm,
63 LIEF_LOCAL const details::Engine& impl()
const {
66 assert(impl_ !=
nullptr);
72 assert(impl_ !=
nullptr);
77 std::unique_ptr<details::Engine> impl_;
Abstract binary that exposes an uniform API for the different executable file formats.
Definition Abstract/Binary.hpp:49
This class interfaces the assembler/disassembler support.
Definition Engine.hpp:34
Engine(const Engine &)=delete
Engine & operator=(const Engine &)=delete
std::vector< uint8_t > assemble(uint64_t address, const std::string &Asm, LIEF::Binary &bin)
Engine(std::unique_ptr< details::Engine > impl)
Engine(Engine &&) noexcept
std::vector< uint8_t > assemble(uint64_t address, const std::string &Asm)
Namespace related to assembly/disassembly support.
Definition Abstract/Binary.hpp:43
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42