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

Class EventDispatcher


Implements debug event dispatching capabilities.

Instance Methods [hide private]
 
__init__(self, eventHandler=None)
Event dispatcher.
 
dispatch(self, event)
Sends event notifications to the Debug object and the EventHandler object provided by the user.

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

Class Variables [hide private]
  __preEventNotifyCallbackName = {2: 'notify_create_thread', 3: ...
  __postEventNotifyCallbackName = {4: 'notify_exit_thread', 5: '...
  __preExceptionNotifyCallbackName = {1073807365: 'notify_debug_...
  __postExceptionNotifyCallbackName = {}
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, eventHandler=None)
(Constructor)

 

Event dispatcher.

Parameters:
  • eventHandler (EventHandler) - (Optional) Event handler object.
Overrides: object.__init__

Note: The eventHandler parameter may be any callable Python object (for example a function, or an instance method). However you'll probably find it more convenient to use an instance of a subclass of EventHandler here.

dispatch(self, event)

 

Sends event notifications to the Debug object and the EventHandler object provided by the user.

The Debug object will forward the notifications to it's contained snapshot objects (System, Process, Thread and Module) when appropriate.

Parameters:
Raises:
  • WindowsError - Raises an exception on error.

Warning: This method is called automatically from Debug.dispatch.

See Also: Debug.cont, Debug.loop, Debug.wait


Class Variable Details [hide private]

__preEventNotifyCallbackName

Value:
{2: 'notify_create_thread',
 3: 'notify_create_process',
 6: 'notify_load_dll'}

__postEventNotifyCallbackName

Value:
{4: 'notify_exit_thread',
 5: 'notify_exit_process',
 7: 'notify_unload_dll',
 9: 'notify_rip'}

__preExceptionNotifyCallbackName

Value:
{1073807365: 'notify_debug_control_c',
 1080890248: 'notify_ms_vc_exception',
 2147483649: 'notify_guard_page',
 2147483651: 'notify_breakpoint',
 2147483652: 'notify_single_step'}