]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-142095: Use thread local frame info in `py-bt` and `py-bt-full` when available...
authorSam Gross <colesbury@gmail.com>
Thu, 8 Jan 2026 14:18:24 +0000 (09:18 -0500)
committerGitHub <noreply@github.com>
Thu, 8 Jan 2026 14:18:24 +0000 (09:18 -0500)
commit49c3b0a67a77bb42e736cea7dcbc1aa8fa704074
tree24000a9fda2ade3cdfd4d3497ec6557c17e7f99a
parent5462002bbefd6cb79716828051beae94de8f2529
gh-142095: Use thread local frame info in `py-bt` and `py-bt-full` when available (gh-143371)

In optimized and `-Og` builds, arguments and local variables are frequently
unavailable in gdb. This makes `py-bt` fail to print anything useful. Use the
`PyThreadState*` pointers `_Py_tss_gilstate` and `Py_tss_tstate` to find the
interpreter frame if we can't get the frame from the
`_PyEval_EvalFrameDefault` call.

Co-authored-by: Victor Stinner <vstinner@python.org>
Misc/NEWS.d/next/Tools-Demos/2026-01-02-11-44-56.gh-issue-142095.4ssgnM.rst [new file with mode: 0644]
Tools/gdb/libpython.py