Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] Stronger typing for remote file i/o
@ 2026-02-25 21:25 Tom Tromey
  2026-02-25 21:25 ` [PATCH 1/2] Use a newtype for remote file descriptor Tom Tromey
  2026-02-25 21:25 ` [PATCH 2/2] Use enum types for remote fileio flags Tom Tromey
  0 siblings, 2 replies; 9+ messages in thread
From: Tom Tromey @ 2026-02-25 21:25 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This short series adds stronger typing to the remote file i/o APIs, by
replacing some integers with enums.  This prevents mixing host and
remote-protocol values, and also differentiates between host and
remote file descriptors.

Regression tested on x86-64 Fedora 43.

Note I could not test the solib-rocm.c changes.  These are best
effort.

Signed-off-by: Tom Tromey <tromey@adacore.com>
---
Tom Tromey (2):
      Use a newtype for remote file descriptor
      Use enum types for remote fileio flags

 gdb/gdb_bfd.c        |  8 ++---
 gdb/inf-child.c      |  4 +--
 gdb/inf-child.h      |  4 +--
 gdb/linux-nat.c      |  4 +--
 gdb/linux-nat.h      |  4 +--
 gdb/remote-fileio.c  | 91 +++++++++-------------------------------------------
 gdb/remote.c         | 19 ++++++-----
 gdb/solib-rocm.c     | 30 ++++++++---------
 gdb/sparc64-tdep.c   | 23 ++++++-------
 gdb/target.c         | 76 +++++++++++++++++++++++--------------------
 gdb/target.h         | 32 +++++++++++-------
 gdbserver/hostio.cc  |  4 +--
 gdbsupport/fileio.cc | 20 ++++++------
 gdbsupport/fileio.h  | 81 ++++++++++++++++++++++++++--------------------
 14 files changed, 186 insertions(+), 214 deletions(-)
---
base-commit: adbc0c55421dd5e31bb1903512dfb8f5211ee5b0
change-id: 20260225-target-fd-newtype-b5c3e3ad31b7

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


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

end of thread, other threads:[~2026-02-27 14:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-25 21:25 [PATCH 0/2] Stronger typing for remote file i/o Tom Tromey
2026-02-25 21:25 ` [PATCH 1/2] Use a newtype for remote file descriptor Tom Tromey
2026-02-26 16:38   ` Simon Marchi
2026-02-27 13:36     ` Tom Tromey
2026-02-26 16:43   ` Simon Marchi
2026-02-27 13:36     ` Tom Tromey
2026-02-25 21:25 ` [PATCH 2/2] Use enum types for remote fileio flags Tom Tromey
2026-02-26 17:10   ` Simon Marchi
2026-02-27 14:15     ` Tom Tromey

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