Finding referents with Gdb

dieter dieter at handshake.de
Wed May 1 04:33:16 EDT 2013


Dave Butler <daveb at tanagerproductions.com> writes:

> with gdb, can you find referents of an object given an object id?

Usually no.

"gdb" is a C level debugger. If debugging information is available
(and the type of an object know), "gdb" can show you the fields
of an object. If you know the correct type, you can cast an object
to this type and get the field information. Thus, "gdb" gives you
a possibility to examine the objects, a given object refers to.
However, in general, there is no data structure (in a C program) that
provides access to the objects that refer to a given object.
In such cases, "gdb" cannot help you to find those objects.






More information about the Python-list mailing list