From: Matthieu Longo <matthieu.longo@arm.com>
To: <gdb-patches@sourceware.org>, Tom Tromey <tom@tromey.com>
Cc: Matthieu Longo <matthieu.longo@arm.com>
Subject: [PATCH v1 0/4] gdb/python: more fixes again for Python limited C API support
Date: Thu, 9 Apr 2026 11:51:51 +0100 [thread overview]
Message-ID: <20260409105155.1416274-1-matthieu.longo@arm.com> (raw)
This patch series fixes more issues encountered while enabling the Python limited C API in GDB. This is probably the last relatively-small patch series before the Python C extension types migration to the limited API.
Patch 1 reuses a previous patch publised by Tom Tromey [1], with additional modifications that are required for its usage in the Python C extension types migration.
Patch 2 adapts the signature of eval_python_command() to return both the exit code and the result.
Patch 3 migrates Python initialization to use the new config API (PEP 741) introduced by Python 3.14. Old code is preserved for older versions of Python.
Patch 4 proposes a workaround for the missing symbols not yet part of the limited API. Thanks to it, I was able to finish the compilation of GDB using the limited C API and run all the Python tests successfully.
All changes were tested by building GDB against the unlimited API of Python 3.10, 3.11, 3.12, 3.13 and 3.14, and the limited API of Python 3.14 (no build regression), and no regressions were observed in the testsuite.
Regards,
Matthieu
[1]: https://inbox.sourceware.org/gdb-patches/20260222200759.1587070-2-tom@tromey.com/
Matthieu Longo (3):
gdb/python: eval_python_command returns both exit code and result
gdb/python: migrate Python initialization to use the new config API (PEP 741)
gdb/python: work around missing symbols not yet part of Python limited API
Tom Tromey (1):
gdb/python: add gdbpy_borrowed_ref
gdb/python/py-gdb-readline.c | 3 +-
gdb/python/py-ref.h | 114 +++++++++++++++
gdb/python/python-internal.h | 7 +-
gdb/python/python-limited-api-missing.h | 62 ++++++++
gdb/python/python.c | 182 ++++++++++++++++++++----
gdb/varobj.c | 12 +-
6 files changed, 341 insertions(+), 39 deletions(-)
create mode 100644 gdb/python/python-limited-api-missing.h
--
2.53.0
next reply other threads:[~2026-04-09 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 10:51 Matthieu Longo [this message]
2026-04-09 10:51 ` [PATCH v1 1/4] gdb/python: add gdbpy_borrowed_ref Matthieu Longo
2026-04-09 10:51 ` [PATCH v1 2/4] gdb/python: eval_python_command returns both exit code and result Matthieu Longo
2026-04-09 10:51 ` [PATCH v1 3/4] gdb/python: migrate Python initialization to use the new config API (PEP 741) Matthieu Longo
2026-04-09 10:51 ` [PATCH v1 4/4] gdb/python: work around missing symbols not yet part of Python limited API Matthieu Longo
2026-04-15 9:18 ` [PATCH v1 0/4] gdb/python: more fixes again for Python limited C API support Matthieu Longo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260409105155.1416274-1-matthieu.longo@arm.com \
--to=matthieu.longo@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox