How to set break point callback handler

Aug 2, 2014 at 6:40 AM
Hi,

Using pydbg we can easily set break point at any address and its callback handler function using dbg.bp_set( , , )
def bp_handler():
          #Do anything

dbg = pydbg()
..
..
dbg.bp_set(0xaddress,handler=bp_handler)
My question is , how do i do the same using pykd??

Thanks in Advance
Coordinator
Aug 4, 2014 at 7:49 AM
For pykd 0.3.x:
0:000> x ntdll!NtCreateFile
00000000`77601800 ntdll!NtCreateFile = <no type information>
0:000> .load pykd.pyd
0:000> !py
Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> def bp_handler():
...   print( "bp_handler" )
...   return Break
... 
>>> setBp(0x77601800, bp_handler)
2147483649L
>>> exit()
0:000> g
bp_handler
ntdll!NtCreateFile:
00000000`77601800 4c8bd1          mov     r10,rcx