Staging
v0.5.1
https://github.com/python/cpython
Revision 078135764252fcafbc2eef6b1c86c9153c88c597 authored by Anthony Baxter on 23 October 2006, 15:46:01 UTC, committed by Anthony Baxter on 23 October 2006, 15:46:01 UTC
1 parent b4c8cba
Raw File
Tip revision: 078135764252fcafbc2eef6b1c86c9153c88c597 authored by Anthony Baxter on 23 October 2006, 15:46:01 UTC
Tagging for release of Python 2.3.6c1
Tip revision: 0781357
gdbinit
# -*- ksh -*-
#
# 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:
#
#    (gdb) pyo apyobjectptr
#    <module 'foobar' (built-in)>
#    refcounts: 1
#    address    : 84a7a2c
#    $1 = void
#    (gdb)

# 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*
define pyo
print _PyObject_Dump($arg0)
end

# 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*
define pyg
print _PyGC_Dump($arg0)
end
back to top