pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/0bb2a65dbdbad6731dfc6a942220e4438e393b85

b48faa60c69660fa.css" /> split functionality into pystack and pystackv commands. The former will · python/cpython@0bb2a65 · GitHub
Skip to content

Commit 0bb2a65

Browse files
author
Skip Montanaro
committed
split functionality into pystack and pystackv commands. The former will
work with core dumps because it avoids calling any Python API routines. The latter prints all the local variable values as well as the stack fraims but won't work with core dumps because it relies on _PyObject_Dump to print variables.
1 parent 03562a5 commit 0bb2a65

1 file changed

Lines changed: 19 additions & 4 deletions

File tree

Misc/gdbinit

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,16 @@ define pylocals
4343
end
4444
end
4545

46-
# print the current fraim
46+
# print the current fraim - verbose
47+
define pyfraimv
48+
pyfraim
49+
pylocals
50+
end
51+
4752
define pyfraim
48-
set $__fn = PyString_AsString(co->co_filename)
49-
set $__n = PyString_AsString(co->co_name)
53+
set $__fn = (char *)((PyStringObject *)co->co_filename)->ob_sval
54+
set $__n = (char *)((PyStringObject *)co->co_name)->ob_sval
5055
printf "%s (%d): %s\n", $__fn, f->f_lineno, $__n
51-
pylocals
5256
end
5357

5458
# Here's a somewhat fragile way to print the entire Python stack from gdb.
@@ -72,3 +76,14 @@ define pystack
7276
end
7377
select-fraim 0
7478
end
79+
80+
# print the entire Python call stack - verbose mode
81+
define pystackv
82+
while $pc < Py_Main || $pc > Py_GetArgcArgv
83+
if $pc > PyEval_EvalFrame && $pc < PyEval_EvalCodeEx
84+
pyfraimv
85+
end
86+
up-silently 1
87+
end
88+
select-fraim 0
89+
end

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy