Pin
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
EXCEPTION_INFO Struct Reference

Classes

union  EXCEPTION_SPECIFIC
 

Public Member Functions

EXCEPTION_INFOInit (EXCEPTION_CODE exceptCode, ADDRINT exceptAddress)
 
EXCEPTION_CODE GetExceptCode () const
 
EXCEPTION_CLASS GetExceptClass () const
 
ADDRINT GetExceptAddress () const
 
VOID SetExceptAddress (ADDRINT exceptAddress)
 
BOOL IsTrap () const
 
VOID Reset ()
 
BOOL IsEmpty () const
 
std::string ToString () const
 
std::string GetCodeAsString () const
 
EXCEPTION_INFOInitAccessFault (EXCEPTION_CODE exceptCode, ADDRINT exceptAddress, ADDRINT accessAddress, FAULTY_ACCESS_TYPE accessType=FAULTY_ACCESS_TYPE_UNKNOWN)
 
BOOL IsAccessFault () const
 
FAULTY_ACCESS_TYPE GetFaultyAccessType () const
 
BOOL GetFaultyAccessAddress (ADDRINT *pAccessAddress) const
 
EXCEPTION_INFOInitMultipleFpError (EXCEPTION_CODE exceptCode, ADDRINT exceptAddress, UINT32 fpErrors)
 
BOOL IsMultipleFpException () const
 
UINT32 GetFpErrors () const
 
EXCEPTION_INFOInitWindowsSysException (UINT32 sysExceptCode, ADDRINT exceptAddress, UINT32 numArgs=0, const ADDRINT *pArgs=0)
 
BOOL IsWindowsSysException () const
 
UINT32 GetWindowsSysExceptionCode () const
 
UINT32 CountWindowsSysArguments () const
 
ADDRINT GetWindowsSysArgument (UINT32 argNum) const
 

Static Public Member Functions

static EXCEPTION_CLASS GetExceptClass (EXCEPTION_CODE exceptCode)
 
static BOOL IsTrap (EXCEPTION_CODE exceptCode)
 

Public Attributes

EXCEPTION_CODE m_exceptCode
 
ADDRINT m_exceptAddress
 
union EXCEPTION_INFO::EXCEPTION_SPECIFIC m_specific
 

Detailed Description

Structure (POD) that describes an exception

Member Function Documentation

◆ CountWindowsSysArguments()

UINT32 EXCEPTION_INFO::CountWindowsSysArguments ( ) const
inline
Returns
The number of arguments associated with the Windows system exception
Precondition
This structure should describe an EXCEPTCODE_WINDOWS exception.

◆ GetCodeAsString()

std::string EXCEPTION_INFO::GetCodeAsString ( ) const
Returns
The name of the exception's code.

◆ GetExceptAddress()

ADDRINT EXCEPTION_INFO::GetExceptAddress ( ) const
inline
Returns
The address of the instruction that caused the exception

◆ GetExceptClass()

static EXCEPTION_CLASS EXCEPTION_INFO::GetExceptClass ( EXCEPTION_CODE  exceptCode)
static
Returns
The class of the exception

◆ GetExceptCode()

EXCEPTION_CODE EXCEPTION_INFO::GetExceptCode ( ) const
inline
Returns
The code of the exception

◆ GetFaultyAccessAddress()

BOOL EXCEPTION_INFO::GetFaultyAccessAddress ( ADDRINT *  pAccessAddress) const
inline

Get the address of the faulty memory access, if known.

Parameters
[out]pAccessAddressoptional pointer to variable that receives the address of the faulty memory access, if known.
Returns
TRUE, if the address of the faulty memory access is known
Precondition
This structure should describe an EXCEPTCLASS_ACCESS_FAULT exception.

◆ GetFaultyAccessType()

FAULTY_ACCESS_TYPE EXCEPTION_INFO::GetFaultyAccessType ( ) const
inline
Returns
The type of the faulty memory access.
Precondition
This structure should describe an EXCEPTCLASS_ACCESS_FAULT exception.

◆ GetFpErrors()

UINT32 EXCEPTION_INFO::GetFpErrors ( ) const
inline
Returns
The exception's bit mask of FP exception codes.
Precondition
This structure should describe an EXCEPTCLASS_MULTIPLE_FP_ERROR exception.

◆ GetWindowsSysArgument()

ADDRINT EXCEPTION_INFO::GetWindowsSysArgument ( UINT32  argNum) const
inline

