IDA C++ SDK 9.2
Loading...
Searching...
No Matches
lvars_t Struct Reference

Vector of local variables. More...

#include <hexrays.hpp>

Inheritance diagram for lvars_t:
qvector< lvar_t >

Public Member Functions

int find_input_lvar (const vdloc_t &argloc, int _size)
 Find an input variable at the specified location.
int find_input_reg (int reg, int _size=1)
 Find an input register variable.
int hexapi find_stkvar (sval_t spoff, int width)
 Find a stack variable at the specified location.
lvar_t *hexapi find (const lvar_locator_t &ll)
 Find a variable at the specified location.
int hexapi find_lvar (const vdloc_t &location, int width, int defblk=-1) const
 Find a variable at the specified location.
Public Member Functions inherited from qvector< lvar_t >
 qvector (void)
 Constructor.
 ~qvector (void)
 Destructor.
 DEFINE_MEMORY_ALLOCATION_FUNCS () void push_back(const lvar_t &x)
 Append a new element to the end the qvector.
void push_back (lvar_t &&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.
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 lvar_toperator[] (size_t _idx) const
 Allows use of typical c-style array indexing for qvectors.
const lvar_tat (size_t _idx) const
 Get element at index '_idx'.
const lvar_tfront (void) const
 Get the first element in the qvector.
const lvar_tback (void) const
 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< lvar_t > & operator= (const qvector< lvar_t > &x)
 Allow assignment of one qvector to another using '='.
void resize (size_t _newsize, const lvar_t &x)
 Resize to the given size.
void resize_noinit (size_t _newsize)
void grow (const lvar_t &x=lvar_t())
 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< lvar_t > &r) noexcept
 Replace all attributes of this qvector with that of 'r', and vice versa.
lvar_textract (void)
 Empty the qvector and return a pointer to it's contents.
void inject (lvar_t *s, size_t len)
 Populate the qvector with dynamic memory.
bool operator== (const qvector< lvar_t > &r) const
 Allow ability to test the equality of two qvectors using '=='.
bool operator!= (const qvector< lvar_t > &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)
iterator insert (iterator it, const lvar_t &x)
 Insert an element into the qvector at a specified position.
iterator erase (iterator it)
 Remove an element from the qvector.
iterator find (const lvar_t &x)
 Find an element in the qvector.
ssize_t index (const lvar_t &x) const
 Find index of the specified value or return -1.
void add (const lvar_t &x)
 Add an element to the end of the qvector.
bool has (const lvar_t &x) const
 Does the qvector contain x?
bool add_unique (const lvar_t &x)
 Add an element to the end of the qvector - only if it isn't already present.
bool del (const lvar_t &x)
 Find an element and remove it.
const char * dstr (void) const

Additional Inherited Members

Public Types inherited from qvector< lvar_t >
typedef lvar_t value_type
 the type of objects contained in this qvector
typedef lvar_titerator
typedef const lvar_tconst_iterator

Detailed Description

Vector of local variables.

Member Function Documentation

◆ find_input_lvar()

int lvars_t::find_input_lvar ( const vdloc_t & argloc,
int _size )
inline

Find an input variable at the specified location.

Parameters
arglocvariable location
_sizevariable size in bytes
Returns
-1 if failed, otherwise an index into 'vars'

◆ find_input_reg()

int lvars_t::find_input_reg ( int reg,
int _size = 1 )
inline

Find an input register variable.

Parameters
regregister to find
_sizevariable size in bytes
Returns
-1 if failed, otherwise an index into 'vars'

◆ find_stkvar()

int lvars_t::find_stkvar ( sval_t spoff,
int width )
inline

Find a stack variable at the specified location.

Parameters
spoffoffset from the minimal sp
widthvariable size in bytes
Returns
-1 if failed, otherwise an index into 'vars'

◆ find()

lvar_t * lvars_t::find ( const lvar_locator_t & ll)
inline

Find a variable at the specified location.

Parameters
llvariable location
Returns
pointer to variable or nullptr

◆ find_lvar()

int lvars_t::find_lvar ( const vdloc_t & location,
int width,
int defblk = -1 ) const
inline

Find a variable at the specified location.

Parameters
locationvariable location
widthvariable size in bytes
defblkdefinition block of the lvar. -1 means any block
Returns
-1 if failed, otherwise an index into 'vars'

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