Oct 21, 2015 at 8:53 AM
Edited Oct 21, 2015 at 8:55 AM
We have some bug with conditional breakpoints.
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.
setBp(offset) # we don't need to hold refernce
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