diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-03-31 12:36:06 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-04-07 16:01:17 +0100 |
commit | dbf5d61bdad9131d31c3410f123db3e296d91dfc (patch) | |
tree | 9ef27c372410bd8981fc7e32f43f0d0fddb63485 | |
parent | b5556e33b5cbe101257074c497178df6de293c3e (diff) | |
download | fsf-binutils-gdb-dbf5d61bdad9131d31c3410f123db3e296d91dfc.zip fsf-binutils-gdb-dbf5d61bdad9131d31c3410f123db3e296d91dfc.tar.gz fsf-binutils-gdb-dbf5d61bdad9131d31c3410f123db3e296d91dfc.tar.bz2 |
gdb: make gdbarch_register_reggroup_p take a const reggroup *
Change gdbarch_register_reggroup_p to take a 'const struct reggroup *'
argument. This requires a change to the gdb/gdbarch-components.py
script, regeneration of gdbarch.{c,h}, and then updates to all the
architectures that implement this method.
There should be no user visible changes after this commit.
-rw-r--r-- | gdb/aarch64-tdep.c | 2 | ||||
-rw-r--r-- | gdb/alpha-tdep.c | 2 | ||||
-rw-r--r-- | gdb/amd64-linux-tdep.c | 2 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 2 | ||||
-rw-r--r-- | gdb/csky-tdep.c | 2 | ||||
-rw-r--r-- | gdb/gdbarch-components.py | 2 | ||||
-rw-r--r-- | gdb/gdbarch-gen.h | 4 | ||||
-rw-r--r-- | gdb/gdbarch.c | 2 | ||||
-rw-r--r-- | gdb/i386-linux-tdep.c | 2 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 2 | ||||
-rw-r--r-- | gdb/i386-tdep.h | 2 | ||||
-rw-r--r-- | gdb/ia64-tdep.c | 2 | ||||
-rw-r--r-- | gdb/lm32-tdep.c | 2 | ||||
-rw-r--r-- | gdb/m32c-tdep.c | 2 | ||||
-rw-r--r-- | gdb/m68hc11-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mep-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 4 | ||||
-rw-r--r-- | gdb/msp430-tdep.c | 2 | ||||
-rw-r--r-- | gdb/nds32-tdep.c | 2 | ||||
-rw-r--r-- | gdb/reggroups.c | 2 | ||||
-rw-r--r-- | gdb/reggroups.h | 2 | ||||
-rw-r--r-- | gdb/riscv-tdep.c | 2 | ||||
-rw-r--r-- | gdb/rl78-tdep.c | 2 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 2 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 2 | ||||
-rw-r--r-- | gdb/sh-tdep.c | 2 | ||||
-rw-r--r-- | gdb/target-descriptions.c | 4 | ||||
-rw-r--r-- | gdb/target-descriptions.h | 2 | ||||
-rw-r--r-- | gdb/xtensa-tdep.c | 4 |
29 files changed, 33 insertions, 33 deletions
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index fb1434c..cdeeece 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -2695,7 +2695,7 @@ aarch64_pseudo_register_type (struct gdbarch *gdbarch, int regnum) static int aarch64_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch); diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 7f3af21..f04bad6 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -139,7 +139,7 @@ alpha_register_type (struct gdbarch *gdbarch, int regno) static int alpha_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { /* Filter out any registers eliminated, but whose regnum is reserved for backward compatibility, e.g. the vfp. */ diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c index 88a24c1..0e5194f 100644 --- a/gdb/amd64-linux-tdep.c +++ b/gdb/amd64-linux-tdep.c @@ -279,7 +279,7 @@ static int amd64_linux_sc_reg_offset[] = static int amd64_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { if (regnum == AMD64_LINUX_ORIG_RAX_REGNUM || regnum == AMD64_FSBASE_REGNUM diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 3e91dd7..fbc0a38 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -9105,7 +9105,7 @@ arm_elf_osabi_sniffer (bfd *abfd) static int arm_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { /* FPS register's type is INT, but belongs to float_reggroup. Beside this, FPS register belongs to save_regroup, restore_reggroup, and diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c index 09e8fc5..f137673 100644 --- a/gdb/csky-tdep.c +++ b/gdb/csky-tdep.c @@ -2063,7 +2063,7 @@ csky_add_reggroups (struct gdbarch *gdbarch) static int csky_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *reggroup) + const struct reggroup *reggroup) { int raw_p; diff --git a/gdb/gdbarch-components.py b/gdb/gdbarch-components.py index c820dda..e8f20c8 100644 --- a/gdb/gdbarch-components.py +++ b/gdb/gdbarch-components.py @@ -1460,7 +1460,7 @@ Is a register in a group """, type="int", name="register_reggroup_p", - params=[("int", "regnum"), ("struct reggroup *", "reggroup")], + params=[("int", "regnum"), ("const struct reggroup *", "reggroup")], predefault="default_register_reggroup_p", invalid=False, ) diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h index 7a87213..882b905 100644 --- a/gdb/gdbarch-gen.h +++ b/gdb/gdbarch-gen.h @@ -833,8 +833,8 @@ extern void set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarc /* Is a register in a group */ -typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup); -extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup); +typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int regnum, const struct reggroup *reggroup); +extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, const struct reggroup *reggroup); extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p); /* Fetch the pointer to the ith function argument. */ diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index ff404f4..a588bde 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -3632,7 +3632,7 @@ set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, } int -gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup) +gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, const struct reggroup *reggroup) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->register_reggroup_p != NULL); diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 1f1aaa7..5d7f541 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -54,7 +54,7 @@ group. Put the LINUX_ORIG_EAX register in the system group. */ static int i386_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { if (regnum == I386_LINUX_ORIG_EAX_REGNUM) return (group == system_reggroup diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 870caca..400ccd6 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -4557,7 +4557,7 @@ i386_add_reggroups (struct gdbarch *gdbarch) int i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); int fp_regnum_p, mmx_regnum_p, xmm_regnum_p, mxcsr_regnum_p, diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h index eb58dd6..a8067cf 100644 --- a/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h @@ -418,7 +418,7 @@ extern int i386_sigtramp_p (struct frame_info *this_frame); /* Return non-zero if REGNUM is a member of the specified group. */ extern int i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group); + const struct reggroup *group); /* Supply register REGNUM from the general-purpose register set REGSET to register cache REGCACHE. If REGNUM is -1, do this for all diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index c2d1a47..69a4b4d 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -322,7 +322,7 @@ ia64_ext_type (struct gdbarch *gdbarch) static int ia64_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { int vector_p; int float_p; diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c index cb516e8..f3f1f87 100644 --- a/gdb/lm32-tdep.c +++ b/gdb/lm32-tdep.c @@ -73,7 +73,7 @@ lm32_add_reggroups (struct gdbarch *gdbarch) static int lm32_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { if (group == general_reggroup) return ((regnum >= SIM_LM32_R0_REGNUM) && (regnum <= SIM_LM32_RA_REGNUM)) diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c index 5e4844b..9408730 100644 --- a/gdb/m32c-tdep.c +++ b/gdb/m32c-tdep.c @@ -252,7 +252,7 @@ m32c_debug_info_reg_to_regnum (struct gdbarch *gdbarch, int reg_nr) static int m32c_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch); struct m32c_reg *reg = &tdep->regs[regnum]; diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 070eeb8..f1133fe 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1372,7 +1372,7 @@ m68hc11_add_reggroups (struct gdbarch *gdbarch) static int m68hc11_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { /* We must save the real hard register as well as gcc soft registers including the frame pointer. */ diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c index d16c68e..8f2f0a3 100644 --- a/gdb/mep-tdep.c +++ b/gdb/mep-tdep.c @@ -1028,7 +1028,7 @@ static struct reggroup *mep_ccr_reggroup; /* coprocessor control */ static int mep_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { /* Filter reserved or unused register numbers. */ { diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 4bdbf0f..9157e9f 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -698,7 +698,7 @@ mips_register_name (struct gdbarch *gdbarch, int regno) static int mips_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *reggroup) + const struct reggroup *reggroup) { int vector_p; int float_p; @@ -738,7 +738,7 @@ mips_register_reggroup_p (struct gdbarch *gdbarch, int regnum, static int mips_tdesc_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *reggroup) + const struct reggroup *reggroup) { int rawnum = regnum % gdbarch_num_regs (gdbarch); int pseudo = regnum / gdbarch_num_regs (gdbarch); diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c index 86277e0..28268a9 100644 --- a/gdb/msp430-tdep.c +++ b/gdb/msp430-tdep.c @@ -203,7 +203,7 @@ msp430_register_name (struct gdbarch *gdbarch, int regnr) static int msp430_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { if (group == all_reggroup) return 1; diff --git a/gdb/nds32-tdep.c b/gdb/nds32-tdep.c index f854856..425d7d9 100644 --- a/gdb/nds32-tdep.c +++ b/gdb/nds32-tdep.c @@ -368,7 +368,7 @@ nds32_add_reggroups (struct gdbarch *gdbarch) static int nds32_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *reggroup) + const struct reggroup *reggroup) { const char *reg_name; const char *group_name; diff --git a/gdb/reggroups.c b/gdb/reggroups.c index 169285b..d5a263f 100644 --- a/gdb/reggroups.c +++ b/gdb/reggroups.c @@ -190,7 +190,7 @@ reggroup_prev (struct gdbarch *gdbarch, const struct reggroup *curr) /* Is REGNUM a member of REGGROUP? */ int default_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { int vector_p; int float_p; diff --git a/gdb/reggroups.h b/gdb/reggroups.h index ef99483..df8e871 100644 --- a/gdb/reggroups.h +++ b/gdb/reggroups.h @@ -66,6 +66,6 @@ extern 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, - struct reggroup *reggroup); + const struct reggroup *reggroup); #endif diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c index 2752937..8713652 100644 --- a/gdb/riscv-tdep.c +++ b/gdb/riscv-tdep.c @@ -1271,7 +1271,7 @@ riscv_is_unknown_csr (struct gdbarch *gdbarch, int regnum) static int riscv_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *reggroup) + const struct reggroup *reggroup) { /* Used by 'info registers' and 'info registers <groupname>'. */ diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c index df04939..6ea0473 100644 --- a/gdb/rl78-tdep.c +++ b/gdb/rl78-tdep.c @@ -586,7 +586,7 @@ rl78_g10_register_name (struct gdbarch *gdbarch, int regnr) static int rl78_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { if (group == all_reggroup) return 1; diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 5bf4364..44828bc 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -2642,7 +2642,7 @@ rs6000_pseudo_register_type (struct gdbarch *gdbarch, int regnum) static int rs6000_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch); diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index e54348b..14b03a1 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -1440,7 +1440,7 @@ s390_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, static int s390_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch); diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index c12d40b..2341a9b 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -1490,7 +1490,7 @@ sh_default_register_type (struct gdbarch *gdbarch, int reg_nr) TODO: sh2a and dsp registers. */ static int sh_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *reggroup) + const struct reggroup *reggroup) { if (gdbarch_register_name (gdbarch, regnum) == NULL || *gdbarch_register_name (gdbarch, regnum) == '\0') diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c index ae3b821..33277c3 100644 --- a/gdb/target-descriptions.c +++ b/gdb/target-descriptions.c @@ -1007,7 +1007,7 @@ tdesc_remote_register_number (struct gdbarch *gdbarch, int regno) int tdesc_register_in_reggroup_p (struct gdbarch *gdbarch, int regno, - struct reggroup *reggroup) + const struct reggroup *reggroup) { struct tdesc_reg *reg = tdesc_find_register (gdbarch, regno); @@ -1028,7 +1028,7 @@ tdesc_register_in_reggroup_p (struct gdbarch *gdbarch, int regno, static int tdesc_register_reggroup_p (struct gdbarch *gdbarch, int regno, - struct reggroup *reggroup) + const struct reggroup *reggroup) { int num_regs = gdbarch_num_regs (gdbarch); int num_pseudo_regs = gdbarch_num_pseudo_regs (gdbarch); diff --git a/gdb/target-descriptions.h b/gdb/target-descriptions.h index 9d95997..3b90ded 100644 --- a/gdb/target-descriptions.h +++ b/gdb/target-descriptions.h @@ -229,7 +229,7 @@ struct type *tdesc_find_type (struct gdbarch *gdbarch, const char *id); specify a group. */ int tdesc_register_in_reggroup_p (struct gdbarch *gdbarch, int regno, - struct reggroup *reggroup); + const struct reggroup *reggroup); /* Methods for constructing a target description. */ diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index 203d2e8..62be136 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -755,7 +755,7 @@ xtensa_add_reggroups (struct gdbarch *gdbarch) } static int -xtensa_coprocessor_register_group (struct reggroup *group) +xtensa_coprocessor_register_group (const struct reggroup *group) { int i; @@ -776,7 +776,7 @@ xtensa_coprocessor_register_group (struct reggroup *group) static int xtensa_register_reggroup_p (struct gdbarch *gdbarch, int regnum, - struct reggroup *group) + const struct reggroup *group) { xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch); xtensa_register_t* reg = &tdep->regmap[regnum]; |