diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-03-31 16:32:50 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-04-07 16:01:18 +0100 |
commit | e7fe10114995aee4d7012f287e5b8fee74c60fd8 (patch) | |
tree | e30f89ec5f814ca00e0f164a7ac19dd1e1647d0b /gdb/reggroups.c | |
parent | 1bca9b1e6be9cb45684f38dba0d4d323447a653a (diff) | |
download | binutils-gdb-e7fe10114995aee4d7012f287e5b8fee74c60fd8.tar.gz |
gdb: more 'const' in gdb/reggroups.{c,h}
Convert the reggroup_new and reggroup_gdbarch_new functions to return
a 'const regggroup *', and fix up all the fallout.
There should be no user visible changes after this commit.
Diffstat (limited to 'gdb/reggroups.c')
-rw-r--r-- | gdb/reggroups.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/reggroups.c b/gdb/reggroups.c index 7b8537e94f6..bb8a83f7653 100644 --- a/gdb/reggroups.c +++ b/gdb/reggroups.c @@ -36,7 +36,7 @@ struct reggroup enum reggroup_type type; }; -struct reggroup * +const reggroup * reggroup_new (const char *name, enum reggroup_type type) { struct reggroup *group = XNEW (struct reggroup); @@ -48,7 +48,7 @@ reggroup_new (const char *name, enum reggroup_type type) /* See reggroups.h. */ -struct reggroup * +const reggroup * reggroup_gdbarch_new (struct gdbarch *gdbarch, const char *name, enum reggroup_type type) { @@ -81,7 +81,7 @@ struct reggroups { /* Add GROUP to the list of register groups. */ - void add (struct reggroup *group) + void add (const reggroup *group) { gdb_assert (group != nullptr); gdb_assert (std::find (m_groups.begin(), m_groups.end(), group) @@ -116,7 +116,7 @@ static struct gdbarch_data *reggroups_data; /* Add GROUP to the list of register groups for GDBARCH. */ void -reggroup_add (struct gdbarch *gdbarch, struct reggroup *group) +reggroup_add (struct gdbarch *gdbarch, const reggroup *group) { struct reggroups *groups = (struct reggroups *) gdbarch_data (gdbarch, reggroups_data); |