This class interfaces the assembler/disassembler support.
Public Types
Disassembly instruction iterator.
Public Functions
Disassemble the provided buffer with the address specified in the second parameter.
Disassemble the given vector of bytes with the address specified in the second parameter.
This class represents an assembly instruction.
Subclassed by LIEF::assembly::aarch64::Instruction, LIEF::assembly::arm::Instruction, LIEF::assembly::ebpf::Instruction, LIEF::assembly::mips::Instruction, LIEF::assembly::powerpc::Instruction, LIEF::assembly::riscv::Instruction, LIEF::assembly::x86::Instruction
Public Functions
Address of the instruction.
Size of the instruction in bytes.
Raw bytes of the current instruction.
Instruction mnemonic (e.g. br
)
Representation of the current instruction in a pretty assembly way.
True if the instruction is a call.
True if the instruction marks the end of a basic block.
True if the instruction is a branch.
True if the instruction is a syscall.
This function can be used to down cast an Instruction instance:
std::unique_ptr<assembly::Instruction> inst = get_inst();
if (const auto* arm = inst->as<assembly::arm::Instruction>()) {
const arm::OPCODE op = arm->opcode();
}
Friends
Lazy-forward iterator that outputs Instruction
Public Types
Public Functions
Disassemble and output an Instruction at the current iterator’s position.