opdis_insn_t Struct Reference
[Data Model]

Instruction object. More...

#include <model.h>

Data Fields

enum opdis_insn_decode_t status
char * ascii
opdis_off_t offset
opdis_vma_t vma
opdis_off_t size
opdis_byte_tbytes
opdis_off_t num_prefixes
char * prefixes
char * mnemonic
enum opdis_insn_cat_t category
enum opdis_insn_subset_t isa
union {
   enum opdis_cflow_flag_t   cflow
   enum opdis_stack_flag_t   stack
   enum opdis_io_flag_t   io
   enum opdis_bit_flag_t   bit
flags
char * comment
opdis_off_t num_operands
opdis_off_t alloc_operands
opdis_op_t ** operands
opdis_op_ttarget
opdis_op_tdest
opdis_op_tsrc
unsigned char fixed_size
unsigned char ascii_sz
unsigned char mnemonic_sz

Detailed Description

Instruction object.

A disassembled instruction. Depending on the decoder, some or all of the fields will be set. The status field specifies what information is present.

Note:
The ascii field always contains the raw libopcodes output for the instruction.
The offset field is always set to the offset of the instruction in the buffer. By default, the vma field will be set to the value in offset. The OPDIS_HANDLER callback can set vma to the load address of the instruction.
For instructions allocated by opdis_insn_alloc, num_operands and alloc_operands will be the same. For instructions allocated by opdis_insn_alloc_fixed, num_operands will contain the number of operands in the instruction, and alloc_operands will contain the number of fixed_size operands that have been allocated.
See also:
opdis_op_t

Field Documentation

Number of allocated operands

String representation of insn

unsigned char opdis_insn_t::ascii_sz

Size of fixed ascii field

Bitwise insn flags

Array of insn bytes

Type of insn opcode

Control flow insn flags

Comment or hint from libopcodes

Destination operand

unsigned char opdis_insn_t::fixed_size

Is insn of a fixed size? 0 or 1

union { ... } opdis_insn_t::flags

Instruction-specific flags

IO Port insn flags

Subset of ISA for insn opcode

ASCII mnemonic for insn opcode

Size of fixed mnemonic field

Number of operands in insn

Number of prefixes in insn

Offset of instruction in buffer

Array of operand objects

Array of prefix strings

Size (# bytes) of insn

Source operand

Stack insn flags

Result of decoding

Branch target

Virtual memory address of insn


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

Generated on Wed Mar 10 14:30:46 2010 for Opdis Disassembly Library by  doxygen 1.6.1