Usually, the tool receives context in the instrumentation callback like THREAD_START_CALLBACK, CONTEXT_CHANGE_CALLBACK, or when it specifies IARG_CONTEXT argument to the instrumentation routine. At this time, the tool can read the individual register values or save the entire context using the PIN_GetContextReg, PIN_GetContextFPState and PIN_SaveContext functions. The PIN_ExecuteAt function can be called from an analysis routine to change the control flow of the thread and start execution from the specified context. The PIN_SetContextReg and PIN_SetContextFPState functions can be used from callbacks to change the thread's register state.
|
|
Architectural state of the processor. |
|
|
Set the new context for the current application's thread and run the thread starting from this context. This function can be called from an analysis routine or a replacement routine, but not from a callback.
|
|
||||||||||||
|
Get the floating point state of the specified context.
|
|
||||||||||||
|
Get the value of the integer register in the specified context.
|
|
||||||||||||||||
|
Get the value of the argument of the system call to be executed in the specified context.
|
|
||||||||||||
|
Get the error code of the system call which is just returned with the specified context.
|
|
||||||||||||
|
Get the number (ID) of the system call to be executed in the specified context.
|
|
||||||||||||
|
Get the return value of the system call which is just returned with the specified context.
|
|
||||||||||||
|
Copy the CONTEXT structure.
|
|
||||||||||||
|
Set the given floating point state in the specified context.
|
|
||||||||||||||||
|
Set the given value for the integer register in the specified context.
|
|
||||||||||||||||||||
|
Set the given value for the argument of the system call to be executed in the specified context.
|
|
||||||||||||||||
|
Set the number (ID) of the system call to be executed in the specified context.
|
1.4.6