IDA Domain
Instructions Class Reference

Provides access to instruction-related operations. More...

#include <instruction.hpp>

Classes

class  Iterator
 Iterator for instructions within a specified address range. More...
 

Public Member Functions

 Instructions (const Database &database)
 Constructs an instructions handler for the given database. More...
 
bool is_valid (const insn_t &insn) const
 Checks if the given instruction is valid. More...
 
std::pair< bool, insn_t > decode (ea_t ea) const
 Decodes the instruction at the specified address. More...
 
std::pair< bool, std::string > get_disassembly (const insn_t &insn) const
 Retrieves the disassembled string representation of the given instruction. More...
 
Iterator get_between (const ea_t start, const ea_t end) const
 Retrieves instructions between the specified addresses. More...
 

Detailed Description

Provides access to instruction-related operations.

Constructor & Destructor Documentation

◆ Instructions()

Instructions::Instructions ( const Database database)
inline

Constructs an instructions handler for the given database.

Parameters
databaseReference to the active IDA database.

Member Function Documentation

◆ decode()

std::pair<bool, insn_t> Instructions::decode ( ea_t  ea) const

Decodes the instruction at the specified address.

Parameters
eaThe effective address of the instruction.
Returns
A pair <bool, insn_t>. The bool indicates success; if false, the instruction is invalid.

◆ get_between()

Iterator Instructions::get_between ( const ea_t  start,
const ea_t  end 
) const
inline

Retrieves instructions between the specified addresses.

Parameters
startStart of the address range.
endEnd of the address range.
Returns
An instruction iterator.

◆ get_disassembly()

std::pair<bool, std::string> Instructions::get_disassembly ( const insn_t &  insn) const

Retrieves the disassembled string representation of the given instruction.

Parameters
insnThe instruction to disassemble.
Returns
A pair <bool, string>. If disassembly fails, the bool is false.

◆ is_valid()

bool Instructions::is_valid ( const insn_t &  insn) const

Checks if the given instruction is valid.

Parameters
insnThe instruction to validate.
Returns
true if the instruction is valid, false otherwise.

The documentation for this class was generated from the following file: