[issue47092] [C API] Add PyFrame_GetVar(frame, name) function

STINNER Victor report at bugs.python.org
Tue Mar 22 10:53:26 EDT 2022


STINNER Victor <vstinner at python.org> added the comment:

Currently, Tools/gdb/libpython.py uses PyFramePtr.iter_locals() which iterates on PyFrameObject.f_frame.localsplus.

There is a PyFramePtr.get_var_by_name() function which only checks for frame variables in PyFrameObject.f_frame.localsplus, or look up in globals and builtins. So it only supports some kinds of variables.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47092>
_______________________________________


More information about the Python-bugs-list mailing list