summaryrefslogtreecommitdiffstats
path: root/Misc/gdbinit
diff options
context:
space:
mode:
authorMarcel Plch <gmarcel.plch@gmail.com>2018-04-06 21:22:04 (GMT)
committerNed Deily <nad@python.org>2018-04-06 21:22:04 (GMT)
commit3a9ccee0e5dbf7d67f5ab79f6095755969db117c (patch)
tree50a414670e88c0a8b72e46cbedff2a47d63b99f3 /Misc/gdbinit
parent1d87c7b80bf74a3030034a022a7a54ea4e3cdaff (diff)
downloadcpython-3a9ccee0e5dbf7d67f5ab79f6095755969db117c.zip
cpython-3a9ccee0e5dbf7d67f5ab79f6095755969db117c.tar.gz
cpython-3a9ccee0e5dbf7d67f5ab79f6095755969db117c.tar.bz2
bpo-29673: fix gdb scripts pystack and pystackv (GH-6126)
Diffstat (limited to 'Misc/gdbinit')
-rw-r--r--Misc/gdbinit14
1 files changed, 7 insertions, 7 deletions
diff --git a/Misc/gdbinit b/Misc/gdbinit
index 9f21621..afefe08 100644
--- a/Misc/gdbinit
+++ b/Misc/gdbinit
@@ -42,8 +42,8 @@ define pylocals
set $_i = 0
while $_i < f->f_code->co_nlocals
if f->f_localsplus + $_i != 0
- set $_names = co->co_varnames
- set $_name = _PyUnicode_AsString(PyTuple_GetItem($_names, $_i))
+ set $_names = f->f_code->co_varnames
+ set $_name = PyUnicode_AsUTF8(PyTuple_GetItem($_names, $_i))
printf "%s:\n", $_name
pyo f->f_localsplus[$_i]
end
@@ -84,8 +84,8 @@ define pyframev
end
define pyframe
- set $__fn = _PyUnicode_AsString(co->co_filename)
- set $__n = _PyUnicode_AsString(co->co_name)
+ set $__fn = PyUnicode_AsUTF8(f->f_code->co_filename)
+ set $__n = PyUnicode_AsUTF8(f->f_code->co_name)
printf "%s (", $__fn
lineno
printf "): %s\n", $__n
@@ -110,7 +110,7 @@ end
#end
define printframe
- if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
+ if $pc > PyEval_EvalFrameEx && $pc < _PyEval_EvalFrameDefault
pyframe
else
frame
@@ -139,7 +139,7 @@ document pystack
end
define pystack
while $pc < Py_Main || $pc > Py_GetArgcArgv
- if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
+ if $pc > PyEval_EvalFrameEx && $pc < _PyEval_EvalFrameDefault
pyframe
end
up-silently 1
@@ -152,7 +152,7 @@ document pystackv
end
define pystackv
while $pc < Py_Main || $pc > Py_GetArgcArgv
- if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
+ if $pc > PyEval_EvalFrameEx && $pc < _PyEval_EvalFrameDefault
pyframev
end
up-silently 1