3 # If you use the GNU debugger gdb to debug the Python C runtime, you
4 # might find some of the following commands useful. Copy this to your
5 # ~/.gdbinit file and it'll get loaded into gdb automatically when you
6 # start it up. Then, at the gdb prompt you can do things like:
8 # (gdb) pyo apyobjectptr
9 # <module 'foobar' (built-in)>
15 # Prints a representation of the object to stderr, along with the
16 # number of reference counts it current has and the hex address the
17 # object is allocated at. The argument must be a PyObject*
19 print _PyObject_Dump($arg0)
22 # Prints a representation of the object to stderr, along with the
23 # number of reference counts it current has and the hex address the
24 # object is allocated at. The argument must be a PyGC_Head*
26 print _PyGC_Dump($arg0)