public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: have reggroup_find return a const Date: Thu, 7 Apr 2022 15:08:11 +0000 (GMT) [thread overview] Message-ID: <20220407150811.C5178385DC3B@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2b72890eba0373fee1e5c6f6ac0157782222ef3d commit 2b72890eba0373fee1e5c6f6ac0157782222ef3d Author: Andrew Burgess <aburgess@redhat.com> Date: Thu Mar 31 16:24:32 2022 +0100 gdb: have reggroup_find return a const Update reggroup_find to return a const reggroup *. There are other function in gdb/reggroup.{c,h} files that could benefit from returning const, these will be updated in later commits. There should be no user visible changes after this commit. Diff: --- gdb/reggroups.c | 2 +- gdb/reggroups.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gdb/reggroups.c b/gdb/reggroups.c index d5a263f8109..6c38ca743f4 100644 --- a/gdb/reggroups.c +++ b/gdb/reggroups.c @@ -219,7 +219,7 @@ default_register_reggroup_p (struct gdbarch *gdbarch, int regnum, /* See reggroups.h. */ -reggroup * +const reggroup * reggroup_find (struct gdbarch *gdbarch, const char *name) { struct reggroup *group; diff --git a/gdb/reggroups.h b/gdb/reggroups.h index df8e871e365..bc87a7325f0 100644 --- a/gdb/reggroups.h +++ b/gdb/reggroups.h @@ -62,7 +62,8 @@ extern struct reggroup *reggroup_next (struct gdbarch *gdbarch, extern struct reggroup *reggroup_prev (struct gdbarch *gdbarch, const struct reggroup *curr); /* Find a reggroup by name. */ -extern reggroup *reggroup_find (struct gdbarch *gdbarch, const char *name); +extern const reggroup *reggroup_find (struct gdbarch *gdbarch, + const char *name); /* Is REGNUM a member of REGGROUP? */ extern int default_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
reply other threads:[~2022-04-07 15:08 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=20220407150811.C5178385DC3B@sourceware.org \ --to=aburgess@sourceware.org \ --cc=gdb-cvs@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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).