[webkit-dev] gdb archer and tracking live objects
zecke at selfish.org
Mon Mar 15 00:38:25 PDT 2010
one of the archer branches of gdb allows to turn gdb into a python interpreter
and allow scripting.
My idea was to use this to track all refcounted objects in WebCore and answer
questions like. How many objects are alive? How many objects changed from
point a to b? What are the refcounts? Where was the ref count increased?
I have a slightly modified release build to turn RefCountedBase into a non
inline class and only compile the RefCounted.cpp with -ggdb3 debug support to
easily set a breakpoint there.
With the attached python script I'm able to keep track of RefCountedBase
objects, have commands to print the python dictionary from a gdb cli. I have
no other exploring functions in place.
I wonder if I could develop this tool inside a subdirectory
WebKitTools/Scripts without the usual review process?
Due some limitations in the python support the workflow is currently like this:
gdb -P script GtKLauncher
... questions about pending breakpoints...
WebCore has 2891 live objects of 0 kinds
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3379 bytes
Desc: not available
More information about the webkit-dev