IDA C++ SDK 9.2
|
External language (to support third party language interpreters) More...
#include <expr.hpp>
Public Member Functions | |
bool (idaapi *compile_expr)(const char *name | |
Compile an expression. | |
bool (idaapi *compile_file)(const char *file | |
Compile (load) a file. | |
bool (idaapi *call_func)(idc_value_t *result | |
Evaluate a previously compiled expression. | |
bool (idaapi *eval_expr)(idc_value_t *rv | |
Compile and evaluate an expression. | |
bool (idaapi *eval_snippet)(const char *str | |
Compile and execute a string with statements. | |
bool (idaapi *create_object)(idc_value_t *result | |
Create an object instance. | |
bool (idaapi *get_attr)(idc_value_t *result | |
Returns the attribute value of a given object from the global scope. | |
bool (idaapi *set_attr)(idc_value_t *obj | |
Sets the attribute value of a given object in the global scope. | |
bool (idaapi *call_method)(idc_value_t *result | |
Calls a member function. | |
bool (idaapi *load_procmod)(idc_value_t *procobj | |
Compile (load) a file with processor module. | |
bool (idaapi *unload_procmod)(const char *path | |
Unload previously loaded processor module. | |
bool | is_idc (void) const |
bool | is_namespace_aware (void) const |
void | release (void) |
Public Attributes | |
size_t | size |
Size of this structure. | |
uint32 | flags |
Language features. | |
int32 | refcnt |
Reference count. | |
const char * | name |
Language name. | |
const char * | fileext |
File name extension for the language. | |
syntax_highlighter_t * | highlighter |
ea_t | current_ea |
ea_t const char * | expr |
ea_t const char qstring * | errbuf |
const char * | requested_namespace |
const char qstring * | errbuf |
const char const idc_value_t | args [] |
const char const idc_value_t size_t | nargs |
const char const idc_value_t size_t qstring * | errbuf |
qstring * | errbuf |
const idc_value_t * | obj |
const idc_value_t const char * | attr |
const char * | attr |
const char const idc_value_t & | value |
const idc_value_t const char * | name |
const idc_value_t const char const idc_value_t | args [] |
const idc_value_t const char const idc_value_t size_t | nargs |
const idc_value_t const char const idc_value_t size_t qstring * | errbuf |
const char * | path |
External language (to support third party language interpreters)
extlang_t::bool | ( | idaapi * | compile_expr | ) | const |
Compile an expression.
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 |
extlang_t::bool | ( | idaapi * | compile_file | ) | const |
Compile (load) a file.
If an extlang_t object claims to be namespace-aware, it means its 'compile_file()' will receive a requested namespace to compile a file under.
For example, compile_file() might receive a file '.../loaders/myloader.py', with the corresponding namespace: '__loaders__myloader'
Accordingly, call_func() has to be prepared to receive a function name that is namespace-qualified: "__loaders__myloader.accept_file()".
file | file name | |
requested_namespace | requested namespace, may be ignored if not namespace-aware | |
[out] | errbuf | error message if compilation fails |
extlang_t::bool | ( | idaapi * | call_func | ) |
Evaluate a previously compiled expression.
[out] | result | function result or exception |
name | function to call | |
nargs | number of input arguments | |
args | input arguments | |
[out] | errbuf | error message if evaluation fails |
extlang_t::bool | ( | idaapi * | eval_expr | ) |
Compile and evaluate an expression.
[out] | rv | expression value or exception |
current_ea | current address. if unknown then BADADDR | |
expr | expression to evaluate | |
[out] | errbuf | error message if evaluation fails |
extlang_t::bool | ( | idaapi * | eval_snippet | ) | const |
Compile and execute a string with statements.
(see also: eval_expr() which works with expressions)
str | input string to execute | |
[out] | errbuf | error message |
extlang_t::bool | ( | idaapi * | create_object | ) |
Create an object instance.
result | created object or exception |
name | object class name |
args | input arguments |
nargs | number of input arguments |
errbuf | error message if evaluation fails |
extlang_t::bool | ( | idaapi * | get_attr | ) |
Returns the attribute value of a given object from the global scope.
[out] | result | attribute value |
obj | object (may be nullptr) | |
attr | attribute name. if nullptr or empty string then the object instance name (i.e. class name) should be returned. |
extlang_t::bool | ( | idaapi * | set_attr | ) |
Sets the attribute value of a given object in the global scope.
obj | object (may be nullptr) |
attr | attribute name |
value | attribute value |
extlang_t::bool | ( | idaapi * | call_method | ) |
Calls a member function.
[out] | result | function result or exception |
obj | object instance | |
name | method name to call | |
args | input arguments | |
nargs | number of input arguments | |
[out] | errbuf | error message if evaluation fails |
extlang_t::bool | ( | idaapi * | load_procmod | ) |
Compile (load) a file with processor module.
See the note about namespace-awareness in compile_file()
[out] | procobj | created object or exception |
path | processor module file name | |
[out] | errbuf | error message if compilation fails |
true | success |
false | if errbuf is empty then file has been loaded (compiled) successfully but it doesn't contain processor module |
extlang_t::bool | ( | idaapi * | unload_procmod | ) | const |
Unload previously loaded processor module.
path | processor module file name | |
[out] | errbuff | error message if compilation fails |
size_t extlang_t::size |
Size of this structure.
uint32 extlang_t::flags |
Language features.
int32 extlang_t::refcnt |
Reference count.
const char * extlang_t::name |
Language name.
const char* extlang_t::fileext |
File name extension for the language.
syntax_highlighter_t* extlang_t::highlighter |
ea_t extlang_t::current_ea |
ea_t const char * extlang_t::expr |
qstring * extlang_t::errbuf |
const char* extlang_t::requested_namespace |
const char qstring* extlang_t::errbuf |
const char const idc_value_t extlang_t::args |
const char const idc_value_t size_t extlang_t::nargs |
const char const idc_value_t size_t qstring* extlang_t::errbuf |
qstring* extlang_t::errbuf |
const idc_value_t * extlang_t::obj |
const idc_value_t const char* extlang_t::attr |
const char* extlang_t::attr |
const char const idc_value_t& extlang_t::value |
const idc_value_t const char* extlang_t::name |
const idc_value_t const char const idc_value_t extlang_t::args[] |
const idc_value_t const char const idc_value_t size_t extlang_t::nargs |
const idc_value_t const char const idc_value_t size_t qstring* extlang_t::errbuf |
const char* extlang_t::path |