State-of-the-art binary code analysis tools
block_chains_t Class Reference

Chains of one block. More...

Public Member Functions

const chain_tget_reg_chain (mreg_t reg, int width=1) const
 Get chain for the specified register. More...
 
chain_tget_reg_chain (mreg_t reg, int width=1)
 
const chain_tget_stk_chain (sval_t off, int width=1) const
 Get chain for the specified stack offset. More...
 
chain_tget_stk_chain (sval_t off, int width=1)
 
const chain_tget_chain (const voff_t &k, int width=1) const
 Get chain for the specified value offset. More...
 
chain_tget_chain (const voff_t &k, int width=1)
 
const chain_tget_chain (const chain_t &ch) const
 Get chain similar to the specified chain. More...
 
chain_tget_chain (const chain_t &ch)
 
void print (qstring *vout) const
 
const char * dstr (void) const
 

Detailed Description

Chains of one block.

Please note that this class is based on std::map and it must be accessed using the block_chains_begin(), block_chains_find() and similar functions. This is required because different compilers use different implementations of std::map. However, since the size of std::map depends on the compilation options, we replace it with a byte array.

Examples
hexrays_sample12.cpp, and hexrays_sample18.cpp.

Definition at line 3351 of file hexrays.hpp.

Member Function Documentation

◆ get_chain() [1/2]

const chain_t* block_chains_t::get_chain ( const voff_t k,
int  width = 1 
) const

Get chain for the specified value offset.

Parameters
kvalue offset (register number or stack offset)
widthsize of value in bytes
Examples
hexrays_sample12.cpp.

Definition at line 3375 of file hexrays.hpp.

◆ get_chain() [2/2]

const chain_t * block_chains_t::get_chain ( const chain_t ch) const

Get chain similar to the specified chain.

Parameters
chchain to search for. only its 'k' and 'width' are used.

Definition at line 10679 of file hexrays.hpp.

◆ get_reg_chain()

const chain_t* block_chains_t::get_reg_chain ( mreg_t  reg,
int  width = 1 
) const

Get chain for the specified register.

Parameters
regregister number
widthsize of register in bytes

Definition at line 3359 of file hexrays.hpp.

References mop_r.

◆ get_stk_chain()

const chain_t* block_chains_t::get_stk_chain ( sval_t  off,
int  width = 1 
) const

Get chain for the specified stack offset.

Parameters
offstack offset
widthsize of stack value in bytes

Definition at line 3367 of file hexrays.hpp.

References mop_S.