Go to the documentation of this file.
15#ifndef LIEF_ASM_INST_H
16#define LIEF_ASM_INST_H
35 class Iterator final :
36 public iterator_facade_base<Iterator, std::forward_iterator_tag, std::unique_ptr<Instruction>,
37 std::ptrdiff_t, Instruction*, std::unique_ptr<Instruction>>
40 using implementation = details::InstructionIt;
47 LIEF_API Iterator& operator=(Iterator&&) noexcept;
53 friend
LIEF_API bool operator==(const Iterator& LHS, const Iterator& RHS);
55 friend
bool operator!=(const Iterator& LHS, const Iterator& RHS) {
62 std::unique_ptr<details::InstructionIt> impl_;
68 create(std::unique_ptr<details::Instruction> impl);
77 const std::vector<uint8_t>&
raw()
const;
93 Instruction(std::unique_ptr<details::Instruction> impl);
94 std::unique_ptr<details::Instruction> impl_;
Iterator & operator=(const Iterator &)
Iterator(Iterator &&) noexcept
Iterator(const Iterator &)
std::unique_ptr< Instruction > operator*() const
Iterator(std::unique_ptr< details::InstructionIt > impl)
This class represents an assembly instruction.
Definition Instruction.hpp:33
std::string mnemonic() const
Instruction mnemonic (e.g. br)
std::string to_string() const
Representation of the current instruction in a pretty assembly way.
uint64_t address() const
Address of the instruction.
const std::vector< uint8_t > & raw() const
Raw bytes of the current instruction.
friend std::ostream & operator<<(std::ostream &os, const Instruction &inst)
Definition Instruction.hpp:87
size_t size() const
Size of the instruction in bytes.
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