tag:blogger.com,1999:blog-5377378398297854379.post1950884285513109887..comments2023-04-07T07:21:05.489-07:00Comments on Details are still coming in: PykdTraceAnonymoushttp://www.blogger.com/profile/11822439249066904087noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5377378398297854379.post-86394724479037397182011-07-22T00:45:22.384-07:002011-07-22T00:45:22.384-07:00Looking start function.
def start(name):
handle...Looking start function.<br />def start(name): <br /> handlers = BpHandlers(name)<br /> b1 = bp( addr1, handlers.CreateProcessHandler)<br /> b2 = bp( addr2, handlers.CloseProcessHandler)<br /> go()<br /> del handlers.logs<br /> del handlers.bpobject<br /> del handlers<br /><br />BpHandler creates 2 objects in constructor. So it doesn't global var. And ref counter should be 0, but...<br />If we make initial break, through debugging, 2 objects logs and bpobject are still exist. <br />Try to make init break and delete this strings<br /> del handlers.logs<br /> del handlers.bpobject<br /><br />But Like I sad, it's working fine if script finished tracing.Anonymoushttps://www.blogger.com/profile/11822439249066904087noreply@blogger.comtag:blogger.com,1999:blog-5377378398297854379.post-29036828475747759672011-07-22T00:30:56.325-07:002011-07-22T00:30:56.325-07:001) Starting 0.0.18 pykd has an exception translato...1) Starting 0.0.18 pykd has an exception translator to python exception. Many piece of code still use console printing for error reporting. It will be refctored in future versions<br /><br />You can test pykd exceptions:<br /><br />addr = 0xDEADBEEF<br /><br />try:<br /><br /> arr = loadChars( addr, 100 )<br /><br />except MemoryException:<br /><br /> print "%x - bas address" % addr<br /><br /><br /><br />2)Destructure is called when ref counter of the object come to 0. For example:<br /><br />def func():<br /> global b1<br /> b1 = bp( addr, handler1 )<br /> b2 = bp( addr, handler2 )<br /> return<br /><br />After func returning, b2 object will be destroyed and breakpoint will be removed, but b1 object will be still live.<br /><br />If you want to remove global object, you can do:<br />del b1<br />Also, you can disbale breakpoint by method remove:<br />b1.remove() <br />b2.set())<br /><br />Thank you for interest for the pykd project.<br /><br />pykd teamPykd Maintainerhttps://www.blogger.com/profile/17452890529873583715noreply@blogger.com