IDA C++ SDK 9.2
Loading...
Searching...
No Matches
chain_t Class Reference

ud (use->def) and du (def->use) chain. More...

#include <hexrays.hpp>

Inheritance diagram for chain_t:
qvector< int >

Public Member Functions

 chain_t ()
 chain_t (mopt_t t, sval_t off, int w=1, int v=-1)
 chain_t (const voff_t &_k, int w=1)
void set_value (const chain_t &r)
const voff_tkey () const
bool is_inited () const
bool is_reg () const
bool is_stkoff () const
bool is_replaced () const
bool is_overlapped () const
bool is_fake () const
bool is_passreg () const
bool is_term () const
void set_inited (bool b)
void set_replaced (bool b)
void set_overlapped (bool b)
void set_term (bool b)
mreg_t get_reg () const
sval_t get_stkoff () const
bool overlap (const chain_t &r) const
bool includes (const chain_t &r) const
const voff_t endoff () const
bool operator< (const chain_t &r) const
void hexapi print (qstring *vout) const
const char *hexapi dstr () const
void hexapi append_list (const mba_t *mba, mlist_t *list) const
 Append the contents of the chain to the specified list of locations.
void clear_varnum ()
Public Member Functions inherited from qvector< int >
 qvector (void)
 Constructor.
 qvector (const qvector< int > &x)
 Constructor - creates a new qvector identical to 'x'.
 qvector (qvector< int > &&x) noexcept
 Move constructor.
 ~qvector (void)
 Destructor.
 DEFINE_MEMORY_ALLOCATION_FUNCS () void push_back(const int &x)
 Append a new element to the end the qvector.
void push_back (int &&x)
 Append a new element to the end the qvector with a move semantics.
void emplace_back (Args &&... args)
 Construct and append a new element to the end the qvector with a forwarding semantics.
int & push_back (void)
 Append a new empty element to the end of the qvector.
void pop_back (void)
 Remove the last element in the qvector.
size_t size (void) const
 Get the number of elements in the qvector.
bool empty (void) const
 Does the qvector have 0 elements?
const int & operator[] (size_t _idx) const
 Allows use of typical c-style array indexing for qvectors.
int & operator[] (size_t _idx)
 Allows use of typical c-style array indexing for qvectors.
const int & at (size_t _idx) const
 Get element at index '_idx'.
int & at (size_t _idx)
 Get element at index '_idx'.
const int & front (void) const
 Get the first element in the qvector.
int & front (void)
 Get the first element in the qvector.
const int & back (void) const
 Get the last element in the qvector.
int & back (void)
 Get the last element in the qvector.
void qclear (void)
 Destroy all elements but do not free memory.
void clear (void)
 Destroy all elements and free memory.
qvector< int > & operator= (const qvector< int > &x)
 Allow assignment of one qvector to another using '='.
qvector< int > & operator= (qvector< int > &&x) noexcept
 Move assignment operator.
void resize (size_t _newsize, const int &x)
 Resize to the given size.
void resize (size_t _newsize)
 Same as resize(size_t, const T &), but extra space is filled with empty elements.
void resize_noinit (size_t _newsize)
void grow (const int &x=int())
 Add an element to the end of the qvector, which will be a new T() if x is not given.
size_t capacity (void) const
 Get the number of elements that this qvector can contain - not the same as the number of elements currently in the qvector (size())
void reserve (size_t cnt)
 Increase the capacity of the qvector.
void truncate (void)
 Shrink the capacity down to the current number of elements.
void swap (qvector< int > &r) noexcept
 Replace all attributes of this qvector with that of 'r', and vice versa.
int * extract (void)
 Empty the qvector and return a pointer to it's contents.
void inject (int *s, size_t len)
 Populate the qvector with dynamic memory.
bool operator== (const qvector< int > &r) const
 Allow ability to test the equality of two qvectors using '=='.
bool operator!= (const qvector< int > &r) const
 Allow ability to test equality of two qvectors using '!='.
iterator begin (void)
 Get an iterator that points to the first element in the qvector.
iterator end (void)
 Get an iterator that points to the end of the qvector (NOT the last element)
