Pin
Loading...
Searching...
No Matches
Macros | Typedefs | Enumerations | Functions

Macros

#define PIN_PARG(t)   _PinPargClass< t >::parg()
 
#define PIN_PARG_AGGREGATE(t)   _PinParg(PARG_AGGREGATE, sizeof(t))
 
#define PIN_PARG_ENUM(t)   _PinParg(PARG_ENUM, sizeof(t))
 
#define PIN_PARG_END()   _PinParg(PARG_END, 0)
 

Typedefs

typedef PROTO_CLASS * PROTO
 

Enumerations

enum  CALLINGSTD_TYPE {
  CALLINGSTD_INVALID ,
  CALLINGSTD_DEFAULT ,
  CALLINGSTD_CDECL ,
  CALLINGSTD_REGPARMS ,
  CALLINGSTD_STDCALL ,
  CALLINGSTD_ART
}
 
enum  PARG_TYPE {
  PARG_INVALID ,
  PARG_POINTER ,
  PARG_BOOL ,
  PARG_CHAR ,
  PARG_UCHAR ,
  PARG_SCHAR ,
  PARG_SHORT ,
  PARG_USHORT ,
  PARG_INT ,
  PARG_UINT ,
  PARG_LONG ,
  PARG_ULONG ,
  PARG_LONGLONG ,
  PARG_ULONGLONG ,
  PARG_FLOAT ,
  PARG_DOUBLE ,
  PARG_VOID ,
  PARG_ENUM ,
  PARG_AGGREGATE ,
  PARG_END
}
 

Functions

PROTO PROTO_Allocate (PARG_T returnArg, CALLINGSTD_TYPE cstype, const char *name,...)
 
VOID PROTO_Free (PROTO proto)
 

Detailed Description

This API describes an application routine.

Macro Definition Documentation

◆ PIN_PARG

#define PIN_PARG (   t)    _PinPargClass< t >::parg()

Macros used to simplify the passing of function prototype arguments. The macro will pass the type and size of each argument specified. When passing an argument to PROTO_Allocate(), use these macros. As an example, PIN_PARG(int) will pass the PARG_TYPE PARG_INT and the size of an integer to PROTO_Allocate().

◆ PIN_PARG_AGGREGATE

#define PIN_PARG_AGGREGATE (   t)    _PinParg(PARG_AGGREGATE, sizeof(t))

Type and size of an aggregate in PROTO_Allocate() See PIN_PARG

◆ PIN_PARG_END

#define PIN_PARG_END ( )    _PinParg(PARG_END, 0)

Ends a list of arguments in PROTO_Allocate() See PIN_PARG

◆ PIN_PARG_ENUM

#define PIN_PARG_ENUM (   t)    _PinParg(PARG_ENUM, sizeof(t))

Type and size of an enum in PROTO_Allocate() See PIN_PARG

Typedef Documentation

◆ PROTO

typedef PROTO_CLASS* PROTO

List of function prototype arguments. See PROTO_Allocate() for its use.

Enumeration Type Documentation

◆ CALLINGSTD_TYPE

Type of calling standards used for compiling the function. See PROTO_Allocate() for its use. CALLINGSTD_DEFAULT is the default calling standard for the platform. This is the recommended option.

◆ PARG_TYPE

enum PARG_TYPE

Function prototype argument types. See PROTO_Allocate() for its use.

Function Documentation

◆ PROTO_Allocate()

PROTO PROTO_Allocate ( PARG_T  returnArg,
CALLINGSTD_TYPE  cstype,
const char *  name,
  ... 
)
extern

Allocate and initialize a function prototype.

Parameters
returnArgThe return argument type and size. See PIN_PARG.
cstypeThe calling standard used for compiling this function (CALLINGSTD_DEFAULT recommended).
nameThe name of the function.
...List of function argument type and size. See PIN_PARG for the recommended method of passing function arguments.
Note
currently PARG_FLOAT, PARG_DOUBLE are supported as return type only and can not be used as function argument types. Any other PRG_* that does not fit in an integer register are not supported neither as function argument nor as return type of replacement functions.
When using IARG_PROTOTYPE , please note that it refers to the original application function. PIN_PARG_END() must end the argument list, even if the function has no arguments.
Returns
proto A pointer to a function prototype. This is an opaque type.
Availability:
Mode: JIT & Probe
O/S: Linux, Windows
CPU: All

◆ PROTO_Free()

VOID PROTO_Free ( PROTO  proto)
extern

Free the specified function prototype.

Parameters
protoA pointer to a function prototype.
Availability:
Mode: JIT & Probe
O/S: Linux, Windows
CPU: All