IDA SDK
Modules | Classes | Macros | Typedefs | Enumerations | Functions
Argument locations

Detailed Description

Modules

 Argument location types
 
 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...
 

Macros

#define PRALOC_VERIFY   0x01
 interr if illegal argloc
 
#define PRALOC_STKOFF   0x02
 print stack offsets
 

Typedefs

typedef int argloc_type_t
 Specifies the location type of a function argument - see Argument location types.
 
typedef qvector< argloc_targlocs_t
 vector of argument locations
 

Enumerations

enum  argreg_policy_t {
  ARGREGS_POLICY_UNDEFINED, ARGREGS_GP_ONLY, ARGREGS_INDEPENDENT, ARGREGS_BY_SLOTS,
  ARGREGS_FP_CONSUME_GP
}
 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.
 
idaman int ida_export verify_argloc (const argloc_t &vloc, int size, const rangeset_t *gaps)
 Verify argloc_t. More...
 
idaman bool ida_export optimize_argloc (argloc_t *vloc, int size, const rangeset_t *gaps)
 Verify and optimize scattered argloc into simple form. More...
 
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()
 
cm_t get_cc (cm_t cm)
 Get the calling convention.
 
bool is_user_cc (cm_t cm)
 Does the calling convention specify argument locations explicitly?
 
bool is_vararg_cc (cm_t cm)
 Does the calling convention use ellipsis?
 
bool is_purging_cc (cm_t cm)
 Does the calling convention clean the stack arguments upon return?. More...
 

Enumeration Type Documentation

Function argument passing: how GP & FP registers cooperate with each other.

Enumerator
ARGREGS_GP_ONLY 

GP registers used for all arguments.

ARGREGS_INDEPENDENT 

FP/GP registers used separately (like gcc64)

ARGREGS_BY_SLOTS 

fixed FP/GP register per each slot (like vc64)

ARGREGS_FP_CONSUME_GP 

FP register also consumes one or more GP regs but not vice versa (aix ppc ABI)

Function Documentation

idaman int ida_export verify_argloc ( const argloc_t vloc,
int  size,
const rangeset_t *  gaps 
)

Verify argloc_t.

Parameters
sizetotal size of the variable
gapsif not NULL, specifies gaps in structure definition. these gaps should not map to any argloc, but everything else must be covered
Returns
0 if ok, otherwise an interr code.
idaman bool ida_export optimize_argloc ( argloc_t vloc,
int  size,
const rangeset_t *  gaps 
)

Verify and optimize scattered argloc into simple form.

All new arglocs must be processed by this function.

Return values
truesuccess
falsethe input argloc was illegal
bool is_purging_cc ( cm_t  cm)
inline

Does the calling convention clean the stack arguments upon return?.

Note
this function is valid only for x86 code