Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/4] Use gdbpy_borrowed_ref more + cast removal
@ 2026-08-08 21:47 Tom Tromey
  2026-08-08 21:47 ` [PATCH 1/4] Change evpy_emit_event to accept a gdbpy_opt_borrowed_ref Tom Tromey
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tom Tromey @ 2026-08-08 21:47 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This started as a series to clean up event generation a little.  Long
term I'd like to migrate all of this to the safe API; but in the
meantime this just arranges to use gdbpy_borrowed_ref some more.  This
lets us remove calls to "get", which seems nice even on its own.

While doing this I noticed many unnecessary casts, so I've added a
patch to remove these as well.

Signed-off-by: Tom Tromey <tom@tromey.com>
---
Tom Tromey (4):
      Change evpy_emit_event to accept a gdbpy_opt_borrowed_ref
      Change evpy_add_attribute to accept gdbpy_borrowed_ref
      Use gdbpy_borrowed_ref when creating events
      Remove unneeded casts to PyObject*

 gdb/python/py-arch.c             |  2 +-
 gdb/python/py-block.c            |  2 +-
 gdb/python/py-bpevent.c          | 10 ++++------
 gdb/python/py-breakpoint.c       | 24 +++++++++---------------
 gdb/python/py-cmd.c              |  8 ++++----
 gdb/python/py-connection.c       |  4 ++--
 gdb/python/py-continueevent.c    |  4 ++--
 gdb/python/py-corefile.c         | 11 +++++------
 gdb/python/py-disasm.c           | 13 ++++++-------
 gdb/python/py-event.c            |  5 +++--
 gdb/python/py-event.h            | 13 +++++++++----
 gdb/python/py-evts.c             |  4 +---
 gdb/python/py-exitedevent.c      | 10 ++++------
 gdb/python/py-finishbreakpoint.c |  7 +++----
 gdb/python/py-inferior.c         | 31 +++++++++++++------------------
 gdb/python/py-infevents.c        | 18 +++++++++---------
 gdb/python/py-infthread.c        |  2 +-
 gdb/python/py-lazy-string.c      |  2 +-
 gdb/python/py-linetable.c        |  4 ++--
 gdb/python/py-membuf.c           |  2 +-
 gdb/python/py-micmd.c            |  2 +-
 gdb/python/py-newobjfileevent.c  | 19 ++++++++-----------
 gdb/python/py-objfile.c          |  7 +++----
 gdb/python/py-progspace.c        | 15 ++++++---------
 gdb/python/py-record-btrace.c    |  2 +-
 gdb/python/py-record.c           | 10 +++++-----
 gdb/python/py-registers.c        |  4 ++--
 gdb/python/py-signalevent.c      |  5 ++---
 gdb/python/py-stopevent.c        |  9 ++++-----
 gdb/python/py-stopevent.h        |  7 ++++---
 gdb/python/py-threadevent.c      | 10 ++++------
 gdb/python/py-tui.c              |  6 +++---
 gdb/python/py-type.c             |  6 +++---
 gdb/python/py-unwind.c           | 12 +++++-------
 gdb/python/python.c              |  4 ++--
 35 files changed, 134 insertions(+), 160 deletions(-)
---
base-commit: c7c7858871f77bb265bbce492d39716f39e0d462
change-id: 20260808-python-safety-events-simple-1a281b2c6dbf

Best regards,
-- 
Tom Tromey <tom@tromey.com>


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

end of thread, other threads:[~2026-08-08 21:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-08 21:47 [PATCH 0/4] Use gdbpy_borrowed_ref more + cast removal Tom Tromey
2026-08-08 21:47 ` [PATCH 1/4] Change evpy_emit_event to accept a gdbpy_opt_borrowed_ref Tom Tromey
2026-08-08 21:47 ` [PATCH 2/4] Change evpy_add_attribute to accept gdbpy_borrowed_ref Tom Tromey
2026-08-08 21:47 ` [PATCH 3/4] Use gdbpy_borrowed_ref when creating events Tom Tromey
2026-08-08 21:47 ` [PATCH 4/4] Remove unneeded casts to PyObject* Tom Tromey

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