From: John Baldwin <jhb@FreeBSD.org>
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 [thread overview]
Message-ID: <20220802220539.83404-1-jhb@FreeBSD.org> (raw)
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
reply other threads:[~2022-08-02 22:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220802220539.83404-1-jhb@FreeBSD.org \
--to=jhb@freebsd.org \
--cc=gdb-patches@sourceware.org \
/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