State-of-the-art binary code analysis tools
Functions: manipulate data bits

Detailed Description

Parameters
ealinear address
lengthsize of array in bytes. should be divisible by the size of one item of the specified type.
Returns
success

Functions

idaman bool ida_export create_data (ea_t ea, flags_t dataflag, asize_t size, tid_t tid)
 Convert to data (byte, word, dword, etc). More...
 
THREAD_SAFE flags_t idaapi calc_dflags (flags_t f, bool force)
 
bool idaapi create_byte (ea_t ea, asize_t length, bool force=false)
 Convert to byte.
 
bool idaapi create_word (ea_t ea, asize_t length, bool force=false)
 Convert to word.
 
bool idaapi create_dword (ea_t ea, asize_t length, bool force=false)
 Convert to dword.
 
bool idaapi create_qword (ea_t ea, asize_t length, bool force=false)
 Convert to quadword.
 
bool idaapi create_oword (ea_t ea, asize_t length, bool force=false)
 Convert to octaword/xmm word.
 
bool idaapi create_yword (ea_t ea, asize_t length, bool force=false)
 Convert to ymm word.
 
bool idaapi create_zword (ea_t ea, asize_t length, bool force=false)
 Convert to zmm word.
 
bool idaapi create_tbyte (ea_t ea, asize_t length, bool force=false)
 Convert to tbyte.
 
bool idaapi create_float (ea_t ea, asize_t length, bool force=false)
 Convert to float.
 
bool idaapi create_double (ea_t ea, asize_t length, bool force=false)
 Convert to double.
 
bool idaapi create_packed_real (ea_t ea, asize_t length, bool force=false)
 Convert to packed decimal real.
 
bool idaapi create_struct (ea_t ea, asize_t length, tid_t tid, bool force=false)
 Convert to struct.
 
bool idaapi create_custdata (ea_t ea, asize_t length, int dtid, int fid, bool force=false)
 Convert to custom data type.
 
idaman bool ida_export create_align (ea_t ea, asize_t length, int alignment)
 Create an alignment item. More...
 
idaman int ida_export calc_min_align (asize_t length)
 Calculate the minimal possible alignment exponent. More...
 
idaman int ida_export calc_max_align (ea_t endea)
 Calculate the maximal possible alignment exponent. More...
 
idaman int ida_export calc_def_align (ea_t ea, int mina, int maxa)
 Calculate the default alignment exponent. More...
 
idaman bool ida_export create_16bit_data (ea_t ea, asize_t length)
 Convert to 16-bit quantity (take the byte size into account)
 
idaman bool ida_export create_32bit_data (ea_t ea, asize_t length)
 Convert to 32-bit quantity (take the byte size into account)
 

Function Documentation

◆ create_data()

idaman bool ida_export create_data ( ea_t  ea,
flags_t  dataflag,
asize_t  size,
tid_t  tid 
)

Convert to data (byte, word, dword, etc).

This function may be used to create arrays.

Parameters
ealinear address
dataflagtype of data. Value of function byte_flag(), word_flag(), etc.
sizesize of array in bytes. should be divisible by the size of one item of the specified type. for variable sized items it can be specified as 0, and the kernel will try to calculate the size.
tidtype id. If the specified type is a structure, then tid is structure id. Otherwise should be BADNODE.
Returns
success

◆ create_align()

idaman bool ida_export create_align ( ea_t  ea,
asize_t  length,
int  alignment 
)

Create an alignment item.

Parameters
ealinear address
lengthsize of the item in bytes. 0 means to infer from ALIGNMENT
alignmentalignment exponent. Example: 3 means align to 8 bytes. 0 means to infer from LENGTH It is forbidden to specify both LENGTH and ALIGNMENT as 0.
Returns
success

◆ calc_min_align()

idaman int ida_export calc_min_align ( asize_t  length)

Calculate the minimal possible alignment exponent.

Parameters
lengthsize of the item in bytes.
Returns
a value in the 1..32 range

◆ calc_max_align()

idaman int ida_export calc_max_align ( ea_t  endea)

Calculate the maximal possible alignment exponent.

Parameters
endeaend address of the alignment item.
Returns
a value in the 0..32 range

◆ calc_def_align()

idaman int ida_export calc_def_align ( ea_t  ea,
int  mina,
int  maxa 
)

Calculate the default alignment exponent.

Parameters
ealinear address
minaminimal possible alignment exponent.
maxaminimal possible alignment exponent.