IDA SDK

- Main Page
- Header Files
- Classes
- Modules

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

Public Attributes | List of all members
extlang_t Struct Reference

## Detailed Description

External language (to support third party language interpreters)

## Public Attributes
size_t | size
| Size of this structure.
uint32 | flags
| Language features, currently 0.
const char * | name
| Language name.
bool(idaapi * | compile )(const char *name, ea_t current_ea, const char *expr, char *errbuf, size_t errbufsize)
| Compile an expression. More...
bool(idaapi * | run )(const char *name, int nargs, const idc_value_t args[], idc_value_t *result, char *errbuf, size_t errbufsize)
| Evaluate a previously compiled expression. More...
bool(idaapi * | calcexpr )(ea_t current_ea, const char *expr, idc_value_t *rv, char *errbuf, size_t errbufsize)
| Compile and evaluate an expression. More...
bool(idaapi * | compile_file )(const char *file, char *errbuf, size_t errbufsize)
| Compile (load) a file. More...
const char * | fileext
| File name extension for the language.
bool(idaapi * | create_object )(const char *name, int nargs, const idc_value_t args[], idc_value_t *result, char *errbuf, size_t errbufsize)
| Create an object instance. More...
bool(idaapi * | get_attr )(const idc_value_t *obj, const char *attr, idc_value_t *result)
| Returns the attribute value of a given object from the global scope. More...
bool(idaapi * | set_attr )(idc_value_t *obj, const char *attr, idc_value_t *value)
| Sets the attribute value of a given object in the global scope. More...
bool(idaapi * | call_method )(const idc_value_t *obj, const char *name, int nargs, const idc_value_t args[], idc_value_t *result, char *errbuf, size_t errbufsize)
| Calls a member function. More...
bool(idaapi * | run_statements )(const char *str, char *errbuf, size_t errbufsize)
| Compile and execute a string with statements. More...
bool(idaapi * | load_procmod )(const char *file, idc_value_t *procobj, char *errbuf, size_t errbufsize)
| Compile (load) a file with processor module. More...
bool(idaapi * | unload_procmod )(const char *file, char *errbuf, size_t errbufsize)
| Unload previously loaded processor module. More...
syntax_highlighter_t * | highlighter

## Member Data Documentation

bool(idaapi * extlang_t::compile) (const char *name, ea_t current_ea, const char *expr, char *errbuf, size_t errbufsize)

Compile an expression.

Parameters

  | name | name of the function which will hold the compiled expression
  | current_ea | current address. if unknown then BADADDR
  | expr | expression to compile
  [out] | errbuf | error message if compilation fails
  | errbufsize | size of the error buffer

Returns
  success

bool(idaapi * extlang_t::run) (const char *name, int nargs, const idc_value_t args[], idc_value_t *result, char *errbuf, size_t errbufsize)

Evaluate a previously compiled expression.

Parameters

  | name | function to run
  | nargs | number of input arguments
  | args | input arguments
  [out] | result | function result or exception
  [out] | errbuf | error message if evaluation fails
  | errbufsize | size of the error buffer

Returns
  success

bool(idaapi * extlang_t::calcexpr) (ea_t current_ea, const char *expr, idc_value_t *rv, char *errbuf, size_t errbufsize)

Compile and evaluate an expression.

Parameters

  | current_ea | current address. if unknown then BADADDR
  | expr | expression to evaluate
  [out] | rv | expression value or exception
  [out] | errbuf | error message if evaluation fails
  | errbufsize | size of the error buffer

Returns
  success

bool(idaapi * extlang_t::compile_file) (const char *file, char *errbuf, size_t errbufsize)

Compile (load) a file.

Parameters

  | file | file name
  [out] | errbuf | error message if compilation fails
  | errbufsize | size of the error buffer

bool(idaapi * extlang_t::create_object) (const char *name, int nargs, const idc_value_t args[], idc_value_t *result, char *errbuf, size_t errbufsize)

Create an object instance.

Parameters

  name | object class name
  nargs | number of input arguments
  args | input arguments
  result | created object or exception
  errbuf | error message if evaluation fails
  errbufsize | size of the error buffer

Returns
  success

bool(idaapi * extlang_t::get_attr) (const idc_value_t *obj, const char *attr, idc_value_t *result)

Returns the attribute value of a given object from the global scope.

Parameters

  | obj | object (may be NULL)
  | attr | attribute name. if NULL or empty string then the object instance name (i.e. class name) should be returned.
  [out] | result | attribute value

Returns
  success

bool(idaapi * extlang_t::set_attr) (idc_value_t *obj, const char *attr, idc_value_t *value)

Sets the attribute value of a given object in the global scope.

Parameters

  obj | object (may be NULL)
  attr | attribute name
  value | attribute value

Returns
  success

bool(idaapi * extlang_t::call_method) (const idc_value_t *obj, const char *name, int nargs, const idc_value_t args[], idc_value_t *result, char *errbuf, size_t errbufsize)

Calls a member function.

Parameters

  | obj | object instance
  | name | method name to call
  | nargs | number of input arguments
  | args | input arguments
  [out] | result | function result or exception
  [out] | errbuf | error message if evaluation fails
  | errbufsize | size of the error buffer

Returns
  success

bool(idaapi * extlang_t::run_statements) (const char *str, char *errbuf, size_t errbufsize)

Compile and execute a string with statements.

(see also: calcexpr() which works with expressions)

Parameters

  | str | input string to execute
  [out] | errbuf | error message
  | errbufsize | size of the error buffer

Returns
  success

bool(idaapi * extlang_t::load_procmod) (const char *file, idc_value_t *procobj, char *errbuf, size_t errbufsize)

Compile (load) a file with processor module.

If is absent then compile_file() is used.

Parameters

  | file | processor module file name
  [out] | procobj | created object or exception
  [out] | errbuf | error message if compilation fails
  | errbufsize | size of the error buffer

Return values

  true | success
  false | if errbuf is empty then file has been loaded (compiled) successfully but it doesn't contain processor module

bool(idaapi * extlang_t::unload_procmod) (const char *file, char *errbuf, size_t errbufsize)

Unload previously loaded processor module.

Parameters

  | file | processor module file name
  [out] | errbuff | error message if compilation fails
  | errbufsize | size of the error buffer

Returns
  success

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

- expr.hpp