This API allows the user to read and modify the Pin/tool architectural register state of the processor. The registers physical context range (enumerated in REG) is up to REG_PHYSICAL_CONTEXT_END registers and floating point state.
The tool receives physical context in the INTERNAL_EXCEPTION_CALLBACK. At this time, the tool can read and modify individual physical register values and modify floating point state using the PIN_GetPhysicalContextReg(), PIN_SetPhysicalContextReg(), PIN_SetPhysicalContextFPState(), PIN_GetPhysicalContextFPState().
◆ PHYSICAL_CONTEXT
Physical state of the processor.
The tool should not read or modify data members of this structure directly, but must treat the structure as logically opaque and use the Physical context manipulation API functions to manage it.
◆ PIN_GetPhysicalContextFPState()
VOID LEVEL_PINCLIENT::PIN_GetPhysicalContextFPState |
( |
const PHYSICAL_CONTEXT * |
pPhysCtxt, |
|
|
VOID * |
fpstate |
|
) |
| |
Get the floating point state of the specified physical context.
- Parameters
-
[in] | pPhysCtxt | physical context whose floating point state is retrieved |
[in] | fpstate | pointer to the buffer that receives floating point state of the context. The size of the buffer must be at least FPSTATE_SIZE bytes. The returned state has fxsave format in IA-32 and Intel(R) 64 architectures. |
- Availability:
- Mode: JIT
O/S: Windows
CPU: IA-32 and Intel(R) 64 architectures
◆ PIN_GetPhysicalContextReg()
ADDRINT LEVEL_PINCLIENT::PIN_GetPhysicalContextReg |
( |
const PHYSICAL_CONTEXT * |
pPhysCtxt, |
|
|
REG |
reg |
|
) |
| |
Get the value of the integer register in the specified physical context.
- Parameters
-
[in] | pPhysCtxt | physical context whose register value is requested |
[in] | reg | physical register whose value is requested (up to REG_PHYSICAL_INTEGER_END) |
- Returns
- value of the register in the specified context
- Availability:
- Mode: JIT
O/S: Windows
CPU: IA-32 and Intel(R) 64 architectures
◆ PIN_SetPhysicalContextFPState()
VOID LEVEL_PINCLIENT::PIN_SetPhysicalContextFPState |
( |
PHYSICAL_CONTEXT * |
pPhysCtxt, |
|
|
const VOID * |
fpstate |
|
) |
| |
Set the given floating point state in the specified physical context.
- Parameters
-
[in,out] | pPhysCtxt | physical context whose floating point state is to be set |
[in] | fpstate | new floating point state of the context. It must have fxsave format in IA-32 and Intel(R) 64 architectures. |
- Availability:
- Mode: JIT
O/S: Windows
CPU: IA-32 and Intel(R) 64 architectures
◆ PIN_SetPhysicalContextReg()
VOID LEVEL_PINCLIENT::PIN_SetPhysicalContextReg |
( |
PHYSICAL_CONTEXT * |
pPhysCtxt, |
|
|
REG |
reg, |
|
|
ADDRINT |
val |
|
) |
| |
Set the given value for the integer register in the specified physical context.
- Parameters
-
[in,out] | pPhysCtxt | physical context whose register value is to be set |
[in] | reg | physical register whose value is to be set (up to REG_PHYSICAL_INTEGER_END) |
[in] | val | new value of the register |
- Availability:
- Mode: JIT
O/S: Windows
CPU: IA-32 and Intel(R) 64 architectures