Hex-Rays logo State-of-the-art binary code analysis tools
email icon

Cursor item. More...

#include <hexrays.hpp>

Public Member Functions

void verify (const mba_t *mba) const
 
member_t * get_memptr (struc_t **p_sptr=nullptr) const
 Get pointer to structure member. More...
 
lvar_tget_lvar (void) const
 Get pointer to local variable. More...
 
ea_t get_ea (void) const
 Get address of the current item. More...
 
int get_label_num (int gln_flags) const
 Get label number of the current item. More...
 
bool is_citem (void) const
 Is the current item is a ctree item? More...
 

Public Attributes

cursor_item_type_t citype
 Item type. More...
 
union {
   citem_t *   it
 
   cexpr_t *   e
 VDI_EXPR: Expression. More...
 
   cinsn_t *   i
 VDI_EXPR: Statement. More...
 
   lvar_t *   l
 VDI_LVAR: Local variable. More...
 
   cfunc_t *   f
 VDI_FUNC: Function. More...
 
   treeloc_t   loc
 VDI_TAIL: Line tail. More...
 
}; 
 

Detailed Description

Cursor item.

Information about the item under the cursor

Definition at line 6600 of file hexrays.hpp.

Constructor & Destructor Documentation

◆ ctree_item_t()

ctree_item_t::ctree_item_t ( )

Definition at line 6613 of file hexrays.hpp.

Member Function Documentation

◆ get_ea()

ea_t ctree_item_t::get_ea ( void  ) const

Get address of the current item.

Each ctree item has an address.

Returns
BADADDR if failed

Definition at line 11731 of file hexrays.hpp.

◆ get_label_num()

int ctree_item_t::get_label_num ( int  gln_flags) const

Get label number of the current item.

Parameters
[in]gln_flagsCombination of get_label_num control bits
Returns
-1 if failed or no label

Definition at line 11739 of file hexrays.hpp.

◆ get_lvar()

lvar_t * ctree_item_t::get_lvar ( void  ) const

Get pointer to local variable.

If the current item is a local variable, this function will return pointer to its definition.

Returns
nullptr if failed

Definition at line 11725 of file hexrays.hpp.

◆ get_memptr()

member_t * ctree_item_t::get_memptr ( struc_t **  p_sptr = nullptr) const

Get pointer to structure member.

If the current item is a structure field, this function will return pointer to its definition.

Returns
nullptr if failed
Parameters
[out]p_sptrpointer to the variable where the pointer to the parent structure is returned. This parameter can be nullptr.

Definition at line 11719 of file hexrays.hpp.

◆ is_citem()

bool ctree_item_t::is_citem ( void  ) const

Is the current item is a ctree item?

Examples
hexrays_sample17.cpp, hexrays_sample3.cpp, and hexrays_sample5.cpp.

Definition at line 6654 of file hexrays.hpp.

References VDI_EXPR.

Member Data Documentation

◆ citype

cursor_item_type_t ctree_item_t::citype

Item type.

Examples
hexrays_sample3.cpp.

Definition at line 6602 of file hexrays.hpp.

◆ e

cexpr_t* ctree_item_t::e

VDI_EXPR: Expression.

Examples
hexrays_sample17.cpp, and hexrays_sample5.cpp.

Definition at line 6606 of file hexrays.hpp.

◆ f

cfunc_t* ctree_item_t::f

VDI_FUNC: Function.

Definition at line 6609 of file hexrays.hpp.

◆ i

cinsn_t* ctree_item_t::i

VDI_EXPR: Statement.

Examples
hexrays_sample3.cpp.

Definition at line 6607 of file hexrays.hpp.

◆ it

citem_t* ctree_item_t::it

Definition at line 6605 of file hexrays.hpp.

◆ l

lvar_t* ctree_item_t::l

VDI_LVAR: Local variable.

Definition at line 6608 of file hexrays.hpp.

◆ loc

treeloc_t ctree_item_t::loc

VDI_TAIL: Line tail.

Examples
hexrays_sample3.cpp.

Definition at line 6610 of file hexrays.hpp.