const_iterator begin (void) const
 Get a const iterator that points to the first element in the qvector.
const_iterator end (void) const
 Get a const iterator that points to the end of the qvector (NOT the last element)
iterator insert (iterator it, const int &x)
 Insert an element into the qvector at a specified position.
iterator insert (iterator it, int &&x)
 Insert an element into the qvector with a move semantics.
iterator insert (iterator it, it2 first, it2 last)
 Insert a several elements to the qvector at a specified position.
iterator erase (iterator it)
 Remove an element from the qvector.
iterator erase (iterator first, iterator last)
 Remove a subset of the qvector.
iterator find (const int &x)
 Find an element in the qvector.
const_iterator find (const int &x) const
 Find an element in the qvector.
ssize_t index (const int &x) const
 Find index of the specified value or return -1.
void add (const int &x)
 Add an element to the end of the qvector.
void add (int &&x)
bool has (const int &x) const
 Does the qvector contain x?
bool add_unique (const int &x)
 Add an element to the end of the qvector - only if it isn't already present.
bool del (const int &x)
 Find an element and remove it.
const char * dstr (void) const

Public Attributes

int width = 0
 size of the value in bytes
int varnum = -1
 allocated variable index (-1 - not allocated yet)
uchar flags
 combination Chain properties bits

Additional Inherited Members

Public Types inherited from qvector< int >
typedef int value_type
 the type of objects contained in this qvector
typedef int * iterator
typedef const int * const_iterator

Detailed Description

ud (use->def) and du (def->use) chain.

We store in chains only the block numbers, not individual instructions See https://en.wikipedia.org/wiki/Use-define_chain

Constructor & Destructor Documentation

◆ chain_t() [1/3]

chain_t::chain_t ( )
inline

◆ chain_t() [2/3]

chain_t::chain_t ( mopt_t t,
sval_t off,
int w = 1,
int v = -1 )
inline

◆ chain_t() [3/3]

chain_t::chain_t ( const voff_t & _k,
int w = 1 )
inline

Member Function Documentation

◆ set_value()

void chain_t::set_value ( const chain_t & r)
inline

◆ key()

const voff_t & chain_t::key ( ) const
inline

◆ is_inited()

bool chain_t::is_inited ( ) const
inline

◆ is_reg()

bool chain_t::is_reg ( ) const
inline

◆ is_stkoff()

bool chain_t::is_stkoff ( ) const
inline

◆ is_replaced()

bool chain_t::is_replaced ( ) const
inline

◆ is_overlapped()

bool chain_t::is_overlapped ( ) const
inline

◆ is_fake()

bool chain_t::is_fake ( ) const
inline

◆ is_passreg()

bool chain_t::is_passreg ( ) const
inline

◆ is_term()

bool chain_t::is_term ( ) const
inline

◆ set_inited()

void chain_t::set_inited ( bool b)
inline

◆ set_replaced()

void chain_t::set_replaced ( bool b)
inline

◆ set_overlapped()

void chain_t::set_overlapped ( bool b)
inline

◆ set_term()

void chain_t::set_term ( bool b)
inline

◆ get_reg()

mreg_t chain_t::get_reg ( ) const
inline

◆ get_stkoff()

sval_t chain_t::get_stkoff ( ) const
inline

◆ overlap()

bool chain_t::overlap ( const chain_t & r) const
inline

◆ includes()

bool chain_t::includes ( const chain_t & r) const
inline

◆ endoff()

const voff_t chain_t::endoff ( ) const
inline

◆ operator<()

bool chain_t::operator< ( const chain_t & r) const
inline

◆ print()

void chain_t::print ( qstring * vout) const
inline

◆ dstr()

const char * chain_t::dstr ( void ) const
inline

◆ append_list()

void chain_t::append_list ( const mba_t * mba,
mlist_t * list ) const
inline

Append the contents of the chain to the specified list of locations.

◆ clear_varnum()

void chain_t::clear_varnum ( )
inline

Member Data Documentation

◆ width

int chain_t::width = 0

size of the value in bytes

◆ varnum

int chain_t::varnum = -1

allocated variable index (-1 - not allocated yet)

◆ flags

uchar chain_t::flags

combination Chain properties bits


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