aboutsummaryrefslogtreecommitdiff
path: root/gdb/reggroups.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-03-30 15:53:42 +0100
committerAndrew Burgess <aburgess@redhat.com>2022-04-07 16:01:17 +0100
commitb5556e33b5cbe101257074c497178df6de293c3e (patch)
treece2935f413c1672065dbdba70eb32801735a1393 /gdb/reggroups.c
parent86d77f6a5be904f13c633f10bdf77ff3dd69db94 (diff)
downloadfsf-binutils-gdb-b5556e33b5cbe101257074c497178df6de293c3e.zip
fsf-binutils-gdb-b5556e33b5cbe101257074c497178df6de293c3e.tar.gz
fsf-binutils-gdb-b5556e33b5cbe101257074c497178df6de293c3e.tar.bz2
gdb: add some const in gdb/reggroups.c
This commit makes the 'struct reggroup *' argument const for the following functions: reggroup_next reggroup_prev reggroup_name reggroup_type There are other places that could benefit from const in the reggroup.{c,h} files, but these will be changing in further commits. There should be no user visible changes after this commit.
Diffstat (limited to 'gdb/reggroups.c')
-rw-r--r--gdb/reggroups.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/reggroups.c b/gdb/reggroups.c
index b6afa2f..169285b 100644
--- a/gdb/reggroups.c
+++ b/gdb/reggroups.c
@@ -63,13 +63,13 @@ reggroup_gdbarch_new (struct gdbarch *gdbarch, const char *name,
/* Register group attributes. */
const char *
-reggroup_name (struct reggroup *group)
+reggroup_name (const struct reggroup *group)
{
return group->name;
}
enum reggroup_type
-reggroup_type (struct reggroup *group)
+reggroup_type (const struct reggroup *group)
{
return group->type;
}
@@ -130,7 +130,7 @@ static struct reggroups default_groups = { NULL, &default_groups.first };
/* A register group iterator. */
struct reggroup *
-reggroup_next (struct gdbarch *gdbarch, struct reggroup *last)
+reggroup_next (struct gdbarch *gdbarch, const struct reggroup *last)
{
struct reggroups *groups;
struct reggroup_el *el;
@@ -161,7 +161,7 @@ reggroup_next (struct gdbarch *gdbarch, struct reggroup *last)
/* See reggroups.h. */
struct reggroup *
-reggroup_prev (struct gdbarch *gdbarch, struct reggroup *curr)
+reggroup_prev (struct gdbarch *gdbarch, const struct reggroup *curr)
{
struct reggroups *groups;
struct reggroup_el *el;