Pin
|
Typedefs | |
typedef TRACE_CLASS * | TRACE |
typedef VOID(* | SMC_CALLBACK) (ADDRINT traceStartAddress, ADDRINT traceEndAddress, VOID *v) |
typedef VOID(* | TRACE_INSTRUMENT_CALLBACK) (TRACE trace, VOID *v) |
Functions | |
PIN_CALLBACK | TRACE_AddInstrumentFunction (TRACE_INSTRUMENT_CALLBACK fun, VOID *val) |
VOID | TRACE_AddSmcDetectedFunction (SMC_CALLBACK fun, VOID *val) |
VOID | TRACE_InsertCall (TRACE trace, IPOINT action, AFUNPTR funptr,...) |
VOID | TRACE_InsertIfCall (TRACE trace, IPOINT action, AFUNPTR funptr,...) |
VOID | TRACE_InsertThenCall (TRACE trace, IPOINT action, AFUNPTR funptr,...) |
BBL | TRACE_BblHead (TRACE trace) |
BBL | TRACE_BblTail (TRACE trace) |
ADDRINT | TRACE_Address (TRACE trace) |
USIZE | TRACE_Size (TRACE trace) |
RTN | TRACE_Rtn (TRACE trace) |
BOOL | TRACE_HasFallThrough (TRACE trace) |
UINT32 | TRACE_NumBbl (TRACE trace) |
UINT32 | TRACE_NumIns (TRACE trace) |
Iteration idioms:
typedef VOID(* SMC_CALLBACK) (ADDRINT traceStartAddress, ADDRINT traceEndAddress, VOID *v) |
Call back function when SMC is detected. This function can be registered via TRACE_AddSmcDetectedFunction. The callback delivers the start and end addresses of the TRACE containing the SMC. Using this function can potentially cause Pin to use unlimited memory due to SMC tracking.
[in] | traceStartAddress | The start address of the trace in which SMC is detected |
[in] | traceEndAddress | The end address of the trace in which SMC is detected |
[in] | v | The tool's call-back value |
typedef TRACE_CLASS* TRACE |
Container for a trace
typedef VOID(* TRACE_INSTRUMENT_CALLBACK) (TRACE trace, VOID *v) |
Call back function used to instrument traces
PIN_CALLBACK TRACE_AddInstrumentFunction | ( | TRACE_INSTRUMENT_CALLBACK | fun, |
VOID * | val | ||
) |
Add a function used to instrument at trace granularity
fun | Instrumentation function for traces |
val | passed as the second argument to the instrumentation function |
ADDRINT TRACE_Address | ( | TRACE | trace | ) |
VOID TRACE_AddSmcDetectedFunction | ( | SMC_CALLBACK | fun, |
VOID * | val | ||
) |
Register a call back to be called when Pin detects a self modification of code in the application. See SMC_CALLBACK for usage details.
fun | The call back function that is to be called |
val | Value to be passed to fun when it is called |
BBL TRACE_BblHead | ( | TRACE | trace | ) |
BBL TRACE_BblTail | ( | TRACE | trace | ) |
BOOL TRACE_HasFallThrough | ( | TRACE | trace | ) |
Tells if the last instructon in the trace has a fall-through path.
[in] | trace | The trace. |
Insert one or more analysis calls in a trace.
[in] | trace | The trace to instrument. |
[in] | action | Specifies when the analysis call executes:
|
[in] | funptr | The analysis function to call. |
[in] | ... | IARG_TYPE. Arguments to pass to funptr. |
Insert one or more analysis calls in a trace. If funptr returns a non-zero ADDRINT, then the immediately following "then" analysis call is executed. Note that if CALL_ORDER is used, Both "if" and "then" analysis calls must have the same order.
[in] | trace | The trace to instrument. |
[in] | action | Specifies when the analysis call executes. See the documentation in TRACE_InsertCall(). |
[in] | funptr | The analysis function to call. Its return type must be ADDRINT. |
[in] | ... | IARG_TYPE. Arguments to pass to funptr. |
Insert one or more analysis calls in a trace. The functions are called only if the immediately preceding "if" analysis call returns a non-zero value. Note that if CALL_ORDER is used, Both "if" and "then" analysis calls must have the same order.
[in] | trace | The trace to instrument. |
[in] | action | Specifies when the analysis call executes. See the documentation in TRACE_InsertCall(). |
[in] | funptr | The analysis function to call. |
[in] | ... | IARG_TYPE. Arguments to pass to funptr. |
UINT32 TRACE_NumBbl | ( | TRACE | trace | ) |
UINT32 TRACE_NumIns | ( | TRACE | trace | ) |
RTN TRACE_Rtn | ( | TRACE | trace | ) |
USIZE TRACE_Size | ( | TRACE | trace | ) |
Traces represent contiguous segments of the original code. This function returns the original source footprint of the given trace (not the corresponding post-instrumentation footprint in the code cache).