From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0OBdLOyf6WJhXR8AWB0awg (envelope-from ) for ; Tue, 02 Aug 2022 18:06:36 -0400 Received: by simark.ca (Postfix, from userid 112) id A37791EA05; Tue, 2 Aug 2022 18:06:36 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_DYNAMIC autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 483E61EA03 for ; Tue, 2 Aug 2022 18:06:36 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C0C08385EC53 for ; Tue, 2 Aug 2022 22:06:32 +0000 (GMT) Received: from mail.baldwin.cx (bigwig.baldwin.cx [66.216.25.90]) by sourceware.org (Postfix) with ESMTPS id 5E46B3858C51 for ; Tue, 2 Aug 2022 22:06:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5E46B3858C51 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=FreeBSD.org Received: from ralph.com (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 2AEE71A84BA9 for ; Tue, 2 Aug 2022 18:06:17 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PUSHED OBV] fbsd-nat: Correct the return type of the have_regset method. Date: Tue, 2 Aug 2022 15:05:39 -0700 Message-Id: <20220802220539.83404-1-jhb@FreeBSD.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (mail.baldwin.cx [0.0.0.0]); Tue, 02 Aug 2022 18:06:17 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.103.1 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 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 Sender: "Gdb-patches" During the development of 40c23d880386d6e8202567eaa2a6b041feb1a652, the return value of fbsd_nat_target::have_regset was changed from a simple boolean to returning the size of the register set. The comments and callers were all updated for this change, but the actual return type was accidentally left as a bool. This change fixes the return type to be a size_t. Current callers of this only checked the value against 0 and thus still worked correctly. --- gdb/fbsd-nat.c | 2 +- gdb/fbsd-nat.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c index a4ca4a53415..f38d5d8745b 100644 --- a/gdb/fbsd-nat.c +++ b/gdb/fbsd-nat.c @@ -1779,7 +1779,7 @@ fbsd_nat_target::store_register_set (struct regcache *regcache, int regnum, /* See fbsd-nat.h. */ -bool +size_t fbsd_nat_target::have_regset (ptid_t ptid, int note) { pid_t pid = get_ptrace_pid (ptid); diff --git a/gdb/fbsd-nat.h b/gdb/fbsd-nat.h index eb7d29dd2a3..7a0510c32bd 100644 --- a/gdb/fbsd-nat.h +++ b/gdb/fbsd-nat.h @@ -190,7 +190,7 @@ class fbsd_nat_target : public inf_ptrace_target the size of the register set is returned. If the register set is not present, zero is returned. */ - bool have_regset (ptid_t ptid, int note); + size_t have_regset (ptid_t ptid, int note); /* Wrapper versions of the PT_GETREGSET and PT_REGSET helpers which accept a register set type. */ -- 2.36.1