Scott Graham | 2 Aug 23:53 2011

Loader debug viewing in gdb


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.

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.


webkit-dev mailing list
webkit-dev <at>