Get the specified Windows system exception's argument.

Parameters
[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 CountWindowsSysArguments() function.
Returns
The value of the specified system exception's argument
Precondition
This structure should describe an EXCEPTCODE_WINDOWS exception.

◆ GetWindowsSysExceptionCode()

UINT32 EXCEPTION_INFO::GetWindowsSysExceptionCode ( ) const
inline
Returns
The Windows system exception code
Precondition
This structure should describe an EXCEPTCODE_WINDOWS exception.

◆ Init()

EXCEPTION_INFO& EXCEPTION_INFO::Init ( EXCEPTION_CODE  exceptCode,
ADDRINT  exceptAddress 
)

Initialize this structure with the given generic exception's attributes. Set "unknown" state for all exception-specific attributes. 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.

Parameters
[in]exceptCodeexception code
[in]exceptAddressaddress of the instruction that caused the exception
Returns
reference to this structure

◆ InitAccessFault()

EXCEPTION_INFO& EXCEPTION_INFO::InitAccessFault ( EXCEPTION_CODE  exceptCode,
ADDRINT  exceptAddress,
ADDRINT  accessAddress,
FAULTY_ACCESS_TYPE  accessType = FAULTY_ACCESS_TYPE_UNKNOWN 
)

Initialize this structure with the given attributes of an EXCEPTCLASS_ACCESS_FAULT exception.

Parameters
[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
Returns
reference to this structure

◆ InitMultipleFpError()

EXCEPTION_INFO& EXCEPTION_INFO::InitMultipleFpError ( EXCEPTION_CODE  exceptCode,
ADDRINT  exceptAddress,
UINT32  fpErrors 
)

Initialize this structure with the given attributes of an EXCEPTCLASS_MULTIPLE_FP_ERROR exception.

Parameters
[in]exceptCodeexception code that specifies an EXCEPTCLASS_MULTIPLE_FP_ERROR exception
[in]exceptAddressaddress of the instruction that caused the exception
[in]fpErrorsbit mask of FP exception codes
Returns
reference to this structure

◆ InitWindowsSysException()

EXCEPTION_INFO& EXCEPTION_INFO::InitWindowsSysException ( UINT32  sysExceptCode,
ADDRINT  exceptAddress,
UINT32  numArgs = 0,
const ADDRINT *  pArgs = 0 
)

Initialize this structure with the given attributes of an EXCEPTCODE_WINDOWS exception.

Parameters
[in]sysExceptCodethe system exception code
[in]exceptAddressaddress of the instruction that caused the exception
[in]numArgsnumber of arguments in the [pArgs] array. The number should not exceed the MAX_WINDOWS_EXCEPTION_ARGS value.
[in]pArgspointer to an array of arguments associated with the exception or NULL if the number of arguments is zero
Returns
reference to this structure

◆ IsAccessFault()

BOOL EXCEPTION_INFO::IsAccessFault ( ) const
inline
Returns
TRUE if this structure describes an EXCEPTCLASS_ACCESS_FAULT exception

◆ IsEmpty()

BOOL EXCEPTION_INFO::IsEmpty ( ) const
inline
Returns
TRUE, if this structure has been reset and does not contain a valid exception information.

◆ IsMultipleFpException()

BOOL EXCEPTION_INFO::IsMultipleFpException ( ) const
inline
Returns
TRUE if this structure describes an EXCEPTCLASS_MULTIPLE_FP_ERROR exception

◆ IsTrap()

static BOOL EXCEPTION_INFO::IsTrap ( EXCEPTION_CODE  exceptCode)
static
Returns
TRUE if the specified exception is a trap. Traps are reported in the context that represents state of registers after executing the instruction that caused the trap. The exception address and the value of the PC register in the trap context are different.

◆ IsWindowsSysException()

BOOL EXCEPTION_INFO::IsWindowsSysException ( ) const
inline
Returns
TRUE if this structure describes an EXCEPTCODE_WINDOWS exception

◆ Reset()

VOID EXCEPTION_INFO::Reset ( )
inline

Remove the exception information and initialize this structure as empty.

◆ SetExceptAddress()

VOID EXCEPTION_INFO::SetExceptAddress ( ADDRINT  exceptAddress)
inline

Set the address of the instruction that caused the exception

◆ ToString()

std::string EXCEPTION_INFO::ToString ( ) const
Returns
The string representation of this structure.

The documentation for this struct was generated from the following file: