Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae5465a

Browse files
author
Skip Montanaro
committed
Make similar changes to 3.x version.
1 parent 8917d5e commit ae5465a

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

Misc/gdbinit

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,18 @@ end
115115
# interpreter, but the test can be extended by an interested party). If
116116
# Py_Main <= $pc <= Py_GetArgcArv is true, $pc is in Py_Main(), so the while
117117
# tests succeeds as long as it's not true. In a similar fashion the if
118-
# statement tests to see if we are in PyEval_EvalFrame().
118+
# statement tests to see if we are in PyEval_EvalFrameEx().
119+
120+
# Note: The name of the main interpreter function and the function which
121+
# follow it has changed over time. This version of pystack works with this
122+
# version of Python. If you try using it with older or newer versions of
123+
# the interpreter you may will have to change the functions you compare with
124+
# $pc.
119125

120126
# print the entire Python call stack
121127
define pystack
122128
while $pc < Py_Main || $pc > Py_GetArgcArgv
123-
if $pc > PyEval_EvalFrame && $pc < PyEval_EvalCodeEx
129+
if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
124130
pyframe
125131
end
126132
up-silently 1
@@ -131,7 +137,7 @@ end
131137
# print the entire Python call stack - verbose mode
132138
define pystackv
133139
while $pc < Py_Main || $pc > Py_GetArgcArgv
134-
if $pc > PyEval_EvalFrame && $pc < PyEval_EvalCodeEx
140+
if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
135141
pyframev
136142
end
137143
up-silently 1

0 commit comments

Comments
 (0)