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