From: Tom Tromey <tromey@adacore.com>
To: Simon Marchi <simark@simark.ca>
Cc: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] Use a newtype for remote file descriptor
Date: Fri, 27 Feb 2026 06:36:25 -0700 [thread overview]
Message-ID: <87o6laux46.fsf@tromey.com> (raw)
In-Reply-To: <32b6cfc1-d500-462c-a14d-4999e66afe76@simark.ca> (Simon Marchi's message of "Thu, 26 Feb 2026 11:43:54 -0500")
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
>> target_debug_printf_nofunc ("target_fileio_open (%d,%s,0x%x,0%o,%d) = %d (%d)",
>> - inf == NULL ? 0 : inf->num, filename, flags, mode,
>> - warn_if_slow, fd, fd != -1 ? 0 : *target_errno);
>> - return fd;
>> + inf == NULL ? 0 : inf->num, filename,
>> + flags, mode, warn_if_slow, int (fd),
>> + int (fd) != -1 ? 0 : *target_errno);
>> + return result;
Simon> One more nit: in this function, you don't need to case fd to int, since
Simon> fd is an int. You could either remove the cast, or use `result` in the
Simon> debug print.
Yeah, I meant to use result there, I've fixed this.
Tom
next prev parent reply other threads:[~2026-02-27 13:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=87o6laux46.fsf@tromey.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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