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

New Post: 0.3.x change breakpoint behaviour

$
0
0
Hi All!

We have some bug with conditional breakpoints.

See:
http://pykd.codeplex.com/workitem/13750
http://pykd.codeplex.com/workitem/13748

The main problem the time of live of the python object is not equal to the time of live of breakpoints in the Debug Engine.

There is a strong way:
Python script should get a strong reference to breakpoint object. But it is not convenient to use with unconditional breakpoints especially with REPL. Also some functions return breakpoint object ( for example, getBp ) "for information" and I'm confused what we should do with different reference to the same breakpoint objects.

So, I'm going to offer a compromise:
breakpoints objects will have weak or strong reference depend on case of use:
1) setBp without callback return weak reference.
def set(offset):
   setBp(offset) # we don't need to hold refernce

def del(bp)
   bp.remove()  # breakpoint should be removed explicitly
2) setBp with callback:
setBp(offset, cb) # wrong!  breakpoint will removed when reference is gone
bp = setBp(offset, cb)  #OK, but bp should be hold
3) getBp always return weak reference

Viewing all articles
Browse latest Browse all 1625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>