Package winappdbg :: Module event :: Class ExceptionEvent
[hide private]
[frames] | no frames]

Class ExceptionEvent


Exception event.

Instance Methods [hide private]
str
get_exception_name(self)
Returns: Name of the exception as defined by the Win32 API.
str
get_exception_description(self)
Returns: User-friendly name of the exception.
bool
is_first_chance(self)
Returns: True for first chance exceptions, False for last chance.
bool
is_last_chance(self)
Returns: The opposite of is_first_chance.
bool
is_noncontinuable(self)
Returns: True if the exception is noncontinuable.
bool
is_continuable(self)
Returns: The opposite of is_noncontinuable.
int
get_exception_code(self)
Returns: Exception code as defined by the Win32 API.
int
get_exception_address(self)
Returns: Memory address where the exception occured.
int
get_exception_information(self, index)
Returns: Exception information DWORD.
list( int )
get_exception_information_as_list(self)
Returns: Exception information block.
 
get_access_violation_type(self)
list( EXCEPTION_RECORD )
get_raw_exception_record_list(self)
Traverses the exception record linked list and builds a Python list.
 
__init__(self, debug, raw)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature (Inherited from winappdbg.event.Event)
int
get_code(self)
Returns: Debug event code as defined in the Win32 API. (Inherited from winappdbg.event.Event)
int
get_event_code(self)
Returns: Debug event code as defined in the Win32 API. (Inherited from winappdbg.event.Event)
str
get_event_description(self)
Returns: User-friendly description of the event. (Inherited from winappdbg.event.Event)
str
get_event_name(self)
Returns: User-friendly name of the event. (Inherited from winappdbg.event.Event)
int
get_pid(self)
Returns: Process global ID where the event occured. (Inherited from winappdbg.event.Event)
Process
get_process(self)
Returns: Process where the event occured. (Inherited from winappdbg.event.Event)
Thread
get_thread(self)
Returns: Thread where the event occured. (Inherited from winappdbg.event.Event)
int
get_tid(self)
Returns: Thread global ID where the event occured. (Inherited from winappdbg.event.Event)

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
str eventName = 'Exception event'
User-friendly name of the event.
str eventDescription = 'An exception was raised by the debugee.'
User-friendly description of the event.
  __exceptionName = {1073807365: 'DBG_CONTROL_C', 1080890248: 'M...
  __exceptionDescription = {1073807365: 'Debug Control-C', 10808...
dict( int → str ) exceptionDescription
Mapping of exception constants to user-friendly strings.
dict( int → str ) exceptionName
Mapping of exception constants to their names.
Instance Variables [hide private]
Breakpoint breakpoint
If the exception was caused by one of our breakpoints, this member contains the a reference to the breakpoint object.
int continueStatus
Continue status to pass to win32.ContinueDebugEvent. (Inherited from winappdbg.event.Event)
Debug debug
Debug object that received the event. (Inherited from winappdbg.event.Event)
DEBUG_EVENT raw
Raw DEBUG_EVENT structure as used by the Win32 API. (Inherited from winappdbg.event.Event)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

get_exception_name(self)

 
Returns: str
Name of the exception as defined by the Win32 API.

get_exception_description(self)

 
Returns: str
User-friendly name of the exception.

is_first_chance(self)

 
Returns: bool
True for first chance exceptions, False for last chance.

is_last_chance(self)

 
Returns: bool
The opposite of is_first_chance.

is_noncontinuable(self)

 
Returns: bool
True if the exception is noncontinuable.

Attempting to continue a noncontinuable exception results in an EXCEPTION_NONCONTINUABLE_EXCEPTION exception to be raised.

is_continuable(self)

 
Returns: bool
The opposite of is_noncontinuable.

get_exception_code(self)

 
Returns: int
Exception code as defined by the Win32 API.

get_exception_address(self)

 
Returns: int
Memory address where the exception occured.

get_exception_information(self, index)

 
Parameters:
  • index (int) - Index into the exception information block.
Returns: int
Exception information DWORD.

get_exception_information_as_list(self)

 
Returns: list( int )
Exception information block.

get_raw_exception_record_list(self)

 

Traverses the exception record linked list and builds a Python list.

Nested exception records are received for nested exceptions. This happens when an exception is raised in the debugee while trying to handle a previous exception.

Returns: list( EXCEPTION_RECORD )
List of raw exception record structures as used by the Win32 API.

There is always at least one exception record, so the list is never empty. All other methods of this class read from the first exception record only, that is, the most recent exception.


Class Variable Details [hide private]

__exceptionName

Value:
{1073807365: 'DBG_CONTROL_C',
 1080890248: 'MS_VC_EXCEPTION',
 2147483649: 'EXCEPTION_GUARD_PAGE',
 2147483650: 'EXCEPTION_DATATYPE_MISALIGNMENT',
 2147483651: 'EXCEPTION_BREAKPOINT',
 2147483652: 'EXCEPTION_SINGLE_STEP',
 3221225477: 'EXCEPTION_ACCESS_VIOLATION',
 3221225478: 'EXCEPTION_IN_PAGE_ERROR',
...

__exceptionDescription

Value:
{1073807365: 'Debug Control-C',
 1080890248: 'Microsoft Visual C exception',
 2147483649: 'Guard page hit',
 2147483650: 'Datatype misalignment',
 2147483651: 'Breakpoint event',
 2147483652: 'Single step event',
 3221225477: 'Access violation',
 3221225478: 'In-page error',
...

Instance Variable Details [hide private]

breakpoint

If the exception was caused by one of our breakpoints, this member contains the a reference to the breakpoint object. Otherwise it's not defined. It should only be used from the condition or action callback routines, instead of the event handler.
Type:
Breakpoint