Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v3 0/7] gdb: more fixes for Python limited C API support
@ 2026-03-09 17:56 Matthieu Longo
  2026-03-09 17:56 ` [PATCH v3 1/7] gdb: introduce rgb_color type to simplify existing code Matthieu Longo
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Matthieu Longo @ 2026-03-09 17:56 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 2: https://inbox.sourceware.org/gdb-patches/20260303161659.397427-1-matthieu.longo@arm.com/
- patch 1,3,7 of revision 2 were merged into master.
- patches 1,3,4,5,6,7 were already present in revision 2, and I addressed comments from Tom Tromey of revision 2.
- patch 2 makes the configure script fail if the developer selects the build against the Python limited API with an unsupported version of Python.

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 (7):
  gdb: introduce rgb_color type to simplify existing code
  gdb: fail configure if Python version is too old for limited API
  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: add gdbpy_dict_wrapper:allocate_dict helper
  gdb/python: add accessor helpers for __dict__ in Python extension objects

 gdb/Makefile.in                            |   1 +
 gdb/aclocal.m4                             | 253 +++++++++++++++++++++
 gdb/configure                              |  33 ++-
 gdb/configure.ac                           |  24 +-
 gdb/guile/scm-color.c                      |   9 +-
 gdb/mingw-hdep.c                           |   5 +-
 gdb/python/py-arch.c                       |   3 +-
 gdb/python/py-block.c                      |   5 +-
 gdb/python/py-breakpoint.c                 |   9 +-
 gdb/python/py-color.c                      |  10 +-
 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-inferior.c                   |  42 ++--
 gdb/python/py-infthread.c                  |  15 +-
 gdb/python/py-mi.c                         |   2 +-
 gdb/python/py-micmd.c                      |   2 +-
 gdb/python/py-obj-type.c                   |  74 ++++++
 gdb/python/py-obj-type.h                   |  29 +++
 gdb/python/py-objfile.c                    |  13 +-
 gdb/python/py-progspace.c                  |  40 ++--
 gdb/python/py-ref.h                        |  25 +-
 gdb/python/py-style.c                      |  14 +-
 gdb/python/py-symbol.c                     |   3 +-
 gdb/python/py-type.c                       |  20 +-
 gdb/python/py-unwind.c                     |   8 +-
 gdb/python/py-utils.c                      |   4 +-
 gdb/python/python-internal.h               |   6 +-
 gdb/python/python.c                        |   2 +-
 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                             |  37 ++-
 gdb/ui-style.h                             |  37 ++-
 gdb/unittests/style-selftests.c            |  10 +-
 gdbsupport/gdb_ref_ptr.h                   |   5 +-
 38 files changed, 635 insertions(+), 209 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] 25+ messages in thread

end of thread, other threads:[~2026-04-07 20:40 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-09 17:56 [PATCH v3 0/7] gdb: more fixes for Python limited C API support Matthieu Longo
2026-03-09 17:56 ` [PATCH v3 1/7] gdb: introduce rgb_color type to simplify existing code Matthieu Longo
2026-03-09 19:22   ` Tom Tromey
2026-03-11 15:03     ` Simon Marchi
2026-03-11 17:55       ` Matthieu Longo
2026-03-11 18:04         ` Simon Marchi
2026-03-11 18:16         ` Tom Tromey
2026-03-09 17:56 ` [PATCH v3 2/7] gdb: fail configure if Python version is too old for limited API Matthieu Longo
2026-03-24 18:53   ` Tom Tromey
2026-03-31 10:16     ` Matthieu Longo
2026-04-07 13:36       ` Matthieu Longo
2026-04-07 20:39       ` Tom Tromey
2026-03-09 17:56 ` [PATCH v3 3/7] gdb: add new helpers for retrieving a type's fully qualified name Matthieu Longo
2026-03-24 18:44   ` Tom Tromey
2026-03-09 17:56 ` [PATCH v3 4/7] gdb/python: allow ref_ptr<T, Policy>::new_reference to accept subclasses of T Matthieu Longo
2026-03-09 19:40   ` Tom Tromey
2026-03-10 12:26     ` Matthieu Longo
2026-03-09 17:56 ` [PATCH v3 5/7] gdb/python: flatten functions calling PyObject_New and use gdbpy_ref Matthieu Longo
2026-03-09 20:07   ` Tom Tromey
2026-03-09 17:56 ` [PATCH v3 6/7] gdb/python: add gdbpy_dict_wrapper:allocate_dict helper Matthieu Longo
2026-03-09 20:09   ` Tom Tromey
2026-03-10 12:26     ` Matthieu Longo
2026-03-09 17:56 ` [PATCH v3 7/7] gdb/python: add accessor helpers for __dict__ in Python extension objects Matthieu Longo
2026-03-13 18:09   ` Tom Tromey
2026-03-23 10:28 ` [PATCH v3 0/7] gdb: more fixes for Python limited C API support Matthieu Longo

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