IDA SDK

- Main Page
- Header Files
- Classes
- Modules

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Attributes | List of all members
funcset_t Struct Reference

## Detailed Description

Describes an array of IDC functions.

## Public Attributes
int | qnty
| Number of functions.
extfun_t * | f
| Function table.
IDC Engine
IDC engine requires the following functions (all of them may be NULL)
error_t(idaapi * | startup )(void)
| Start IDC engine. Called before executing any IDC code.
error_t(idaapi * | shutdown )(void)
| Stop IDC engine. More...
void(idaapi * | init_idc )(void)
| Initialize IDC engine. More...
void(idaapi * | term_idc )(void)
| Terminate IDC engine. Called once at the very end of work.
bool(idaapi * | is_database_open )(void)
| Is the database open? (used for EXTFUN_BASE functions). More...
size_t(idaapi * | ea2str )(ea_t ea, char *buf, size_t bufsize)
| Convert an address to a string. More...
bool(idaapi * | undeclared_variable_ok )(const char *name)
| Should a variable name be accepted without declaration?. More...
Indexes
Indexes into the 'f' array. non-positive values mean that the function does not exist
int | get_unkvar
| Retrieve value of an undeclared variable. More...
int | set_unkvar
| Store a value to an undeclared variable. More...
int | exec_resolved_func
| Execute resolved function. More...
int | calc_sizeof
| Calculate sizeof(type). More...
int | get_field_ea
| Get address of the specified field using the type information from the idb. More...

## Member Data Documentation

error_t(idaapi * funcset_t::shutdown) (void)

Stop IDC engine.

Called when all IDC engines finish. In other words, nested IDC engines do not call startup/shutdown.

void(idaapi * funcset_t::init_idc) (void)

Initialize IDC engine.

Called once at the very beginning of work. This callback may create additional IDC classes, methods, etc.

bool(idaapi * funcset_t::is_database_open) (void)

Is the database open? (used for EXTFUN_BASE functions).

if this pointer is NULL, EXTFUN_BASE is not checked.

size_t(idaapi * funcset_t::ea2str) (ea_t ea, char *buf, size_t bufsize)

Convert an address to a string.

if this pointer is NULL, 'a' will be used.

bool(idaapi * funcset_t::undeclared_variable_ok) (const char *name)

Should a variable name be accepted without declaration?.

When the parser encounters an unrecognized variable, this callback is called. If it returns false, the parser generates the 'undefined variable' error else the parser generates code to call to a set or get function, depending on the current context. If this pointer is NULL, undeclared variables won't be supported. However, if 'getname' function is provided to the parser, it will be used to resolve such names to constants at the compilation time. This callback is used by IDA to handle processor register names.

int funcset_t::get_unkvar

Retrieve value of an undeclared variable.

Expected prototype: get(VT_STR2 varname)

int funcset_t::set_unkvar

Store a value to an undeclared variable.

Expected prototype: set(VT_WILD new_value, VT_STR2 varname)

int funcset_t::exec_resolved_func

Execute resolved function.

If 'getname' was used to resolve an unknown name to a constant in a function call context, such a call will be redirected here. Expected prototype: exec_resolved_func(VT_LONG func, VT_WILD typeinfo, ...) This callback is used in IDA for Appcall.

int funcset_t::calc_sizeof

Calculate sizeof(type).

This function is used by the interpreter to calculate sizeof() expressions. Please note that the 'type' argument is an IDC object of typeinfo class. Expected prototype: calc_sizeof(VT_OBJ typeinfo) This callback requires support of the type system (available only in IDA kernel) It should not be used by standalone IDC interpreters.

int funcset_t::get_field_ea

Get address of the specified field using the type information from the idb.

This function is used to resolve expressions like 'mystr.field' where mystr does not represent an IDC object but just a plain number. The number is interpreted as an address in the current idb. This function retrieves type information at this address and tried to find the specified 'field'. It returns the address of the 'field' in the idb. This callback should not be used by standalone IDC interpreters.

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

- expr.hpp