-
Notifications
You must be signed in to change notification settings - Fork 74
Description
#error in while Call_back
i modified the _breakpoints.py class's add( ) to see what was happening
def add(self, address, callback, bp_type=NORMAL, hw_type=EXECUTE):
if bp_type == self.BP_NORMAL:
SetBreakpoint(address)
elif bp_type == self.BP_HARDWARE:
SetHardwareBreakpoint(address, hw_type)
self.__breakpoints[address]['callback'] = callback
self.__breakpoints[address]['type'] = bp_type
print self.__breakpoints[address] #modification to see whether the breakpoint was added at the
specific address
#also i modified the __breakpoint_function
def __breakpoint_function(self, **kwargs):
address = kwargs['addr']
print self.__breakpoints[address] #modification to see whether the breakpoint exits after
if address in self.__breakpoints:
if not (kwargs['enabled'] and kwargs['active']):
return
self.__breakpoints[address]'callback'
#when i run the program below i get the below error
{'callback': <function call_back at 0x056B7E70>, 'type': 1} #results of print from add()
{} #results of print from __breakpoint_function
[PYTHON] Could not use breakpoint function.
Traceback (most recent call last):
File "C:\tools\SNAPSH~1\release\x32\plugins\x64dbgpy\x64dbgpy__breakpoints.py", line 39, in __breakpoint_function
self.__breakpoints[address]'callback'
KeyError: 'callback'
Could You Please tell me why is this happening