2 Aug 2011 23:53
Loader debug viewing in gdb
Scott Graham <scottmg <at> chromium.org>
2011-08-02 21:53:01 GMT
2011-08-02 21:53:01 GMT
Hi,
I've been trying to debug some lifetime issues in Loader-related code. I was finding it quite challenging to visualize how the objects connect and interrelate, especially as links change over time. To help a bit, I wrote a small python script for gdb that displays a graph of related objects. https://bugs.webkit.org/show_bug.cgi?id=65574
The dump/view part of it is written somewhat generically and takes a map of types to operate on. It allows for collapsing logically connected objects into one graph node in the diagram to avoid huge sprawl. (see attached diagram where e.g. m_ptr RefPtrs are collapsed into their containing object).
I've only defined the type map for a viewer for Loader-related objects ("viewloadergraph" in gdb) but it should be obvious how to add a similar command for other subsystems. Perhaps it will be useful to someone, or someone'll have an idea to make it more useful.
scott
_______________________________________________ webkit-dev mailing list webkit-dev <at> lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
RSS Feed