blob: ae333b2686f163e4e1dd9fcef998fd35b37b0c93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# -*- 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
|