]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
fbsd-nat: Correct the return type of the have_regset method.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 2 Aug 2022 21:54:28 +0000 (14:54 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 1 Sep 2022 22:27:51 +0000 (15:27 -0700)
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
gdb/fbsd-nat.h

index 9dfbd599c92d8bd249b06673dcc5ac633ce43e0d..ec7f47f5afb5980df7b3939f19a7daaf4bc602f5 100644 (file)
@@ -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);
index ba359c623141a5b5ffaf76a9b51e82db23106006..b16478afb70e226d9334865bd376683c36edcd27 100644 (file)
@@ -190,7 +190,7 @@ protected:
      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.  */