Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Stronger typing for remote file i/o
@ 2026-02-27 14:28 Tom Tromey
  2026-02-27 14:28 ` [PATCH v2 1/3] Use a newtype for remote file descriptor Tom Tromey
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Tom Tromey @ 2026-02-27 14:28 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey, Simon Marchi

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.

Signed-off-by: Tom Tromey <tromey@adacore.com>
---
Changes in v2:
- Renamed remote_fd to target_fd
- Various other minor changes per review
- Added warn_if_slow patch
- Link to v1: https://inbox.sourceware.org/gdb-patches/20260225-target-fd-newtype-v1-0-e04af6692ccb@adacore.com

---
Tom Tromey (3):
      Use a newtype for remote file descriptor
      Use enum types for remote fileio flags
      Use bool for "warn_if_slow"

 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         | 31 ++++++++++--------
 gdb/solib-rocm.c     | 32 +++++++++---------
 gdb/sparc64-tdep.c   | 24 +++++++-------
 gdb/target.c         | 86 ++++++++++++++++++++++++++-----------------------
 gdb/target.h         | 32 +++++++++++-------
 gdbserver/hostio.cc  |  4 +--
 gdbsupport/fileio.cc | 20 ++++++------
 gdbsupport/fileio.h  | 85 +++++++++++++++++++++++++++---------------------
 14 files changed, 201 insertions(+), 228 deletions(-)
---
base-commit: adbc0c55421dd5e31bb1903512dfb8f5211ee5b0
change-id: 20260225-target-fd-newtype-b5c3e3ad31b7

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


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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-27 14:28 [PATCH v2 0/3] Stronger typing for remote file i/o Tom Tromey
2026-02-27 14:28 ` [PATCH v2 1/3] Use a newtype for remote file descriptor Tom Tromey
2026-02-27 16:30   ` Simon Marchi
2026-02-27 18:17     ` Tom Tromey
2026-02-27 18:22       ` Tom Tromey
2026-02-27 14:28 ` [PATCH v2 2/3] Use enum types for remote fileio flags Tom Tromey
2026-02-27 14:28 ` [PATCH v2 3/3] Use bool for "warn_if_slow" Tom Tromey

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