Definition of a local variable (register or stack). More...
Public Member Functions | |
| lvar_t (const qstring &n, uint32 l, ea_t e, const typestring &t, int w, int db) | |
| lvar_t (mreg_t reg, int width, const type_t *type, int nblock, ea_t defea) | |
| bool | used (void) const |
| Is the variable used in the code? | |
| bool | typed (void) const |
| Has the variable a type? | |
| bool | mreg_done (void) const |
| Have corresponding microregs been replaced by references to this variable? | |
| bool | has_nice_name (void) const |
| Does the variable have a nice name? | |
| bool | is_unknown_width (void) const |
| Do we know the width of the variable? | |
| bool | has_user_info (void) const |
| Has any user-defined information? | |
| bool | has_user_name (void) const |
| Has user-defined name? | |
| bool | has_user_type (void) const |
| Has user-defined type? | |
| bool | is_result_var (void) const |
| Is the function result? | |
| bool | is_arg_var (void) const |
| Is the function argument? | |
| bool | is_promoted_arg (void) const |
| Is the promoted function argument? | |
| bool | is_fake_var (void) const |
| Is fake return variable? | |
| bool | is_overlapped_var (void) const |
| Is overlapped variable? | |
| bool | is_floating_var (void) const |
| Used by a fpu insn? | |
| bool | is_spoiled_var (void) const |
| Is spoiled var? (meaningful only during lvar allocation). | |
| bool | is_mapdst_var (void) const |
| Other variable(s) map to this var? | |
| void | set_used (void) |
| void | clear_used (void) |
| void | set_typed (void) |
| void | set_non_typed (void) |
| void | clr_user_info (void) |
| void | set_user_name (void) |
| void | set_user_type (void) |
| void | clr_user_type (void) |
| void | clr_user_name (void) |
| void | set_mreg_done (void) |
| void | clr_mreg_done (void) |
| void | set_unknown_width (void) |
| void | clr_unknown_width (void) |
| void | set_arg_var (void) |
| void | clr_arg_var (void) |
| void | set_fake_var (void) |
| void | clr_fake_var (void) |
| void | set_overlapped_var (void) |
| void | clr_overlapped_var (void) |
| void | set_floating_var (void) |
| void | clr_floating_var (void) |
| void | set_spoiled_var (void) |
| void | clr_spoiled_var (void) |
| void | set_mapdst_var (void) |
| void | clr_mapdst_var (void) |
| void | set_reg_name (const char *n) |
| bool | has_common (const lvar_t &v) const |
| Do variables overlap? | |
| bool | has_common_bit (argloc_t loc, asize_t width2) const |
| Does the variable overlap with the specified location? | |
| const typestring & | type (void) const |
| Get variable type. | |
| bool | accepts_type (const typestring &t) |
| Check if the variable accept the specified type. | |
| void | force_lvar_type (const typestring &t) |
| Set variable type without any validation. | |
| void | set_lvar_type (const typestring &t) |
| Set variable type If the type is inacceptable, interr is generated. | |
| void | set_final_lvar_type (const typestring &t) |
| Set final variable type. | |
| void | set_width (int w, bool is_float=false) |
| Change the variable width. | |
Public Attributes | |
| qstring | name |
| variable name. | |
| qstring | cmt |
| variable comment string | |
| typestring | _type |
| variable type | |
| int | width |
| variable size in bytes | |
| int | defblk |
| first block defining the variable. | |
| uint64 | divisor |
| max known divisor of the variable | |
Friends | |
| class | mbl_array_t |
Definition of a local variable (register or stack).
Definition at line 546 of file hexrays.hpp.
| bool lvar_t::accepts_type | ( | const typestring & | t | ) |
Check if the variable accept the specified type.
Some types are forbidden (void, function types, wrong arrays, etc)
Definition at line 4128 of file hexrays.hpp.
References hexdsp.
| void lvar_t::set_lvar_type | ( | const typestring & | t | ) |
Set variable type If the type is inacceptable, interr is generated.
Definition at line 4134 of file hexrays.hpp.
References hexdsp.
| void lvar_t::set_width | ( | int | w, | |
| bool | is_float = false | |||
| ) |
Change the variable width.
This function also changes the variable type.
Definition at line 4140 of file hexrays.hpp.
References hexdsp.
| int lvar_t::defblk |
first block defining the variable.
0 for args, -1 if unknown
Definition at line 576 of file hexrays.hpp.
| qstring lvar_t::name |
variable name.
use mbl_array_t::set_nice_lvar_name() and mbl_array_t::set_user_lvar_name() to modify it
Definition at line 570 of file hexrays.hpp.