- Main Page
- Modules
- Classes

- Search for |

# PROTO API

## Defines

#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
}
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 | LEVEL_PINCLIENT::PROTO_Allocate (PARG_T returnArg, CALLINGSTD_TYPE cstype, const char *name,...)
VOID | LEVEL_PINCLIENT::PROTO_Free (PROTO proto)

## Detailed Description

This API describes an application routine.

## Define Documentation

#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().

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

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

#define PIN_PARG_END | (

)
_PinParg(PARG_END, 0)

| Ends a list of arguments in PROTO_Allocate() See PIN_PARG

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

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

## Typedef Documentation

typedef PROTO_CLASS* PROTO

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

## Enumeration Type Documentation

enum 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.

enum PARG_TYPE

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

## Function Documentation

PROTO LEVEL_PINCLIENT::PROTO_Allocate | ( | PARG_T | returnArg,
|  | CALLINGSTD_TYPE | cstype,
|  | const char * | name,
|  |  | ...
| ) |

| Allocate and initialize a function prototype.

Parameters:

  | returnArg | The return argument type and size. See PIN_PARG.
  | cstype | The calling standard used for compiling this function (CALLINGSTD_DEFAULT recommended).
  | name | The 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.

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 & MacOS
  CPU: All

VOID LEVEL_PINCLIENT::PROTO_Free | ( | PROTO | proto | ) |

| Free the specified function prototype.

Parameters:

  | proto | A pointer to a function prototype.

Availability:
  Mode: JIT & Probe
  O/S: Linux, Windows & MacOS
  CPU: All