From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YT1CIC6qoWkFmQwAWB0awg (envelope-from ) for ; Fri, 27 Feb 2026 09:29:02 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=CbkcvK7P; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 7D0081E0DD; Fri, 27 Feb 2026 09:29:02 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 936C21E089 for ; Fri, 27 Feb 2026 09:29:01 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 3779D4B9DB40 for ; Fri, 27 Feb 2026 14:29:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3779D4B9DB40 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=CbkcvK7P Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 56AFE4BA23C2 for ; Fri, 27 Feb 2026 14:28:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 56AFE4BA23C2 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 56AFE4BA23C2 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::32d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772202498; cv=none; b=bVwCNBD+0keC5R0ByKoGAUr0h58aFsMGeKa73Ybp6DRv2t1iWhu2dJvlDHUsxJFgbKiyWuNaNiFvTksWKYXl9mb5yDXL/0GAkIroHReNqCV8rv/s4FAPvulgpTjXnAJ+BWJzGczsSuMUqmT4BomjT74J/rBGnmS5n1Aj9iWtvMM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772202498; c=relaxed/simple; bh=yNPoi1l0D5KQ+LfLu0/Y3uZlhF5dCc2STjr4lvovQXg=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=pI0SwgehWdoyYCpxUNZ+KdBpxhYxmo267N93gxWGIDLX4R8Plu8ObaWdZAQ9WkAKWNQBYkDMIC+I/XBMP8Qsx+jKqhcT3Sig1sVskO5gbaSZOkvJQ+Gt/DRrhtppii0Ig9kafLADH56fK5imymzxyOiPk7LRyRDDoOzGXf0HuKI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 56AFE4BA23C2 Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-7d4c3484268so1192298a34.0 for ; Fri, 27 Feb 2026 06:28:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1772202497; x=1772807297; darn=sourceware.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=6wWDtmEQaBj70gMMsLR2QHBTDvqEi7hqxOaIzIWdO18=; b=CbkcvK7PZoou44idSh8grOPyBQU8YfIU90Z6LXr6wFLjBocKphth6m8BLELqNXSe4m Q9qk3Ev+S9bXR3dLZnDldu7m/ZFqPACus1yNqFRAfEeeJTQS/eR5D3diHAezABUwr32D cigqPcVA+RqqzsH5GcJnJXdzFoaacVFDyGpMrVAgopQx9mT+YIfUNsYrDy6f4Q8Stkj6 9L8mlbuuj4gF/S8K9r2XTuU74vrpxwgNjzZrEHbl7wRHgHU/wHFqnI63/7WXxHu7YyFs SyzMJcZUsFN5jjdOUnVunrpUQ98IF6jD6zdQiVk0MeKGoSmwTqQ39h9SZZAIsZZORC8i n7oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772202497; x=1772807297; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=6wWDtmEQaBj70gMMsLR2QHBTDvqEi7hqxOaIzIWdO18=; b=JZspXz6XRYHmvKvxbOCkiudWHbqJaQknU93/R/UgdNWGVl0b7DXwY8CKI2u5gjiD8n pw7I+c5MsEJE2kjNPLNnMNFZPkh5/HydqTknotlrhY3XSFnh9YhFej+Izcm05VUnZwfn qUOGwApa+UpkSQH0anbDiCRg63LPYx6ntCrItGsjEVq905gh3byyZ423+Iw+doYlnUzk QMnm/RfAfTy9lqdSyg0nexHk/zs6l++kEooGCYTj0A0kKGWHBMT2v9gEns9T5KK+sJo+ gfrMG5/Ly/tU6n870mIM3XLHHjnHkJLzQ3wjeWSIW1aF+0OWeMGAyQb/A0Oveyy6OGb4 Da4w== X-Gm-Message-State: AOJu0YxjNUziS8Uo0WUb86wcjG+vE2cgLmUF8ZBMxpKCYnqRYKXOwj+i TCTkxbwd1tNFAcdng5j+JCqPpquD7PYdumzYYG6HFfyKcSwLUQ+X+zo5flHxIkFN/g== X-Gm-Gg: ATEYQzwwnojskyByNk9Ud3YPCiwo5JNrTkdNMr8r7ApF+48xWbhVCaJIR26Ge7OXw3r hoUXeuqL5UV5r4CKXUjDS3DA6rPhvi/wx4t6UIrY1466WGKze8oJocXqklC4j0EndacRVThLcB0 fdZbkJOEGUt47iZM0+ZpezVjRB7SbgPVdw264T5xmqZMkTZeOwRJT7NmTSHXBG24UJoOQtp9RsC 1cC3QFUNr7s50+SoW5YVXfScM6O/CkxrCLC9qxLkQK5V0eSAP0ffjvdM0yUQJWnxfKbZW4Vv/F9 aRMys0/zVc0mtps0Y74rrYPy4Qx1X0h/3G+WB0hCzghpRgwed474YwM0IFJt+LLqUmP29joQ8HT Sb9kVSj+ycEDu4Km504qMaWSrWEaNmzJm5db+enC5/+iYogKpYU/i0WHToR9uvYAEXc6ZjGCNTW Ttwk4F1YsqR3r6ah0OO2h8sfmzIUKfxxBEaW4ykr8ZaPU3ZNcavwLy65cL X-Received: by 2002:a05:6830:6009:b0:7cf:e4a1:8b6b with SMTP id 46e09a7af769-7d591b0e957mr1843397a34.4.1772202497607; Fri, 27 Feb 2026 06:28:17 -0800 (PST) Received: from [192.168.0.26] (97-122-122-234.hlrn.qwest.net. [97.122.122.234]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d58666f30esm4304322a34.26.2026.02.27.06.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 06:28:17 -0800 (PST) From: Tom Tromey Date: Fri, 27 Feb 2026 07:28:15 -0700 Subject: [PATCH v2 3/3] Use bool for "warn_if_slow" MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260227-target-fd-newtype-v2-3-7a266666ae36@adacore.com> References: <20260227-target-fd-newtype-v2-0-7a266666ae36@adacore.com> In-Reply-To: <20260227-target-fd-newtype-v2-0-7a266666ae36@adacore.com> To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.14.3 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org A few places still used int for the type of the 'warn_if_slow' flag. This fixes all these spots. --- gdb/inf-child.c | 2 +- gdb/inf-child.h | 2 +- gdb/linux-nat.c | 2 +- gdb/linux-nat.h | 2 +- gdb/remote.c | 8 ++++---- gdb/target.c | 2 +- gdb/target.h | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gdb/inf-child.c b/gdb/inf-child.c index 22e52686d5e..7983ecb0d92 100644 --- a/gdb/inf-child.c +++ b/gdb/inf-child.c @@ -234,7 +234,7 @@ inf_child_target::pid_to_exec_file (int pid) int inf_child_target::fileio_open (struct inferior *inf, const char *filename, fileio_open_flags flags, fileio_mode_flags mode, - int warn_if_slow, fileio_error *target_errno) + bool warn_if_slow, fileio_error *target_errno) { int nat_flags; mode_t nat_mode; diff --git a/gdb/inf-child.h b/gdb/inf-child.h index 7d2d4eab68e..9fa62664b36 100644 --- a/gdb/inf-child.h +++ b/gdb/inf-child.h @@ -75,7 +75,7 @@ class inf_child_target int fileio_open (struct inferior *inf, const char *filename, fileio_open_flags flags, fileio_mode_flags mode, - int warn_if_slow, fileio_error *target_errno) override; + bool warn_if_slow, fileio_error *target_errno) override; int fileio_pwrite (int fd, const gdb_byte *write_buf, int len, ULONGEST offset, fileio_error *target_errno) override; int fileio_pread (int fd, gdb_byte *read_buf, int len, diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 22dbfbc31f9..1d0a4609a3a 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -4573,7 +4573,7 @@ linux_nat_fileio_pid_of (struct inferior *inf) int linux_nat_target::fileio_open (struct inferior *inf, const char *filename, fileio_open_flags flags, fileio_mode_flags mode, - int warn_if_slow, fileio_error *target_errno) + bool warn_if_slow, fileio_error *target_errno) { int nat_flags; mode_t nat_mode; diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h index 2d2ccbc2371..0f128892735 100644 --- a/gdb/linux-nat.h +++ b/gdb/linux-nat.h @@ -101,7 +101,7 @@ class linux_nat_target : public inf_ptrace_target int fileio_open (struct inferior *inf, const char *filename, fileio_open_flags flags, fileio_mode_flags mode, - int warn_if_slow, fileio_error *target_errno) override; + bool warn_if_slow, fileio_error *target_errno) override; std::optional fileio_readlink (struct inferior *inf, diff --git a/gdb/remote.c b/gdb/remote.c index 04b24f0a703..7ec4cbf3209 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1115,7 +1115,7 @@ class remote_target : public process_stratum_target int fileio_open (struct inferior *inf, const char *filename, fileio_open_flags flags, fileio_mode_flags mode, - int warn_if_slow, + bool warn_if_slow, fileio_error *target_errno) override; int fileio_pwrite (int fd, const gdb_byte *write_buf, int len, @@ -1291,7 +1291,7 @@ class remote_target : public process_stratum_target /* We should get rid of this and use fileio_open directly. */ int remote_hostio_open (struct inferior *inf, const char *filename, fileio_open_flags flags, fileio_mode_flags mode, - int warn_if_slow, fileio_error *remote_errno); + bool warn_if_slow, fileio_error *remote_errno); int remote_hostio_close (int fd, fileio_error *remote_errno); int remote_hostio_unlink (inferior *inf, const char *filename, @@ -13403,7 +13403,7 @@ int remote_target::remote_hostio_open (inferior *inf, const char *filename, fileio_open_flags flags, fileio_mode_flags mode, - int warn_if_slow, + bool warn_if_slow, fileio_error *remote_errno) { struct remote_state *rs = get_remote_state (); @@ -13450,7 +13450,7 @@ remote_target::remote_hostio_open (inferior *inf, const char *filename, int remote_target::fileio_open (struct inferior *inf, const char *filename, fileio_open_flags flags, fileio_mode_flags mode, - int warn_if_slow, fileio_error *remote_errno) + bool warn_if_slow, fileio_error *remote_errno) { return remote_hostio_open (inf, filename, flags, mode, warn_if_slow, remote_errno); diff --git a/gdb/target.c b/gdb/target.c index 611f37c9730..66672f3ca38 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3177,7 +3177,7 @@ fileio_fd_to_fh (target_fd fd) int target_ops::fileio_open (struct inferior *inf, const char *filename, fileio_open_flags flags, fileio_mode_flags mode, - int warn_if_slow, fileio_error *target_errno) + bool warn_if_slow, fileio_error *target_errno) { *target_errno = FILEIO_ENOSYS; return -1; diff --git a/gdb/target.h b/gdb/target.h index 89f6180b9e5..95434f8e342 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -992,7 +992,7 @@ struct target_ops *TARGET_ERRNO). */ virtual int fileio_open (struct inferior *inf, const char *filename, fileio_open_flags flags, fileio_mode_flags mode, - int warn_if_slow, fileio_error *target_errno); + bool warn_if_slow, fileio_error *target_errno); /* Write up to LEN bytes from WRITE_BUF to FD on the target. Return the number of bytes written, or -1 if an error occurs -- 2.53.0