mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +08:00
git-svn-id: https://pykd.svn.codeplex.com/svn@69567 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
95b80ecd0c
commit
4af5301232
@ -33,10 +33,18 @@ knownExcepCodes = {
|
|||||||
0xc000013a : "CONTROL_C_EXIT"
|
0xc000013a : "CONTROL_C_EXIT"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class ExceptionHandler(debugEvent):
|
class ExceptionHandler(debugEvent):
|
||||||
|
def __init__(self):
|
||||||
|
self.stopExceptionOccurred = False
|
||||||
|
debugEvent.__init__(self)
|
||||||
|
|
||||||
def onException(self, exceptData):
|
def onException(self, exceptData):
|
||||||
|
|
||||||
|
if exceptData["FirstChance"]:
|
||||||
|
return DEBUG_STATUS_NO_CHANGE
|
||||||
|
|
||||||
|
self.stopExceptionOccurred = True
|
||||||
|
|
||||||
dprintln("\n *** shit happens")
|
dprintln("\n *** shit happens")
|
||||||
|
|
||||||
exceptCode = exceptData["Code"]
|
exceptCode = exceptData["Code"]
|
||||||
@ -70,8 +78,6 @@ class ExceptionHandler(debugEvent):
|
|||||||
for param in exceptData["Parameters"]:
|
for param in exceptData["Parameters"]:
|
||||||
dprintln("\t0x%X" % param)
|
dprintln("\t0x%X" % param)
|
||||||
|
|
||||||
dprintln("\nFirst chance : " + str( exceptData["FirstChance"] ))
|
|
||||||
|
|
||||||
dbgCommand( ".reload" )
|
dbgCommand( ".reload" )
|
||||||
dprintln( "\n " + dbgCommand( "r" ) )
|
dprintln( "\n " + dbgCommand( "r" ) )
|
||||||
dprintln( dbgCommand( "kb" ) )
|
dprintln( dbgCommand( "kb" ) )
|
||||||
@ -89,7 +95,9 @@ if __name__ == '__main__':
|
|||||||
exceptionHandler = ExceptionHandler()
|
exceptionHandler = ExceptionHandler()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
go()
|
|
||||||
|
while not exceptionHandler.stopExceptionOccurred:
|
||||||
|
go()
|
||||||
|
|
||||||
except WaitEventException:
|
except WaitEventException:
|
||||||
dprintln("none of the targets could generate events")
|
dprintln("none of the targets could generate events")
|
||||||
|
Loading…
Reference in New Issue
Block a user