From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1936) id 6BFAD385801B; Tue, 2 Aug 2022 22:05:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BFAD385801B Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: John Baldwin To: gdb-cvs@sourceware.org Subject: [binutils-gdb] fbsd-nat: Correct the return type of the have_regset method. X-Act-Checkin: binutils-gdb X-Git-Author: John Baldwin X-Git-Refname: refs/heads/master X-Git-Oldrev: 2ba2f096185c201607cdb1571e51e00e8b66e449 X-Git-Newrev: 13db4a0c4d307541926e503ed066b3bc17277678 Message-Id: <20220802220532.6BFAD385801B@sourceware.org> Date: Tue, 2 Aug 2022 22:05:32 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2022 22:05:32 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D13db4a0c4d30= 7541926e503ed066b3bc17277678 commit 13db4a0c4d307541926e503ed066b3bc17277678 Author: John Baldwin Date: Tue Aug 2 14:54:28 2022 -0700 fbsd-nat: Correct the return type of the have_regset method. =20 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. =20 Current callers of this only checked the value against 0 and thus still worked correctly. Diff: --- 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, =20 /* See fbsd-nat.h. */ =20 -bool +size_t fbsd_nat_target::have_regset (ptid_t ptid, int note) { pid_t pid =3D 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 @@ protected: the size of the register set is returned. If the register set is not present, zero is returned. */ =20 - bool have_regset (ptid_t ptid, int note); + size_t have_regset (ptid_t ptid, int note); =20 /* Wrapper versions of the PT_GETREGSET and PT_REGSET helpers which accept a register set type. */