[webkit-dev] Loader debug viewing in gdb

Scott Graham scottmg at chromium.org
Tue Aug 2 14:53:01 PDT 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110802/cd2f70bf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmpDE0M5U.dot.png
Type: image/png
Size: 88932 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110802/cd2f70bf/attachment.png>


More information about the webkit-dev mailing list