IDA SDK
Modules | Classes | Functions
Register variables

Detailed Description

Definition of regvar_t and related functions.

Modules

 Register variable error codes
 Return values for functions in described in Register variables.
 

Classes

struct  regvar_t
 A register variable allows the user to rename a general processor register to a meaningful name. More...
 

Functions

idaman int ida_export add_regvar (func_t *pfn, ea_t ea1, ea_t ea2, const char *canon, const char *user, const char *cmt)
 Define a register variable. More...
 
idaman regvar_t *ida_export find_regvar (func_t *pfn, ea_t ea1, ea_t ea2, const char *canon, const char *user)
 Find a register variable definition (powerful version). More...
 
regvar_tfind_regvar (func_t *pfn, ea_t ea, const char *canon)
 Find a register variable definition. More...
 
idaman int ida_export rename_regvar (func_t *pfn, regvar_t *v, const char *user)
 Rename a register variable. More...
 
idaman int ida_export set_regvar_cmt (func_t *pfn, regvar_t *v, const char *cmt)
 Set comment for a register variable. More...
 
idaman int ida_export del_regvar (func_t *pfn, ea_t ea1, ea_t ea2, const char *canon)
 Delete a register variable definition. More...
 

Function Documentation

idaman int ida_export add_regvar ( func_t pfn,
ea_t  ea1,
ea_t  ea2,
const char *  canon,
const char *  user,
const char *  cmt 
)

Define a register variable.

Parameters
pfnfunction in which the definition will be created
ea1,ea2range of addresses within the function where the definition will be used
canonname of a general register
useruser-defined name for the register
cmtcomment for the definition
Returns
Register variable error codes
idaman regvar_t* ida_export find_regvar ( func_t pfn,
ea_t  ea1,
ea_t  ea2,
const char *  canon,
const char *  user 
)

Find a register variable definition (powerful version).

One of 'canon' and 'user' should be NULL.

Parameters
pfnfunction in question
ea1,ea2range of addresses to search. ea1==BADADDR means the entire function
canonname of a general register
useruser-defined name for the register
Returns
NULL-not found, otherwise ptr to regvar_t
regvar_t* find_regvar ( func_t pfn,
ea_t  ea,
const char *  canon 
)
inline

Find a register variable definition.

Parameters
pfnfunction in question
eacurrent address
canonname of a general register
Returns
NULL-not found, otherwise ptr to regvar_t
idaman int ida_export rename_regvar ( func_t pfn,
regvar_t v,
const char *  user 
)

Rename a register variable.

Parameters
pfnfunction in question
vvariable to rename
usernew user-defined name for the register
Returns
Register variable error codes
idaman int ida_export set_regvar_cmt ( func_t pfn,
regvar_t v,
const char *  cmt 
)

Set comment for a register variable.

Parameters
pfnfunction in question
vvariable to rename
cmtnew comment
Returns
Register variable error codes
idaman int ida_export del_regvar ( func_t pfn,
ea_t  ea1,
ea_t  ea2,
const char *  canon 
)

Delete a register variable definition.

Parameters
pfnfunction in question
ea1,ea2range of addresses within the function where the definition holds
canonname of a general register
Returns
Register variable error codes