summaryrefslogtreecommitdiffstats
path: root/Misc/gdbinit
diff options
context:
space:
mode:
Diffstat (limited to 'Misc/gdbinit')
-rw-r--r--Misc/gdbinit15
1 files changed, 10 insertions, 5 deletions
diff --git a/Misc/gdbinit b/Misc/gdbinit
index 2c89a7a..9484b51 100644
--- a/Misc/gdbinit
+++ b/Misc/gdbinit
@@ -12,8 +12,7 @@
#
# NOTE: If you have gdb 7 or later, it supports debugging of Python directly
# with embedded macros that you may find superior to what is in here.
-# See https://fedoraproject.org/wiki/Features/EasierPythonDebugging
-# and http://bugs.python.org/issue8032 for more gdb 7 python information.
+# See Tools/gdb/libpython.py and http://bugs.python.org/issue8032.
# Prints a representation of the object to stderr, along with the
# number of reference counts it current has and the hex address the
@@ -119,12 +118,18 @@ end
# interpreter, but the test can be extended by an interested party). If
# Py_Main <= $pc <= Py_GetArgcArv is true, $pc is in Py_Main(), so the while
# tests succeeds as long as it's not true. In a similar fashion the if
-# statement tests to see if we are in PyEval_EvalFrame().
+# statement tests to see if we are in PyEval_EvalFrameEx().
+
+# Note: The name of the main interpreter function and the function which
+# follow it has changed over time. This version of pystack works with this
+# version of Python. If you try using it with older or newer versions of
+# the interpreter you may will have to change the functions you compare with
+# $pc.
# print the entire Python call stack
define pystack
while $pc < Py_Main || $pc > Py_GetArgcArgv
- if $pc > PyEval_EvalFrame && $pc < PyEval_EvalCodeEx
+ if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
pyframe
end
up-silently 1
@@ -135,7 +140,7 @@ end
# print the entire Python call stack - verbose mode
define pystackv
while $pc < Py_Main || $pc > Py_GetArgcArgv
- if $pc > PyEval_EvalFrame && $pc < PyEval_EvalCodeEx
+ if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
pyframev
end
up-silently 1