Iteration idioms:
// Forward pass over all bbls in a trace for( BBL bbl = TRACE_BblHead(trace); BBL_Valid(bbl); bbl = BBL_Next(bbl) )
typedef TRACE_CLASS* LEVEL_PINCLIENT::TRACE |
Container for a trace
typedef VOID(*) LEVEL_PINCLIENT::TRACE_INSTRUMENT_CALLBACK(TRACE trace, VOID *v) |
Call back function used to instrument traces
PIN_CALLBACK LEVEL_PINCLIENT::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 LEVEL_PINCLIENT::TRACE_Address | ( | TRACE | trace | ) |
BBL LEVEL_PINCLIENT::TRACE_BblHead | ( | TRACE | trace | ) |
BBL LEVEL_PINCLIENT::TRACE_BblTail | ( | TRACE | trace | ) |
BOOL LEVEL_PINCLIENT::TRACE_HasFallThrough | ( | TRACE | trace | ) |
Tells if the last instructon in the trace has a fall-through path.
[in] | trace | The trace. |
VOID LEVEL_PINCLIENT::TRACE_InsertCall | ( | TRACE | trace, | |
IPOINT | action, | |||
AFUNPTR | funptr, | |||
... | ||||
) |
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. |
VOID LEVEL_PINCLIENT::TRACE_InsertIfCall | ( | TRACE | trace, | |
IPOINT | action, | |||
AFUNPTR | 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. |
VOID LEVEL_PINCLIENT::TRACE_InsertThenCall | ( | TRACE | trace, | |
IPOINT | action, | |||
AFUNPTR | 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 LEVEL_PINCLIENT::TRACE_NumBbl | ( | TRACE | trace | ) |
UINT32 LEVEL_PINCLIENT::TRACE_NumIns | ( | TRACE | trace | ) |
BOOL LEVEL_PINCLIENT::TRACE_Original | ( | TRACE | trace | ) |
RTN LEVEL_PINCLIENT::TRACE_Rtn | ( | TRACE | trace | ) |
USIZE LEVEL_PINCLIENT::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).
USIZE LEVEL_PINCLIENT::TRACE_StubSize | ( | TRACE | trace | ) |