Quantcast
Channel: Python extension for WinDbg
Viewing all articles
Browse latest Browse all 1625

Commented Issue: Exception in debugger client IDebugEventCallbacks::Breakpoint callback. (pykd-0.3.0.32-py27-win32) [13748]

$
0
0
Hello.
I started to use this extension(pykd-0.3.0.32-py27-win32) in cdb.exe and windbg.exe debuggers and I ran into some troubles.
first, I used setBp (very cool) function for breakpoints registration.
I didn't do something complicated, and I guessed that if the function return True this program will break and continue otherwise.

here's the code:
```
from pykd import *

import sys

def createFileBreakpoint(*args, **kargs):
if len(kargs) > 0:
print "args: ", args
if len(kargs.keys()) > 0:
print "kargs", kargs
try:
# print "CreateFileW reached"

# Get parameters
stackBase = reg("esp")
ret_address, file_path_address = loadDWords(stackBase, 2)
# print ret_address, file_path_address
createFilePath = loadWStr(file_path_address)
if "script" in createFilePath:
print "Break point! :)"
print "File path {0}".format(createFilePath)
return True
return False
except Exception as e:
print "Exception in createFileBreakpoint: {0}".format(e)


def main():
try:
createFileW = module("kernel32").CreateFileW
bp = setBp(createFileW, createFileBreakpoint)
go()
except Exception as e:
print "Exception: {0}".format(e)
pass

if __name__ == "__main__":
main()
```


this code is not complicated, just checking first parameter of CreateFileW.
but after the program stop (which is okay), and I let it go (by writing "g; " in console), the debugger crush with this message (cdb and windbg):
```
e06d7363 Exception in debugger client IDebugEventCallbacks::Breakpoint callback.
PC: 76e8c42d VA: 03c8e520 R/W: 19930520 Parameter: 0f40fed8
```
Comments: ** Comment from web user: kernelnet **

Try to upgrade to 0.3.0.33 and read: http://pykd.codeplex.com/discussions/646458
You need to hold 'bp' reference in the global namespace


Viewing all articles
Browse latest Browse all 1625

Trending Articles