aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-03-31 16:24:32 +0100
committerAndrew Burgess <aburgess@redhat.com>2022-04-07 16:01:18 +0100
commit2b72890eba0373fee1e5c6f6ac0157782222ef3d (patch)
tree10da945ba80938d6303243732eb1109ac9761eeb /gdb
parent0ee336595924558bde5486becd83a9e4c40059ed (diff)
downloadgdb-2b72890eba0373fee1e5c6f6ac0157782222ef3d.zip
gdb-2b72890eba0373fee1e5c6f6ac0157782222ef3d.tar.gz
gdb-2b72890eba0373fee1e5c6f6ac0157782222ef3d.tar.bz2
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/reggroups.c2
-rw-r--r--gdb/reggroups.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/gdb/reggroups.c b/gdb/reggroups.c
index d5a263f..6c38ca7 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 df8e871..bc87a73 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,