Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v2 0/9] gdb: more fixes for Python limited C API support
@ 2026-03-03 16:16 Matthieu Longo
  2026-03-03 16:16 ` [PATCH v2 1/9] gdb: switch tuple object helpers to Python limited API equivalents Matthieu Longo
                   ` (8 more replies)
  0 siblings, 9 replies; 34+ messages in thread
From: Matthieu Longo @ 2026-03-03 16:16 UTC (permalink / raw)
  To: gdb-patches, Tom Tromey; +Cc: Matthieu Longo

This patch series fixes some of the issues encountered while enabling the Python limited C API in GDB.

Diff with revision 1: https://inbox.sourceware.org/gdb-patches/20260217150259.1391855-1-matthieu.longo@arm.com/
- patches 1,3,4 were already present in revision 1, and I addressed comments from Tom Tromey of revision 1.
- patch 2 is a small refactoring derived from patch 1, and independent of others patches.
- patches 5,6 allows simplification in future patches.
- patches 7,8 are follow-ups on https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=9a84753aa7f8b8939cf4eea9c7f1db4b42e171e1, and simplifies the future migration to heap-allocated types.

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


Matthieu Longo (9):
  gdb: switch tuple object helpers to Python limited API equivalents
  gdb: introduce rgb_color type to simplify existing code
  gdb: switch bytes object helpers to Python limited API equivalents
  gdb: add new helpers for retrieving a type's fully qualified name
  gdb/python: allow ref_ptr<T, Policy>::new_reference to accept subclasses of T
  gdb/python: flatten functions calling PyObject_New and use gdbpy_ref
  gdb/python: accept gdbpy_ref in init helpers and return bool
  gdb/python: add gdbpy_dict_wrapper:allocate_dict helper
  gdb/python: add accessor helpers for __dict__ in Python extension objects

 gdb/Makefile.in                            |  1 +
 gdb/configure                              |  6 +-
 gdb/configure.ac                           |  6 +-
 gdb/python/py-arch.c                       |  3 +-
 gdb/python/py-block.c                      |  3 +-
 gdb/python/py-breakpoint.c                 |  9 ++-
 gdb/python/py-color.c                      | 17 +++--
 gdb/python/py-connection.c                 |  2 +-
 gdb/python/py-corefile.c                   | 55 +++++++-------
 gdb/python/py-disasm.c                     | 17 ++---
 gdb/python/py-event.c                      | 13 ++--
 gdb/python/py-frame.c                      |  4 +-
 gdb/python/py-function.c                   |  3 +-
 gdb/python/py-inferior.c                   | 56 +++++++--------
 gdb/python/py-infthread.c                  | 22 +++---
 gdb/python/py-mi.c                         |  2 +-
 gdb/python/py-micmd.c                      |  2 +-
 gdb/python/py-obj-type.c                   | 84 ++++++++++++++++++++++
 gdb/python/py-obj-type.h                   | 31 ++++++++
 gdb/python/py-objfile.c                    | 38 +++++-----
 gdb/python/py-prettyprint.c                |  5 +-
 gdb/python/py-progspace.c                  | 60 ++++++++--------
 gdb/python/py-ref.h                        | 29 +++++++-
 gdb/python/py-style.c                      | 14 ++--
 gdb/python/py-symbol.c                     | 14 ++--
 gdb/python/py-type.c                       | 25 +++----
 gdb/python/py-unwind.c                     | 16 +++--
 gdb/python/py-utils.c                      |  4 +-
 gdb/python/py-xmethods.c                   | 24 +++++--
 gdb/python/python-internal.h               |  6 +-
 gdb/python/python.c                        |  7 +-
 gdb/testsuite/gdb.python/py-disasm.exp.tcl |  8 +--
 gdb/testsuite/gdb.python/py-unwind.exp     |  2 +-
 gdb/tui/tui-io.c                           |  3 +-
 gdb/ui-style.c                             | 33 ++++-----
 gdb/ui-style.h                             | 38 +++++++++-
 gdb/unittests/style-selftests.c            | 10 +--
 gdbsupport/gdb_ref_ptr.h                   |  5 +-
 38 files changed, 426 insertions(+), 251 deletions(-)
 create mode 100644 gdb/python/py-obj-type.c
 create mode 100644 gdb/python/py-obj-type.h

-- 
2.53.0


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2026-03-09 13:27 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-03 16:16 [PATCH v2 0/9] gdb: more fixes for Python limited C API support Matthieu Longo
2026-03-03 16:16 ` [PATCH v2 1/9] gdb: switch tuple object helpers to Python limited API equivalents Matthieu Longo
2026-03-03 18:09   ` Tom Tromey
2026-03-03 16:16 ` [PATCH v2 2/9] gdb: introduce rgb_color type to simplify existing code Matthieu Longo
2026-03-03 18:16   ` Tom Tromey
2026-03-04 16:30     ` Matthieu Longo
2026-03-03 16:16 ` [PATCH v2 3/9] gdb: switch bytes object helpers to Python limited API equivalents Matthieu Longo
2026-03-03 18:03   ` Tom Tromey
2026-03-03 16:16 ` [PATCH v2 4/9] gdb: add new helpers for retrieving a type's fully qualified name Matthieu Longo
2026-03-03 18:59   ` Tom Tromey
2026-03-06 17:49     ` Matthieu Longo
2026-03-06 19:45       ` Tom Tromey
2026-03-03 16:16 ` [PATCH v2 5/9] gdb/python: allow ref_ptr<T, Policy>::new_reference to accept subclasses of T Matthieu Longo
2026-03-03 18:18   ` Tom Tromey
2026-03-04 16:56     ` Matthieu Longo
2026-03-04 18:55       ` Tom Tromey
2026-03-06 11:37     ` Matthieu Longo
2026-03-06 11:43       ` Matthieu Longo
2026-03-06 16:47       ` Tom Tromey
2026-03-09 11:38         ` Matthieu Longo
2026-03-03 16:16 ` [PATCH v2 6/9] gdb/python: flatten functions calling PyObject_New and use gdbpy_ref Matthieu Longo
2026-03-03 18:22   ` Tom Tromey
2026-03-09 11:41     ` Matthieu Longo
2026-03-03 18:22   ` Tom Tromey
2026-03-03 16:16 ` [PATCH v2 7/9] gdb/python: accept gdbpy_ref in init helpers and return bool Matthieu Longo
2026-03-03 18:24   ` Tom Tromey
2026-03-09 13:25     ` Matthieu Longo
2026-03-03 16:16 ` [PATCH v2 8/9] gdb/python: add gdbpy_dict_wrapper:allocate_dict helper Matthieu Longo
2026-03-03 18:30   ` Tom Tromey
2026-03-06 12:03     ` Matthieu Longo
2026-03-03 16:16 ` [PATCH v2 9/9] gdb/python: add accessor helpers for __dict__ in Python extension objects Matthieu Longo
2026-03-03 19:02   ` Tom Tromey
2026-03-06 14:33     ` Matthieu Longo
2026-03-06 16:04       ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox