IDA C++ SDK 9.2
|
Topics | |
Standard C-language models for x86 |
Classes | |
struct | rrel_t |
Register-relative argument location. More... | |
struct | custloc_desc_t |
Description of a custom argloc. More... | |
class | argloc_t |
Describes an argument location. More... | |
struct | argpart_t |
Subsection of an argument location. More... | |
class | scattered_aloc_t |
Used to manage arguments that are described by multiple locations (also see ALOC_DIST) More... | |
struct | aloc_visitor_t |
Visit all argument locations. More... | |
struct | const_aloc_visitor_t |
Same as aloc_visitor_t, but may not modify the argloc. More... | |
struct | stkarg_area_info_t |
struct | custom_callcnv_t |
Description of a custom calling convention. More... |
Typedefs | |
typedef qvector< argloc_t > | arglocs_t |
vector of argument locations | |
typedef qvector< argpart_t > | argpartvec_t |
Enumerations | |
enum | argreg_policy_t { ARGREGS_POLICY_UNDEFINED , ARGREGS_GP_ONLY , ARGREGS_INDEPENDENT , ARGREGS_BY_SLOTS , ARGREGS_FP_MASKS_GP , ARGREGS_MIPS_O32 , ARGREGS_RISCV } |
Function argument passing: how GP & FP registers cooperate with each other. More... |
Functions | |
idaman int ida_export | install_custom_argloc (const custloc_desc_t *custloc) |
Save a custom argloc. | |
idaman bool ida_export | remove_custom_argloc (int idx) |
Delete the custom argloc at the given index. | |
idaman const custloc_desc_t *ida_export | retrieve_custom_argloc (int idx) |
Retrieve the custom argloc at the given index. | |
DECLARE_TYPE_AS_MOVABLE (argloc_t) | |
DECLARE_TYPE_AS_MOVABLE (argpart_t) | |
DECLARE_TYPE_AS_MOVABLE (scattered_aloc_t) | |
idaman int ida_export | verify_argloc (const argloc_t &vloc, int size, const rangeset_t *gaps) |
Verify argloc_t. | |
idaman bool ida_export | optimize_argloc (argloc_t *vloc, int size, const rangeset_t *gaps) |
Verify and optimize scattered argloc into simple form. | |
idaman size_t ida_export | print_argloc (char *buf, size_t bufsize, const argloc_t &vloc, int size=0, int vflags=0) |
Convert an argloc to human readable form. | |
idaman int ida_export | for_all_arglocs (aloc_visitor_t &vv, argloc_t &vloc, int size, int off=0) |
Compress larger argloc types and initiate the aloc visitor. | |
int idaapi | for_all_const_arglocs (const_aloc_visitor_t &vv, const argloc_t &vloc, int size, int off=0) |
See for_all_arglocs() | |
callcnv_t | helper_get_cc (cm_t cm, callcnv_t new_callcnv) |
void | helper_set_cc (cm_t *cm, callcnv_t *new_callcnv, callcnv_t cc) |
callcnv_t | get_effective_cc (callcnv_t cc) |
Get effective calling convention (with respect to default CC) | |
constexpr THREAD_SAFE bool | is_user_cc (callcnv_t cc) |
Does the calling convention specify argument locations explicitly? | |
constexpr THREAD_SAFE bool | is_vararg_cc (callcnv_t cc) |
Does the calling convention use ellipsis? | |
constexpr THREAD_SAFE bool | is_purging_cc (callcnv_t cc) |
Does the calling convention clean the stack arguments upon return? | |
constexpr bool | is_golang_cc (callcnv_t cc) |
GO language calling convention (return value in stack)? | |
bool | is_custom_callcnv (callcnv_t cc) |
Is custom calling convention? | |
constexpr bool | is_swift_cc (callcnv_t cc) |
Swift calling convention (arguments and return values in registers)? | |
idaman bool ida_export | get_stkarg_area_info (stkarg_area_info_t *out, callcnv_t cc) |
Some calling conventions foresee special areas on the stack for call arguments. | |
DECLARE_TYPE_AS_MOVABLE (custom_callcnv_t) | |
idaman callcnv_t ida_export | register_custom_callcnv (const custom_callcnv_t &ccinf) |
Register a calling convention. | |
idaman bool ida_export | unregister_custom_callcnv (callcnv_t callcnv) |
Unregister a calling convention. | |
idaman const custom_callcnv_t *ida_export | get_custom_callcnv (callcnv_t callcnv) |
Retrieve custom calling convention details. | |
idaman callcnv_t ida_export | find_custom_callcnv (const char *name) |
Find a calling convention by its name. | |
idaman size_t ida_export | get_custom_callcnvs (qstrvec_t *names, callcnvs_t *codes) |
Get all custom calling conventions. | |
callcnv_t | compiler_info_t::get_cc () const |
void | compiler_info_t::set_cc (callcnv_t cc) |
const argloc_type_t | ALOC_NONE = 0 |
none | |
const argloc_type_t | ALOC_STACK = 1 |
stack offset | |
const argloc_type_t | ALOC_DIST = 2 |
distributed (scattered) | |
const argloc_type_t | ALOC_REG1 = 3 |
one register (and offset within it) | |
const argloc_type_t | ALOC_REG2 = 4 |
register pair | |
const argloc_type_t | ALOC_RREL = 5 |
register relative | |
const argloc_type_t | ALOC_STATIC = 6 |
global address | |
const argloc_type_t | ALOC_CUSTOM = 7 |
custom argloc (7 or higher) |
typedef qvector<argpart_t> argpartvec_t |
enum argreg_policy_t |
Function argument passing: how GP & FP registers cooperate with each other.
idaman int ida_export install_custom_argloc | ( | const custloc_desc_t * | custloc | ) |
Save a custom argloc.
idaman bool ida_export remove_custom_argloc | ( | int | idx | ) |
Delete the custom argloc at the given index.
idaman const custloc_desc_t *ida_export retrieve_custom_argloc | ( | int | idx | ) |
Retrieve the custom argloc at the given index.
DECLARE_TYPE_AS_MOVABLE | ( | argloc_t | ) |
DECLARE_TYPE_AS_MOVABLE | ( | argpart_t | ) |
DECLARE_TYPE_AS_MOVABLE | ( | scattered_aloc_t | ) |
idaman int ida_export verify_argloc | ( | const argloc_t & | vloc, |
int | size, | ||
const rangeset_t * | gaps ) |
Verify argloc_t.
vloc | argloc to verify |
size | total size of the variable |
gaps | if not nullptr, specifies gaps in structure definition. these gaps should not map to any argloc, but everything else must be covered |
Verify and optimize scattered argloc into simple form.
All new arglocs must be processed by this function.
true | success |
false | the input argloc was illegal |
idaman size_t ida_export print_argloc | ( | char * | buf, |
size_t | bufsize, | ||
const argloc_t & | vloc, | ||
int | size = 0, | ||
int | vflags = 0 ) |
Convert an argloc to human readable form.
idaman int ida_export for_all_arglocs | ( | aloc_visitor_t & | vv, |
argloc_t & | vloc, | ||
int | size, | ||
int | off = 0 ) |
Compress larger argloc types and initiate the aloc visitor.
|
inline |
Get effective calling convention (with respect to default CC)
Does the calling convention specify argument locations explicitly?
Does the calling convention use ellipsis?
Does the calling convention clean the stack arguments upon return?
GO language calling convention (return value in stack)?
Swift calling convention (arguments and return values in registers)?
idaman bool ida_export get_stkarg_area_info | ( | stkarg_area_info_t * | out, |
callcnv_t | cc ) |
Some calling conventions foresee special areas on the stack for call arguments.
This structure lists their sizes.
DECLARE_TYPE_AS_MOVABLE | ( | custom_callcnv_t | ) |
idaman callcnv_t ida_export register_custom_callcnv | ( | const custom_callcnv_t & | ccinf | ) |
Register a calling convention.
ccinf | description of the custom calling convention. this object must be alive until unregister_custom_callcnv(), after that it can destroyed |
Unregister a calling convention.
idaman const custom_callcnv_t *ida_export get_custom_callcnv | ( | callcnv_t | callcnv | ) |
Retrieve custom calling convention details.
idaman callcnv_t ida_export find_custom_callcnv | ( | const char * | name | ) |
Find a calling convention by its name.
idaman size_t ida_export get_custom_callcnvs | ( | qstrvec_t * | names, |
callcnvs_t * | codes ) |
Get all custom calling conventions.
names | output buffer for the convention names |
codes | output buffer for the convention codes The two output buffers correspond to each other. |
|
inline |
const argloc_type_t ALOC_NONE = 0 |
none
const argloc_type_t ALOC_STACK = 1 |
stack offset
const argloc_type_t ALOC_DIST = 2 |
distributed (scattered)
const argloc_type_t ALOC_REG1 = 3 |
one register (and offset within it)
const argloc_type_t ALOC_REG2 = 4 |
register pair
const argloc_type_t ALOC_RREL = 5 |
register relative
const argloc_type_t ALOC_STATIC = 6 |
global address
const argloc_type_t ALOC_CUSTOM = 7 |
custom argloc (7 or higher)