IDA C++ SDK 9.2
|
Description of a custom calling convention. More...
#include <typeinf.hpp>
Public Member Functions | |
bool | is_vararg () const |
bool | is_purging () const |
bool | is_usercall () const |
virtual bool | validate_func (const func_type_data_t &fti, qstring *reterr) const |
Validate a function prototype. | |
virtual bool | calc_retloc (func_type_data_t *fti) const =0 |
Calculate the location of the return value. | |
virtual bool | calc_arglocs (func_type_data_t *fti) const =0 |
Calculate the argument locations. | |
virtual ssize_t | find_varargs (func_type_data_t *fti, ea_t call_ea, class mblock_t *blk) const |
Discover variadic arguments. | |
virtual bool | calc_varglocs (func_type_data_t *fti, regobjs_t *regs, relobj_t *stkargs, int nfixed) const |
Calculate the argument locations for a variadic function. | |
virtual bool | get_cc_regs (callregs_t *out) const |
Retrieve generic information about call registers. | |
virtual bool | get_stkarg_area_info (stkarg_area_info_t *out) const |
Retrieve generic information about stack arguments. | |
virtual int | calc_purged_bytes (const func_type_data_t &fti, ea_t call_ea=BADADDR) const |
Calculate the number of purged bytes. | |
virtual bool | decorate_name (qstring *outbuf, const char *name, bool should_decorate, callcnv_t cc, const tinfo_t &type) const |
Decorate a function name. | |
virtual int | lower_func_type (func_type_data_t *fti) const |
Lower a function type. | |
custom_callcnv_t ()=default | |
custom_callcnv_t (const char *_name, uint64 f, uint32 _abibits) | |
virtual | ~custom_callcnv_t () |
DECLARE_COMPARISONS (custom_callcnv_t) |
Public Attributes | |
int | cbsize = sizeof(*this) |
uint64 | flags = 0 |
qstring | name |
the name is used as a keyword in the function prototype | |
uint32 | abibits = 0 |
abibits to be used for the calling convention |
Description of a custom calling convention.
|
default |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Validate a function prototype.
This function is used during parsing or deserializing a function prototype to verify semantic limitations of the prototype (for example, returning arrays is forbidden in C)
[in] | fti | function prototype |
[out] | reterr | buffer for error message |
|
pure virtual |
Calculate the location of the return value.
This function must fill fti->retloc.
fti | function prototype |
|
pure virtual |
Calculate the argument locations.
This function must fill all fti->at(i).argloc instances. It may be called for variadic functions too, in calc_varglocs fails.
fti | function prototype |
|
inlinevirtual |
Discover variadic arguments.
This function is called only for variadic functions. It is currently used by the decompiler.
fti | function prototype. find_varargs() should append the discovered variadic arguments to it. |
call_ea | address of the call instruction |
blk | microcode block with the call instruction |
|
inlinevirtual |
Calculate the argument locations for a variadic function.
This function must fill all fti->at(i).argloc instances and provide more detailed info about registers and stkargs.
fti | function prototype | |
[out] | regs | buffer for hidden register arguments, may be nullptr |
[out] | stkargs | buffer for hidden stack arguments, may be nullptr |
nfixed | number of fixed arguments |
|
inlinevirtual |
Retrieve generic information about call registers.
|
inlinevirtual |
Retrieve generic information about stack arguments.
|
inlinevirtual |
Calculate the number of purged bytes.
fti | function prototype |
call_ea | address of the call instruction (not used yet) |
|
inlinevirtual |
Lower a function type.
See lower_type() for more explanations.
fti | function prototype |
custom_callcnv_t::DECLARE_COMPARISONS | ( | custom_callcnv_t | ) |
int custom_callcnv_t::cbsize = sizeof(*this) |
uint64 custom_callcnv_t::flags = 0 |
qstring custom_callcnv_t::name |
the name is used as a keyword in the function prototype
uint32 custom_callcnv_t::abibits = 0 |
abibits to be used for the calling convention