MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / on_exception

Method on_exception

windows/debug/debugger.py:1070–1082  ·  view source on GitHub ↗

Called on exception event other that known breakpoint or requested single step. ``exception`` is one of the following type: * :class:`windows.winobject.exception.EEXCEPTION_DEBUG_INFO32` * :class:`windows.winobject.exception.EEXCEPTION_DEBUG_INFO64` The d

(self, exception)

Source from the content-addressed store, hash-verified

1068
1069
1070 def on_exception(self, exception):
1071 """Called on exception event other that known breakpoint or requested single step. ``exception`` is one of the following type:
1072
1073 * :class:`windows.winobject.exception.EEXCEPTION_DEBUG_INFO32`
1074 * :class:`windows.winobject.exception.EEXCEPTION_DEBUG_INFO64`
1075
1076 The default behaviour is to return ``DBG_CONTINUE`` for the known exception code
1077 and ``DBG_EXCEPTION_NOT_HANDLED`` else
1078 """
1079 dbgprint("Exception: {0} at ".format(exception.ExceptionRecord.ExceptionCode, exception.ExceptionRecord.ExceptionAddress), "DBG")
1080 if not exception.ExceptionRecord.ExceptionCode in winexception.exception_name_by_value:
1081 return DBG_EXCEPTION_NOT_HANDLED
1082 return DBG_CONTINUE
1083
1084 def on_single_step(self, exception):
1085 """Called on requested single step ``exception`` is one of the following type:

Calls

no outgoing calls

Tested by

no test coverage detected