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.
This commit is contained in:
parent
b5556e33b5
commit
dbf5d61bda
29 changed files with 33 additions and 33 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>'. */
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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. */
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue