Pin
Typedefs | Enumerations | Functions | Variables
Exception API

Typedefs

typedef struct EXCEPTION_INFO LEVEL_BASE::EXCEPTION_INFO
 

Enumerations

enum  LEVEL_BASE::EXCEPTION_CLASS {
  LEVEL_BASE::EXCEPTCLASS_NONE,
  LEVEL_BASE::EXCEPTCLASS_UNKNOWN,
  LEVEL_BASE::EXCEPTCLASS_ACCESS_FAULT,
  LEVEL_BASE::EXCEPTCLASS_INVALID_INS,
  LEVEL_BASE::EXCEPTCLASS_INT_ERROR,
  LEVEL_BASE::EXCEPTCLASS_FP_ERROR,
  LEVEL_BASE::EXCEPTCLASS_MULTIPLE_FP_ERROR,
  LEVEL_BASE::EXCEPTCLASS_DEBUG,
  LEVEL_BASE::EXCEPTCLASS_OS
}
 
enum  LEVEL_BASE::EXCEPTION_CODE {
  LEVEL_BASE::EXCEPTCODE_NONE,
  LEVEL_BASE::EXCEPTCODE_ACCESS_INVALID_ADDRESS,
  LEVEL_BASE::EXCEPTCODE_ACCESS_DENIED,
  LEVEL_BASE::EXCEPTCODE_ACCESS_INVALID_PAGE,
  LEVEL_BASE::EXCEPTCODE_ACCESS_MISALIGNED,
  LEVEL_BASE::EXCEPTCODE_ILLEGAL_INS,
  LEVEL_BASE::EXCEPTCODE_PRIVILEGED_INS,
  LEVEL_BASE::EXCEPTCODE_INT_DIVIDE_BY_ZERO,
  LEVEL_BASE::EXCEPTCODE_INT_OVERFLOW_TRAP,
  LEVEL_BASE::EXCEPTCODE_INT_BOUNDS_EXCEEDED,
  LEVEL_BASE::EXCEPTCODE_X87_DIVIDE_BY_ZERO,
  LEVEL_BASE::EXCEPTCODE_X87_OVERFLOW,
  LEVEL_BASE::EXCEPTCODE_X87_UNDERFLOW,
  LEVEL_BASE::EXCEPTCODE_X87_INEXACT_RESULT,
  LEVEL_BASE::EXCEPTCODE_X87_INVALID_OPERATION,
  LEVEL_BASE::EXCEPTCODE_X87_DENORMAL_OPERAND,
  LEVEL_BASE::EXCEPTCODE_X87_STACK_ERROR,
  LEVEL_BASE::EXCEPTCODE_SIMD_DIVIDE_BY_ZERO,
  LEVEL_BASE::EXCEPTCODE_SIMD_OVERFLOW,
  LEVEL_BASE::EXCEPTCODE_SIMD_UNDERFLOW,
  LEVEL_BASE::EXCEPTCODE_SIMD_INEXACT_RESULT,
  LEVEL_BASE::EXCEPTCODE_SIMD_INVALID_OPERATION,
  LEVEL_BASE::EXCEPTCODE_SIMD_DENORMAL_OPERAND,
  LEVEL_BASE::EXCEPTCODE_DBG_BREAKPOINT_TRAP,
  LEVEL_BASE::EXCEPTCODE_DBG_SINGLE_STEP_TRAP,
  LEVEL_BASE::EXCEPTCODE_ACCESS_WINDOWS_GUARD_PAGE,
  LEVEL_BASE::EXCEPTCODE_ACCESS_WINDOWS_STACK_OVERFLOW,
  LEVEL_BASE::EXCEPTCODE_WINDOWS,
  LEVEL_BASE::EXCEPTCODE_RECEIVED_UNKNOWN,
  LEVEL_BASE::EXCEPTCODE_RECEIVED_ACCESS_FAULT,
  LEVEL_BASE::EXCEPTCODE_RECEIVED_AMBIGUOUS_X87,
  LEVEL_BASE::EXCEPTCODE_RECEIVED_AMBIGUOUS_SIMD
}
 
enum  LEVEL_BASE::FAULTY_ACCESS_TYPE {
  LEVEL_BASE::FAULTY_ACCESS_TYPE_UNKNOWN,
  LEVEL_BASE::FAULTY_ACCESS_READ,
  LEVEL_BASE::FAULTY_ACCESS_WRITE,
  LEVEL_BASE::FAULTY_ACCESS_EXECUTE
}
 
enum  LEVEL_BASE::FPERROR {
  LEVEL_BASE::FPERROR_DIVIDE_BY_ZERO = (1<<0),
  LEVEL_BASE::FPERROR_OVERFLOW = (1<<1),
  LEVEL_BASE::FPERROR_UNDERFLOW = (1<<2),
  LEVEL_BASE::FPERROR_INEXACT_RESULT = (1<<3),
  LEVEL_BASE::FPERROR_INVALID_OPERATION = (1<<4),
  LEVEL_BASE::FPERROR_DENORMAL_OPERAND = (1<<5),
  LEVEL_BASE::FPERROR_X87_STACK_ERROR = (1<<6)
}
 

Functions

VOID LEVEL_BASE::PIN_InitExceptionInfo (EXCEPTION_INFO *pExceptInfo, EXCEPTION_CODE exceptCode, ADDRINT exceptAddress)
 
VOID LEVEL_BASE::PIN_InitAccessFaultInfo (EXCEPTION_INFO *pExceptInfo, EXCEPTION_CODE exceptCode, ADDRINT exceptAddress, ADDRINT accessAddress, FAULTY_ACCESS_TYPE accessType=FAULTY_ACCESS_TYPE_UNKNOWN)
 
VOID LEVEL_BASE::PIN_InitWindowsExceptionInfo (EXCEPTION_INFO *pExceptInfo, UINT32 sysExceptCode, ADDRINT exceptAddress, UINT32 numArgs=0, const ADDRINT *pArgs=0)
 
EXCEPTION_CODE LEVEL_BASE::PIN_GetExceptionCode (const EXCEPTION_INFO *pExceptInfo)
 
EXCEPTION_CLASS LEVEL_BASE::PIN_GetExceptionClass (EXCEPTION_CODE exceptCode)
 
ADDRINT LEVEL_BASE::PIN_GetExceptionAddress (const EXCEPTION_INFO *pExceptInfo)
 
VOID LEVEL_BASE::PIN_SetExceptionAddress (EXCEPTION_INFO *pExceptInfo, ADDRINT exceptAddress)
 
FAULTY_ACCESS_TYPE LEVEL_BASE::PIN_GetFaultyAccessType (const EXCEPTION_INFO *pExceptInfo)
 
BOOL LEVEL_BASE::PIN_GetFaultyAccessAddress (const EXCEPTION_INFO *pExceptInfo, ADDRINT *pAccessAddress)
 
UINT32 LEVEL_BASE::PIN_GetFpErrorSet (const EXCEPTION_INFO *pExceptInfo)
 
UINT32 LEVEL_BASE::PIN_GetWindowsExceptionCode (const EXCEPTION_INFO *pExceptInfo)
 
UINT32 LEVEL_BASE::PIN_CountWindowsExceptionArguments (const EXCEPTION_INFO *pExceptInfo)
 
ADDRINT LEVEL_BASE::PIN_GetWindowsExceptionArgument (const EXCEPTION_INFO *pExceptInfo, UINT32 argNum)
 
std::string LEVEL_BASE::PIN_ExceptionToString (const EXCEPTION_INFO *pExceptInfo)
 
VOID LEVEL_PINCLIENT::PIN_RaiseException (const CONTEXT *ctxt, THREADID tid, const EXCEPTION_INFO *pExceptInfo)
 

Variables

GLOBALCONST UINT32 LEVEL_BASE::MAX_WINDOWS_EXCEPTION_ARGS = 5
 

Detailed Description

This API allows the user to raise exceptions on behalf of the application and also analyze information associated with exceptions.

Typedef Documentation

◆ EXCEPTION_INFO

Structure that describes an exception.
The tool should not read or modify data members of this structure directly, but must treat the structure as logically opaque and use the Exception API functions to manage it.

Enumeration Type Documentation

◆ EXCEPTION_CLASS

Identifiers of exception classes. Exception class indicates the type of information (set of attributes) that accompanies exceptions of this class.

Enumerator
EXCEPTCLASS_NONE 

Reserved. No real exception belongs to this class.

EXCEPTCLASS_UNKNOWN 

Unknown exception.

EXCEPTCLASS_ACCESS_FAULT 

Memory access fault.

EXCEPTCLASS_INVALID_INS 

Invalid instruction.

EXCEPTCLASS_INT_ERROR 

Erroneous integer operation.

EXCEPTCLASS_FP_ERROR 

Erroneous floating point operation.

EXCEPTCLASS_MULTIPLE_FP_ERROR 

Received an ambiguous floating point exception.

EXCEPTCLASS_DEBUG 

Debugging trap.

EXCEPTCLASS_OS 

O/S specific exception.

◆ EXCEPTION_CODE

Identifiers for all possible exception codes. The codes below are divided into two groups. The first group list all the exceptions that can be raised by PIN_RaiseException(). Tools that want to be portable across operating systems should use codes from this first group when raising exceptions via PIN_RaiseException().

When Pin receives an exception and reports it to the tool, it may report an exception in either the first or second group. This can happen, for example, when using the PIN_SafeCopyEx() function. When Pin can identify a specific exception, it reports a code from the first group. Sometimes, though, the host operating system does not provide enough information for Pin to determine the exact exception. In these cases, Pin reports a code from the second group (one of the EXCEPTCODE_RECEIVED_ codes). A tool can always re-raise one of these exceptions by passing it to PIN_RaiseException(). However, portable tools should avoid creating new exceptions using codes from the second group, because these codes are not supported on all operating systems.

Enumerator
EXCEPTCODE_NONE 

Reserved. No real exception has this code.

EXCEPTCODE_ACCESS_INVALID_ADDRESS 

Virtual address not mapped (the #PF exception). Belongs to EXCEPTCLASS_ACCESS_FAULT.

EXCEPTCODE_ACCESS_DENIED 

Access not permitted due to protection violation (the #PF exception). Belongs to EXCEPTCLASS_ACCESS_FAULT.

EXCEPTCODE_ACCESS_INVALID_PAGE 

A #PF exception for some reason other than the cases above. Belongs to EXCEPTCLASS_ACCESS_FAULT.

EXCEPTCODE_ACCESS_MISALIGNED 

Misaligned memory reference (the #AC exception). Belongs to EXCEPTCLASS_ACCESS_FAULT.

EXCEPTCODE_ILLEGAL_INS 

Illegal instruction (the #UD exception). Belongs to EXCEPTCLASS_INVALID_INS.

EXCEPTCODE_PRIVILEGED_INS 

Privileged instruction (the #GP exception). Belongs to EXCEPTCLASS_INVALID_INS.

EXCEPTCODE_INT_DIVIDE_BY_ZERO 

Integer divide by zero (the #DE exception). Belongs to EXCEPTCLASS_INT_ERROR.

EXCEPTCODE_INT_OVERFLOW_TRAP 

Integer overflow trap (the #OF trap). Belongs to EXCEPTCLASS_INT_ERROR.

EXCEPTCODE_INT_BOUNDS_EXCEEDED 

Array index is out of bounds (#BR exception). Belongs to EXCEPTCLASS_INT_ERROR.

EXCEPTCODE_X87_DIVIDE_BY_ZERO 

x87 FPU divide by zero (the #MF/#Z exception). Belongs to EXCEPTCLASS_FP_ERROR.

EXCEPTCODE_X87_OVERFLOW 

x87 FPU overflow (the #MF/#O exception). Belongs to EXCEPTCLASS_FP_ERROR.

EXCEPTCODE_X87_UNDERFLOW 

x87 FPU underflow (the #MF/#U exception). Belongs to EXCEPTCLASS_FP_ERROR.

EXCEPTCODE_X87_INEXACT_RESULT 

x87 FPU inexact result (the #MF/#P exception). Belongs to EXCEPTCLASS_FP_ERROR.

EXCEPTCODE_X87_INVALID_OPERATION 

x87 FPU invalid operation (the #MF/#IA exception). Belongs to EXCEPTCLASS_FP_ERROR.

EXCEPTCODE_X87_DENORMAL_OPERAND 

x87 FPU denormal operand (the #MF/#D exception). Belongs to EXCEPTCLASS_FP_ERROR.

EXCEPTCODE_X87_STACK_ERROR 

x87 FPU stack overflowed or underflowed (the #MF/#IS exception). Belongs to EXCEPTCLASS_FP_ERROR.

EXCEPTCODE_SIMD_DIVIDE_BY_ZERO 

SIMD floating point divide by zero (the #XM/#Z exception). Belongs to EXCEPTCLASS_FP_ERROR.

EXCEPTCODE_SIMD_OVERFLOW 

SIMD floating point overflow (the #XM/#O exception). Belongs to EXCEPTCLASS_FP_ERROR.

EXCEPTCODE_SIMD_UNDERFLOW 

SIMD floating point underflow (the #XM/#U exception). Belongs to EXCEPTCLASS_FP_ERROR.

EXCEPTCODE_SIMD_INEXACT_RESULT 

SIMD floating point inexact result (the #XM/#P exception). Belongs to EXCEPTCLASS_FP_ERROR.

EXCEPTCODE_SIMD_INVALID_OPERATION 

SIMD invalid floating point operation (the #XM/#I exception). Belongs to EXCEPTCLASS_FP_ERROR.

EXCEPTCODE_SIMD_DENORMAL_OPERAND 

SIMD denormal floating point operand (the #XM/#D exception). Belongs to EXCEPTCLASS_FP_ERROR.

EXCEPTCODE_DBG_BREAKPOINT_TRAP 

Breakpoint trap (the #BP trap). Belongs to EXCEPTCLASS_DEBUG.

EXCEPTCODE_DBG_SINGLE_STEP_TRAP 

Trace trap (the #DB trap). Belongs to EXCEPTCLASS_DEBUG.

EXCEPTCODE_ACCESS_WINDOWS_GUARD_PAGE 

Guard page access (the Windows STATUS_GUARD_PAGE_VIOLATION exception). Belongs to EXCEPTCLASS_ACCESS_FAULT.

EXCEPTCODE_ACCESS_WINDOWS_STACK_OVERFLOW 

Thread stack overflowed (the Windows STATUS_STACK_OVERFLOW exception). Belongs to EXCEPTCLASS_ACCESS_FAULT.

EXCEPTCODE_WINDOWS 

Generic Windows exception. Belongs to EXCEPTCLASS_OS.

EXCEPTCODE_RECEIVED_UNKNOWN 

Unknown exception, cannot be re-raised. Belongs to EXCEPTCLASS_UNKNOWN.

EXCEPTCODE_RECEIVED_ACCESS_FAULT 

General memory access fault. Belongs to EXCEPTCLASS_ACCESS_FAULT.

EXCEPTCODE_RECEIVED_AMBIGUOUS_X87 

Ambiguous x87 FPU exception. PIN_GetFpErrorSet() tell which are possible. Belongs to EXCEPTCLASS_MULTIPLE_FP_ERROR.

EXCEPTCODE_RECEIVED_AMBIGUOUS_SIMD 

Ambiguous SIMD FPU exception. PIN_GetFpErrorSet() tell which are possible. Belongs to EXCEPTCLASS_MULTIPLE_FP_ERROR.

◆ FAULTY_ACCESS_TYPE

Types of faulty memory accesses that may cause an EXCEPTCLASS_ACCESS_FAULT exception

Enumerator
FAULTY_ACCESS_TYPE_UNKNOWN 

Unknown access violation.

FAULTY_ACCESS_READ 

Read access.

FAULTY_ACCESS_WRITE 

Write access.

FAULTY_ACCESS_EXECUTE 

Execute access.

◆ FPERROR

Possible types of FPU exceptions.

Enumerator
FPERROR_DIVIDE_BY_ZERO 

The #DE exception.

FPERROR_OVERFLOW 

The #O exception.

FPERROR_UNDERFLOW 

The #U exception.

FPERROR_INEXACT_RESULT 

The #P exception.

FPERROR_INVALID_OPERATION 

The #IA exception on x87 or #I exception on SIMD.

FPERROR_DENORMAL_OPERAND 

The #D exception.

FPERROR_X87_STACK_ERROR 

The #IS exception on x87.

Function Documentation

◆ PIN_CountWindowsExceptionArguments()

UINT32 LEVEL_BASE::PIN_CountWindowsExceptionArguments ( const EXCEPTION_INFO pExceptInfo)

Retrieve the number of Windows system exception's arguments from the specified EXCEPTION_INFO structure.

Parameters
[in]pExceptInfopointer to the exception information structure to be queried
Returns
The number of arguments associated with the system exception
Precondition
The specified exception information should describe an EXCEPTCODE_WINDOWS exception.
Availability:
Mode: All
O/S: Windows
CPU: All

◆ PIN_ExceptionToString()

std::string LEVEL_BASE::PIN_ExceptionToString ( const EXCEPTION_INFO pExceptInfo)

Get a string representation of the specified EXCEPTION_INFO structure.

Parameters
[in]pExceptInfopointer to the exception information structure to be stringized
Returns
The string representation of this structure.
Availability:
Mode: All
O/S: All
CPU: All

◆ PIN_GetExceptionAddress()

ADDRINT LEVEL_BASE::PIN_GetExceptionAddress ( const EXCEPTION_INFO pExceptInfo)

Retrieve the address of the instruction that caused the specified exception.

Parameters
[in]pExceptInfopointer to the exception information structure to be queried
Returns
The address of the instruction that caused the exception
Availability:
Mode: All
O/S: All
CPU: All

◆ PIN_GetExceptionClass()

EXCEPTION_CLASS LEVEL_BASE::PIN_GetExceptionClass ( EXCEPTION_CODE  exceptCode)

Given an exception code, return the corresponding exception class.

Parameters
[in]exceptCodeexception code
Returns
The class of the exception
Availability:
Mode: All
O/S: All
CPU: All

◆ PIN_GetExceptionCode()

EXCEPTION_CODE LEVEL_BASE::PIN_GetExceptionCode ( const EXCEPTION_INFO pExceptInfo)

Retrieve the exception code from the specified EXCEPTION_INFO structure.

Parameters
[in]pExceptInfopointer to the exception information structure to be queried
Returns
The code of the exception
Availability:
Mode: All
O/S: All
CPU: All

◆ PIN_GetFaultyAccessAddress()

BOOL LEVEL_BASE::PIN_GetFaultyAccessAddress ( const EXCEPTION_INFO pExceptInfo,
ADDRINT *  pAccessAddress 
)

Retrieve the address of the faulty memory access from the specified EXCEPTION_INFO structure.

Parameters
[in]pExceptInfopointer to the exception information structure to be queried
[out]pAccessAddresspointer to variable that receives the address of the faulty memory access, if known. If this pointer is NULL, the function only checks if the requested address is known but does not return its value.
Returns
TRUE, if the address of the faulty memory access is known
Precondition
The specified exception information should describe an EXCEPTCLASS_ACCESS_FAULT exception.
Availability:
Mode: All
O/S: All
CPU: All

◆ PIN_GetFaultyAccessType()

FAULTY_ACCESS_TYPE LEVEL_BASE::PIN_GetFaultyAccessType ( const EXCEPTION_INFO pExceptInfo)

Retrieve the type of the faulty memory access from the specified EXCEPTION_INFO structure.

Parameters
[in]pExceptInfopointer to the exception information structure to be queried
Returns
The type of the faulty memory access that caused the exception
Precondition
The specified exception information should describe an EXCEPTCLASS_ACCESS_FAULT exception.
Availability:
Mode: All
O/S: All
CPU: All

◆ PIN_GetFpErrorSet()

UINT32 LEVEL_BASE::PIN_GetFpErrorSet ( const EXCEPTION_INFO pExceptInfo)

Retrieve the set of floating point exception codes from the specified EXCEPTION_INFO structure. For EXCEPTCODE_RECEIVED_AMBIGUOUS_X87 and EXCEPTCODE_RECEIVED_AMBIGUOUS_SIMD exceptions, this is the set of possible causes for the exception.

Parameters
[in]pExceptInfopointer to the exception information structure to be queried
Returns
A bitmask of FPERROR values.
Precondition
The specified exception information should describe an EXCEPTCLASS_MULTIPLE_FP_ERROR exception.
Availability:
Mode: All
O/S: All
CPU: All

◆ PIN_GetWindowsExceptionArgument()

ADDRINT LEVEL_BASE::PIN_GetWindowsExceptionArgument ( const EXCEPTION_INFO pExceptInfo,
UINT32  argNum 
)

Retrieve the specified Windows system exception's argument from the specified EXCEPTION_INFO structure.

Parameters
[in]pExceptInfopointer to the exception information structure to be queried
[in]argNumordinal number of the argument to be retrieved, starting from zero. The value of this parameter should not exceed the value returned by the PIN_CountWindowsExceptionArguments function.
Returns
The value of the specified system exception's argument
Precondition
The specified exception information should describe an EXCEPTCODE_WINDOWS exception.
Availability:
Mode: All
O/S: Windows
CPU: All

◆ PIN_GetWindowsExceptionCode()

UINT32 LEVEL_BASE::PIN_GetWindowsExceptionCode ( const EXCEPTION_INFO pExceptInfo)

Retrieve the Windows system exception code from the specified EXCEPTION_INFO structure.

Parameters
[in]pExceptInfopointer to the exception information structure to be queried
Returns
The system exception code
Precondition
The specified exception information should describe an EXCEPTCODE_WINDOWS exception.
Availability:
Mode: All
O/S: Windows
CPU: All

◆ PIN_InitAccessFaultInfo()

VOID LEVEL_BASE::PIN_InitAccessFaultInfo ( EXCEPTION_INFO pExceptInfo,
EXCEPTION_CODE  exceptCode,
ADDRINT  exceptAddress,
ADDRINT  accessAddress,
FAULTY_ACCESS_TYPE  accessType = FAULTY_ACCESS_TYPE_UNKNOWN 
)

Initialize the specified EXCEPTION_INFO structure with the given attributes of an EXCEPTCLASS_ACCESS_FAULT exception.

Parameters
[out]pExceptInfopointer to the exception information structure to be initialized
[in]exceptCodeexception code that specifies an EXCEPTCLASS_ACCESS_FAULT exception
[in]exceptAddressaddress of the instruction that caused the exception
[in]accessAddressaddress of the faulty memory access
[in]accessTypetype of the faulty memory access
Availability:
Mode: All
O/S: All
CPU: All

◆ PIN_InitExceptionInfo()

VOID LEVEL_BASE::PIN_InitExceptionInfo ( EXCEPTION_INFO pExceptInfo,
EXCEPTION_CODE  exceptCode,
ADDRINT  exceptAddress 
)

Initialize the specified EXCEPTION_INFO structure with the given generic exception's attributes. Set "unknown" state for all exception-specific attributes.

Note
This function is useful when the specified exception code does not require any additional exception information or such information is not available. The function can not be used to initialize EXCEPTCODE_WINDOWS exception information.
Use exception-specific initialization functions if an additional exception information is available/required.
Parameters
[out]pExceptInfopointer to the exception information structure to be initialized
[in]exceptCodeexception code. It could specify any exception other than EXCEPTCODE_WINDOWS
[in]exceptAddressaddress of the instruction that caused the exception
Availability:
Mode: All
O/S: All
CPU: All

◆ PIN_InitWindowsExceptionInfo()

VOID LEVEL_BASE::PIN_InitWindowsExceptionInfo ( EXCEPTION_INFO pExceptInfo,
UINT32  sysExceptCode,
ADDRINT  exceptAddress,
UINT32  numArgs = 0,
const ADDRINT *  pArgs = 0 
)

Initialize the specified EXCEPTION_INFO structure with the given attributes of an EXCEPTCODE_WINDOWS exception.

Parameters
[out]pExceptInfopointer to the exception information structure to be initialized
[in]sysExceptCodethe system exception code
[in]exceptAddressaddress of the instruction that caused the exception
[in]numArgsnumber of arguments associated with the system exception. This is the number of elements in the <pArgs> array; it should not exceed the MAX_WINDOWS_EXCEPTION_ARGS value.
[in]pArgspointer to an array of arguments associated with the system exception or NULL if the number of arguments is zero
Availability:
Mode: All
O/S: Windows
CPU: All

◆ PIN_RaiseException()

VOID LEVEL_PINCLIENT::PIN_RaiseException ( const CONTEXT ctxt,
THREADID  tid,
const EXCEPTION_INFO *  pExceptInfo 
)

A tool can call this API to raise an emulated exception in the application's calling thread. Calling this API abandons the current analysis function and immediately starts executing at the application's exception handler (if there is one) or terminates the application (if there is no handler). This API does not return back to the calling analysis function.

When raising a floating point exception, this method merely raises the exception. It does not set any bits in the floating point status register, nor does it check that the exception is enabled via the exception mask. If the tool wishes to examine or change the floating point status register bits, it may do so via the ctxt parameter.

This function can be called from an analysis function or a replacement routine, but not from an instrumentation callback.

Parameters
[in]ctxtRegister state to be reported as the application's context at the exception point.
[in]tidId of the calling thread.
[in]pExceptInfoPointer to the EXCEPTION_INFO structure that describes the exception. The exception information should be properly initialized.
Returns
This API never returns.
Precondition
All locks must be released before calling to this function.
Note
The vm lock is obtained during the call of this API.
Availability:
Mode: JIT
O/S: Windows
CPU: IA-32 and Intel(R) 64 architectures

◆ PIN_SetExceptionAddress()

VOID LEVEL_BASE::PIN_SetExceptionAddress ( EXCEPTION_INFO pExceptInfo,
ADDRINT  exceptAddress 
)

Set the address of the instruction that caused the specified exception.

Parameters
[in,out]pExceptInfopointer to the exception information structure that receives the new exception address
[in]exceptAddressaddress of the instruction that caused the exception

Variable Documentation

◆ MAX_WINDOWS_EXCEPTION_ARGS

GLOBALCONST UINT32 LEVEL_BASE::MAX_WINDOWS_EXCEPTION_ARGS = 5

Maximum number of arguments that can be associated with an EXCEPTCODE_WINDOWS exception.