From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 0/2] Stronger typing for remote file i/o
Date: Wed, 25 Feb 2026 14:25:50 -0700 [thread overview]
Message-ID: <20260225-target-fd-newtype-v1-0-e04af6692ccb@adacore.com> (raw)
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>
next reply other threads:[~2026-02-25 21:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 21:25 Tom Tromey [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260225-target-fd-newtype-v1-0-e04af6692ccb@adacore.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox