Defines | |
#define | PIN_DEPRECATED_WARNINGS 1 |
Typedefs | |
typedef VOID(*) | LEVEL_PINCLIENT::SIGNAL_BEFORE_CALLBACK (THREADID threadIndex, INT32 sig, const CONTEXT *ctxtFrom, const CONTEXT *ctxtTo, VOID *v) |
typedef VOID(*) | LEVEL_PINCLIENT::SIGNAL_AFTER_CALLBACK (THREADID threadIndex, const CONTEXT *ctxtFrom, const CONTEXT *ctxtTo, VOID *v) |
typedef VOID(*) | LEVEL_PINCLIENT::THREAD_BEGIN_CALLBACK (THREADID threadIndex, VOID *sp, int flags, VOID *v) |
typedef VOID(*) | LEVEL_PINCLIENT::THREAD_END_CALLBACK (THREADID threadIndex, INT32 code, VOID *v) |
typedef BOOL(*) | LEVEL_PINCLIENT::SIGNAL_INTERCEPT_CALLBACK (THREADID threadIndex, INT32 sig, CONTEXT *ctxt, BOOL hasHndlr, VOID *v) |
Functions | |
PIN_DEPRECATED_API BOOL | LEVEL_CORE::INS_IsRewritableMemOpBaseLimited (INS ins, MEMORY_TYPE mtype, REG &base) |
PIN_DEPRECATED_API BOOL | LEVEL_CORE::INS_IsRewritableMemOpBase (INS ins, MEMORY_TYPE mtype, REG &base) |
PIN_DEPRECATED_API BOOL | LEVEL_CORE::INS_IsDynamicRewritableMemOpBase (INS ins, MEMORY_TYPE mtype, REG ®) |
PIN_DEPRECATED_API ADDRINT | LEVEL_CORE::INS_MemoryOffset (INS ins) |
PIN_DEPRECATED_API ADDRDELTA | LEVEL_CORE::INS_MemoryDisplacementSigned (INS ins) |
PIN_DEPRECATED_API BOOL | LEVEL_CORE::INS_OperandReadAndWriten (INS ins, UINT32 n) |
PIN_DEPRECATED_API BOOL | LEVEL_PINCLIENT::PIN_AddSignalBeforeFunction (SIGNAL_BEFORE_CALLBACK fun, VOID *val) |
PIN_DEPRECATED_API BOOL | LEVEL_PINCLIENT::PIN_AddSignalAfterFunction (SIGNAL_AFTER_CALLBACK fun, VOID *val) |
PIN_DEPRECATED_API BOOL | LEVEL_PINCLIENT::PIN_AddSignalInterceptFunction (INT32 sig, SIGNAL_INTERCEPT_CALLBACK fun, VOID *val) |
PIN_DEPRECATED_API VOID | LEVEL_PINCLIENT::PIN_AddThreadBeginFunction (THREAD_BEGIN_CALLBACK fun, VOID *val) |
PIN_DEPRECATED_API VOID | LEVEL_PINCLIENT::PIN_AddThreadEndFunction (THREAD_END_CALLBACK fun, VOID *val) |
PIN_DEPRECATED_API VOID | LEVEL_PINCLIENT::PIN_StartProbedProgram () |
PIN_DEPRECATED_API BOOL | LEVEL_PINCLIENT::RTN_IsSafeForProbe (RTN rtn) |
PIN_DEPRECATED_API VOID | LEVEL_PINCLIENT::RTN_ReplaceWithUninstrumentedRoutine (RTN replacedRtn, AFUNPTR replacementFun) |
PIN_DEPRECATED_API BBL | LEVEL_PINCLIENT::RTN_BblHead (RTN x) |
PIN_DEPRECATED_API BBL | LEVEL_PINCLIENT::RTN_BblTail (RTN x) |
PIN_DEPRECATED_API INT32 | LEVEL_PINCLIENT::RTN_No (RTN x) |
PIN_DEPRECATED_API VOID | LEVEL_PINCLIENT::PIN_RegisterItcAuxCallBackPushFun (AFUNPTR callBackPushFun) |
PIN_DEPRECATED_API VOID | LEVEL_PINCLIENT::RTN_ComplexReplaceWithUninstrumentedRoutine (RTN replacedRtn, AFUNPTR replacementFun) |
PIN_DEPRECATED_API ADDRINT | LEVEL_PINCLIENT::PIN_FindAlternateAppStack () |
PIN_DEPRECATED_API BOOL | LEVEL_PINCLIENT::ParseCommandLine (int xargc, CHAR **xargv) |
PIN_DEPRECATED_API BOOL | LEVEL_PINCLIENT::INS_ChangeMemOpToBaseRegisterAddressMode (INS ins, MEMORY_TYPE mtype, REG newBase) |
PIN_DEPRECATED_API BOOL | LEVEL_PINCLIENT::INS_RewriteMemoryAddressingToBaseRegisterOnly (INS ins, MEMORY_TYPE mtype, REG newBase) |
BOOL | LEVEL_PINCLIENT::PIN_SetThreadData (TLS_KEY key, const VOID *data) |
VOID * | LEVEL_PINCLIENT::PIN_GetThreadData (TLS_KEY key) |
#define PIN_DEPRECATED_WARNINGS 1 |
By default Pin will annotate deprecated parts of the API so that their use in tools will generate compiler warnings. If you want to suppress these warnings during the compilation of your tool, you can do so by defining the macro PIN_DEPRECATED_WARNINGS with the value zero.
typedef VOID(*) LEVEL_PINCLIENT::SIGNAL_AFTER_CALLBACK(THREADID threadIndex, const CONTEXT *ctxtFrom, const CONTEXT *ctxtTo, VOID *v) |
Call back function when application signal handler returns.
threadIndex | The Pin thread ID of the thread that handled the signal. | |
ctxtFrom | Application's register state at end of handler. | |
ctxtTo | Application's register state to which the handler is returning. | |
v | The tool's call-back value. |
typedef VOID(*) LEVEL_PINCLIENT::SIGNAL_BEFORE_CALLBACK(THREADID threadIndex, INT32 sig, const CONTEXT *ctxtFrom, const CONTEXT *ctxtTo, VOID *v) |
Call back function when application handles a signal.
threadIndex | The Pin thread ID of the thread that handles the signal. | |
sig | The signal number. | |
ctxtFrom | Application's register state when it was interrupted by the signal. | |
ctxtTo | Application's register state at start of handler. | |
v | The tool's call-back value. |
typedef BOOL(*) LEVEL_PINCLIENT::SIGNAL_INTERCEPT_CALLBACK(THREADID threadIndex, INT32 sig, CONTEXT *ctxt, BOOL hasHndlr, VOID *v) |
Call back function when tool creates its own signal handler.
threadIndex | The Pin thread ID of the thread that handled the signal. | |
sig | The signal number. | |
ctxt | Application's register state when it was interrupted by the signal. The tool may change this context if desired. If so, the application continues at the modified context. Or, if the application's signal handler is invoked, that handler returns to the modified context. | |
hndlr | Boolean indicating if the application has a registered signal handler. | |
v | The tool's call-back value. |
typedef VOID(*) LEVEL_PINCLIENT::THREAD_BEGIN_CALLBACK(THREADID threadIndex, VOID *sp, int flags, VOID *v) |
typedef VOID(*) LEVEL_PINCLIENT::THREAD_END_CALLBACK(THREADID threadIndex, INT32 code, VOID *v) |
PIN_DEPRECATED_API BOOL LEVEL_PINCLIENT::INS_ChangeMemOpToBaseRegisterAddressMode | ( | INS | ins, | |
MEMORY_TYPE | mtype, | |||
REG | newBase | |||
) |
Change this memory access instruction use a base register addressing mode. On IA-32/Intel(R) 64, it will not rewrite all references; See INS_IsRewritableMemOpBaseLimited() for details.
PIN_DEPRECATED_API BOOL LEVEL_CORE::INS_IsDynamicRewritableMemOpBase | ( | INS | ins, | |
MEMORY_TYPE | mtype, | |||
REG & | reg | |||
) |
Test if this memory operation can be rewritten dynamically and return the base register
PIN_DEPRECATED_API BOOL LEVEL_CORE::INS_IsRewritableMemOpBase | ( | INS | ins, | |
MEMORY_TYPE | mtype, | |||
REG & | base | |||
) |
PIN_DEPRECATED_API BOOL LEVEL_CORE::INS_IsRewritableMemOpBaseLimited | ( | INS | ins, | |
MEMORY_TYPE | mtype, | |||
REG & | base | |||
) |
PIN_DEPRECATED_API ADDRDELTA LEVEL_CORE::INS_MemoryDisplacementSigned | ( | INS | ins | ) |
PIN_DEPRECATED_API ADDRINT LEVEL_CORE::INS_MemoryOffset | ( | INS | ins | ) |
PIN_DEPRECATED_API BOOL LEVEL_CORE::INS_OperandReadAndWriten | ( | INS | ins, | |
UINT32 | n | |||
) |
Old name for the previous function; this name is a typo. For backward compatibility we keep it.
PIN_DEPRECATED_API BOOL LEVEL_PINCLIENT::INS_RewriteMemoryAddressingToBaseRegisterOnly | ( | INS | ins, | |
MEMORY_TYPE | mtype, | |||
REG | newBase | |||
) |
Change this memory access instruction to reference the virtual memory location contained in the given register.
On IA-32 and Intel64, the modified operand uses only base register addressing with the new base register newBase. Any index, scale, or offset fields from that operand in the original instruction are removed. In addition, if the original instruction's operand uses a segment override, the instruction is changed to use the default segment.
A memory operand can't be rewritten when:
[in] | ins | input instruction |
[in] | mtype | controls which operand to rewrite (read, write or second read operand) |
[in] | newBase | register used as the new memory base address |
PIN_DEPRECATED_API BOOL LEVEL_PINCLIENT::ParseCommandLine | ( | int | xargc, | |
CHAR ** | xargv | |||
) |
PIN_DEPRECATED_API BOOL LEVEL_PINCLIENT::PIN_AddSignalAfterFunction | ( | SIGNAL_AFTER_CALLBACK | fun, | |
VOID * | val | |||
) |
Register a notification function that is called immediately after the application returns from a signal handler. This notification only occurs if the application returns "normally" from the signal handler. If the application jumps out of its handler early (e.g. via longjmp), the notification does not occur.
fun | Call back function to execute immediately after the application's signal handler. | |
val | Value to pass to the function. |
PIN_DEPRECATED_API BOOL LEVEL_PINCLIENT::PIN_AddSignalBeforeFunction | ( | SIGNAL_BEFORE_CALLBACK | fun, | |
VOID * | val | |||
) |
Register a notification function that is called immediately before the application jumps to a signal handler. The tool is only notified of a signal that the application actually handles. Unhandled signals do not trigger a notification.
fun | Call back function to execute immediately before the application's signal handler. | |
val | Value to pass to the function. |
DEPRECATED: See PIN_AddContextChangeFunction().
PIN_DEPRECATED_API BOOL LEVEL_PINCLIENT::PIN_AddSignalInterceptFunction | ( | INT32 | sig, | |
SIGNAL_INTERCEPT_CALLBACK | fun, | |||
VOID * | val | |||
) |
Takes over ownership of a signal for the tool and establishes a tool handler for the signal. Tools should never call sigaction() directly to handle signals.
Use this function to take over "ownership" of a signal. If you want to be notified when the application receives a signal, use PIN_AddContextChangeFunction() instead.
Tools should take care when intercepting signals, because this can adversely affect the application if it also uses the signal. The application is still allowed to set up its own handler for an intercepted signal. However, the application is prevented from attempts to block the signal.
When an intercepted signal is received, the tool's handler is called first. The tool's handler then decides whether the signal should be forwarded to the application's handler (if any).
A tool can set only one "intercept" handler for a particular signal, so a new handler overwrites any previous handler for the same signal. To disable a handler, pass a NULL function pointer.
sig | The signal number to handle. | |
fun | The tool's handler function, or NULL to return ownership of the signal back to the application. | |
val | Value to pass to the handler function. |
Function always return FALSE on Windows
DEPRECATED: See PIN_InterceptSignal() and PIN_UnblockSignal().
PIN_DEPRECATED_API VOID LEVEL_PINCLIENT::PIN_AddThreadBeginFunction | ( | THREAD_BEGIN_CALLBACK | fun, | |
VOID * | val | |||
) |
Call func immediately after a new thread has been created
fun | Call back function to execute after new thread has been created | |
val | Value to be passed to fun when it is called |
PIN_DEPRECATED_API VOID LEVEL_PINCLIENT::PIN_AddThreadEndFunction | ( | THREAD_END_CALLBACK | fun, | |
VOID * | val | |||
) |
Call func immediately before a thread ends
fun | Call back function to execute before new thread ends | |
val | Value to be passed to fun when it is called |
PIN_DEPRECATED_API ADDRINT LEVEL_PINCLIENT::PIN_FindAlternateAppStack | ( | ) |
If we are currently on a pin stack, return a location on the application stack where we can "unswitch to" and continue execution there
VOID* LEVEL_PINCLIENT::PIN_GetThreadData | ( | TLS_KEY | key | ) |
Get the value stored in the specified TLS slot of the thread.
PIN_DEPRECATED_API VOID LEVEL_PINCLIENT::PIN_RegisterItcAuxCallBackPushFun | ( | AFUNPTR | callBackPushFun | ) |
This API is only used by the Intel Thread Checker. Calling this API to register the function that libtcheck provides to push the original function pointer of a replaced function onto Thread Checker's internal storage. Once this API is called, the function replacement bridge will call "callBackPushFun" with the original function pointer of the replaced function as the parameter.
BOOL LEVEL_PINCLIENT::PIN_SetThreadData | ( | TLS_KEY | key, | |
const VOID * | data | |||
) |
Store specified value in the specified TLS slot of the thread.
PIN_DEPRECATED_API VOID LEVEL_PINCLIENT::PIN_StartProbedProgram | ( | ) |
Starts program executing, never returns. PIN_Init must be called first. The command line option -probe must be invoked when using PIN_StartProbedProgram(). A probed program only invokes instrumentation at explicitly inserted probe points.
PIN_DEPRECATED_API BBL LEVEL_PINCLIENT::RTN_BblHead | ( | RTN | x | ) |
PIN_DEPRECATED_API BBL LEVEL_PINCLIENT::RTN_BblTail | ( | RTN | x | ) |
PIN_DEPRECATED_API VOID LEVEL_PINCLIENT::RTN_ComplexReplaceWithUninstrumentedRoutine | ( | RTN | replacedRtn, | |
AFUNPTR | replacementFun | |||
) |
Replace a function in the application (replacedRtn) by another function defined in the Pintool (replacementFun). The replacement function is not instrumented. Difference between RTN_ReplaceWithUninstrumentedRoutine() and RTN_ComplexReplaceWithUninstrumentedRoutine() is that the latter does complex replacement (i.e. a call to the callBackPushFun registered will be made before calling to the replacement function).
PIN_DEPRECATED_API BOOL LEVEL_PINCLIENT::RTN_IsSafeForProbe | ( | RTN | rtn | ) |
Return TRUE if the given RTN is a candidate for function insertion using probes, and FALSE otherwise. Please use RTN_IsSafeForProbedInsertion() if you want to insert a call before or after routine.
PIN_DEPRECATED_API INT32 LEVEL_PINCLIENT::RTN_No | ( | RTN | x | ) |
PIN_DEPRECATED_API VOID LEVEL_PINCLIENT::RTN_ReplaceWithUninstrumentedRoutine | ( | RTN | replacedRtn, | |
AFUNPTR | replacementFun | |||
) |
Replace a function in the application (replacedRtn) by another function defined in the Pintool (replacementFun). The replacement function is not instrumented.