From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>,
Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH v2 0/3] Stronger typing for remote file i/o
Date: Fri, 27 Feb 2026 07:28:12 -0700 [thread overview]
Message-ID: <20260227-target-fd-newtype-v2-0-7a266666ae36@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.
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>
next reply other threads:[~2026-02-27 14:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 14:28 Tom Tromey [this message]
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
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=20260227-target-fd-newtype-v2-0-7a266666ae36@adacore.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
/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