Constify regset structures.

This commit is contained in:
Andreas Arnez 2014-03-03 09:31:21 +00:00 committed by Andreas Krebbel
parent 36d46afba6
commit 3ca7dae4dd
25 changed files with 71 additions and 39 deletions

View file

@ -1,3 +1,35 @@
2014-05-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
* alpha-linux-tdep.c (alpha_linux_gregset, alpha_linux_fpregset):
Constify structures.
* alphanbsd-tdep.c (alphanbsd_gregset, alphanbsd_fpregset)
(alphanbsd_aout_gregset): Likewise.
* armbsd-tdep.c (armbsd_gregset, armbsd_fpregset): Likewise.
* frv-linux-tdep.c (frv_linux_gregset, frv_linux_fpregset):
Likewise.
* hppa-hpux-tdep.c (hppa_hpux_regset): Likewise.
* hppa-linux-tdep.c (hppa_linux_regset, hppa_linux_fpregset):
Likewise.
* hppanbsd-tdep.c (hppanbsd_gregset): Likewise.
* hppaobsd-tdep.c (hppaobsd_gregset, hppaobsd_fpregset): Likewise.
* m32r-linux-tdep.c (m32r_linux_gregset): Likewise.
* m68kbsd-tdep.c (m68kbsd_gregset, m68kbsd_fpregset): Likewise.
* m88k-tdep.c (m88k_gregset): Likewise.
* mips64obsd-tdep.c (mips64obsd_gregset): Likewise.
* mipsnbsd-tdep.c (mipsnbsd_gregset, mipsnbsd_fpregset): Likewise.
* nios2-linux-tdep.c (nios2_core_regset): Likewise.
* ppcfbsd-tdep.c (ppc32_fbsd_fpregset): Likewise.
* ppcnbsd-tdep.c (ppcnbsd_gregset, ppcnbsd_fpregset): Likewise.
* ppcnbsd-tdep.h (ppcnbsd_gregset, ppcnbsd_fpregset): Likewise.
* ppcobsd-tdep.c (ppcobsd_gregset, ppcobsd_fpregset): Likewise.
* ppcobsd-tdep.h (ppcobsd_gregset, ppcobsd_fpregset): Likewise.
* rs6000-aix-tdep.c (rs6000_aix32_regset, rs6000_aix64_regset):
Likewise.
* sh-tdep.c (sh_corefile_gregset, sh_corefile_fpregset): Likewise.
* sh-tdep.h (sh_corefile_gregset): Likewise.
* tilegx-linux-tdep.c (tilegx_linux_regset): Likewise.
* vax-tdep.c (vax_gregset): Likewise.
2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix TLS access for -static -pthread.

View file

@ -206,13 +206,13 @@ alpha_linux_supply_fpregset (const struct regset *regset,
regcache_raw_supply (regcache, ALPHA_FPCR_REGNUM, regs + 31 * 8);
}
static struct regset alpha_linux_gregset =
static const struct regset alpha_linux_gregset =
{
NULL,
alpha_linux_supply_gregset
};
static struct regset alpha_linux_fpregset =
static const struct regset alpha_linux_fpregset =
{
NULL,
alpha_linux_supply_fpregset

View file

@ -141,19 +141,19 @@ alphanbsd_aout_supply_gregset (const struct regset *regset,
/* NetBSD/alpha register sets. */
static struct regset alphanbsd_gregset =
static const struct regset alphanbsd_gregset =
{
NULL,
alphanbsd_supply_gregset
};
static struct regset alphanbsd_fpregset =
static const struct regset alphanbsd_fpregset =
{
NULL,
alphanbsd_supply_fpregset
};
static struct regset alphanbsd_aout_gregset =
static const struct regset alphanbsd_aout_gregset =
{
NULL,
alphanbsd_aout_supply_gregset

View file

@ -98,13 +98,13 @@ armbsd_supply_gregset (const struct regset *regset,
/* ARM register sets. */
static struct regset armbsd_gregset =
static const struct regset armbsd_gregset =
{
NULL,
armbsd_supply_gregset
};
static struct regset armbsd_fpregset =
static const struct regset armbsd_fpregset =
{
NULL,
armbsd_supply_fpregset

View file

@ -465,13 +465,13 @@ frv_linux_supply_fpregset (const struct regset *regset,
/* FRV Linux kernel register sets. */
static struct regset frv_linux_gregset =
static const struct regset frv_linux_gregset =
{
NULL,
frv_linux_supply_gregset
};
static struct regset frv_linux_fpregset =
static const struct regset frv_linux_fpregset =
{
NULL,
frv_linux_supply_fpregset

View file

@ -1367,7 +1367,7 @@ hppa_hpux_supply_save_state (const struct regset *regset,
/* HP-UX register set. */
static struct regset hppa_hpux_regset =
static const struct regset hppa_hpux_regset =
{
NULL,
hppa_hpux_supply_save_state

View file

@ -491,13 +491,13 @@ hppa_linux_supply_fpregset (const struct regset *regset,
}
/* HPPA Linux kernel register set. */
static struct regset hppa_linux_regset =
static const struct regset hppa_linux_regset =
{
NULL,
hppa_linux_supply_regset
};
static struct regset hppa_linux_fpregset =
static const struct regset hppa_linux_fpregset =
{
NULL,
hppa_linux_supply_fpregset

View file

@ -181,7 +181,7 @@ hppanbsd_supply_gregset (const struct regset *regset,
/* NetBSD/hppa register set. */
static struct regset hppanbsd_gregset =
static const struct regset hppanbsd_gregset =
{
NULL,
hppanbsd_supply_gregset

View file

@ -131,13 +131,13 @@ hppaobsd_supply_fpregset (const struct regset *regset,
/* OpenBSD/hppa register sets. */
static struct regset hppaobsd_gregset =
static const struct regset hppaobsd_gregset =
{
NULL,
hppaobsd_supply_gregset
};
static struct regset hppaobsd_fpregset =
static const struct regset hppaobsd_fpregset =
{
NULL,
hppaobsd_supply_fpregset

View file

@ -388,7 +388,7 @@ m32r_linux_supply_gregset (const struct regset *regset,
}
}
static struct regset m32r_linux_gregset = {
static const struct regset m32r_linux_gregset = {
NULL, m32r_linux_supply_gregset
};

View file

@ -105,13 +105,13 @@ m68kbsd_supply_gregset (const struct regset *regset,
/* Motorola 68000 register sets. */
static struct regset m68kbsd_gregset =
static const struct regset m68kbsd_gregset =
{
NULL,
m68kbsd_supply_gregset
};
static struct regset m68kbsd_fpregset =
static const struct regset m68kbsd_fpregset =
{
NULL,
m68kbsd_supply_fpregset

View file

@ -799,7 +799,7 @@ m88k_supply_gregset (const struct regset *regset,
/* Motorola 88000 register set. */
static struct regset m88k_gregset =
static const struct regset m88k_gregset =
{
NULL,
m88k_supply_gregset

View file

@ -61,7 +61,7 @@ mips64obsd_supply_gregset (const struct regset *regset,
/* OpenBSD/mips64 register set. */
static struct regset mips64obsd_gregset =
static const struct regset mips64obsd_gregset =
{
NULL,
mips64obsd_supply_gregset

View file

@ -103,13 +103,13 @@ mipsnbsd_supply_gregset (const struct regset *regset,
/* NetBSD/mips register sets. */
static struct regset mipsnbsd_gregset =
static const struct regset mipsnbsd_gregset =
{
NULL,
mipsnbsd_supply_gregset
};
static struct regset mipsnbsd_fpregset =
static const struct regset mipsnbsd_fpregset =
{
NULL,
mipsnbsd_supply_fpregset

View file

@ -73,7 +73,7 @@ nios2_supply_gregset (const struct regset *regset,
}
}
static struct regset nios2_core_regset =
static const struct regset nios2_core_regset =
{
NULL,
nios2_supply_gregset,

View file

@ -115,7 +115,7 @@ static const struct regset ppc64_fbsd_gregset = {
/* 32-/64-bit floating-point register set. */
static struct regset ppc32_fbsd_fpregset = {
static const struct regset ppc32_fbsd_fpregset = {
&ppc32_fbsd_reg_offsets,
ppc_supply_fpregset,
ppc_collect_fpregset

View file

@ -42,13 +42,13 @@ struct ppc_reg_offsets ppcnbsd_reg_offsets;
/* NetBSD/powerpc register sets. */
struct regset ppcnbsd_gregset =
const struct regset ppcnbsd_gregset =
{
&ppcnbsd_reg_offsets,
ppc_supply_gregset
};
struct regset ppcnbsd_fpregset =
const struct regset ppcnbsd_fpregset =
{
&ppcnbsd_reg_offsets,
ppc_supply_fpregset

View file

@ -28,7 +28,7 @@ struct regset;
extern struct ppc_reg_offsets ppcnbsd_reg_offsets;
/* Register sets for NetBSD/powerpc. */
extern struct regset ppcnbsd_gregset;
extern struct regset ppcnbsd_fpregset;
extern const struct regset ppcnbsd_gregset;
extern const struct regset ppcnbsd_fpregset;
#endif /* ppcnbsd-tdep.h */

View file

@ -71,13 +71,13 @@ ppcobsd_collect_gregset (const struct regset *regset,
/* OpenBSD/powerpc register set. */
struct regset ppcobsd_gregset =
const struct regset ppcobsd_gregset =
{
&ppcobsd_reg_offsets,
ppcobsd_supply_gregset
};
struct regset ppcobsd_fpregset =
const struct regset ppcobsd_fpregset =
{
&ppcobsd_fpreg_offsets,
ppc_supply_fpregset

View file

@ -30,8 +30,8 @@ extern struct ppc_reg_offsets ppcobsd_reg_offsets;
extern struct ppc_reg_offsets ppcobsd_fpreg_offsets;
/* Register sets for OpenBSD/powerpc. */
extern struct regset ppcobsd_gregset;
extern struct regset ppcobsd_fpregset;
extern const struct regset ppcobsd_gregset;
extern const struct regset ppcobsd_fpregset;
/* Supply register REGNUM in the general-purpose register set REGSET

View file

@ -135,14 +135,14 @@ rs6000_aix_collect_regset (const struct regset *regset,
/* AIX register set. */
static struct regset rs6000_aix32_regset =
static const struct regset rs6000_aix32_regset =
{
&rs6000_aix32_reg_offsets,
rs6000_aix_supply_regset,
rs6000_aix_collect_regset,
};
static struct regset rs6000_aix64_regset =
static const struct regset rs6000_aix64_regset =
{
&rs6000_aix64_reg_offsets,
rs6000_aix_supply_regset,

View file

@ -2195,14 +2195,14 @@ sh_corefile_collect_regset (const struct regset *regset,
/* The following two regsets have the same contents, so it is tempting to
unify them, but they are distiguished by their address, so don't. */
struct regset sh_corefile_gregset =
const struct regset sh_corefile_gregset =
{
NULL,
sh_corefile_supply_regset,
sh_corefile_collect_regset
};
static struct regset sh_corefile_fpregset =
static const struct regset sh_corefile_fpregset =
{
NULL,
sh_corefile_supply_regset,

View file

@ -101,7 +101,7 @@ struct gdbarch_tdep
struct sh_corefile_regmap *core_fpregmap;
};
extern struct regset sh_corefile_gregset;
extern const struct regset sh_corefile_gregset;
void sh_corefile_supply_regset (const struct regset *regset,
struct regcache *regcache,

View file

@ -97,7 +97,7 @@ tilegx_linux_supply_regset (const struct regset *regset,
}
/* TILE-Gx Linux kernel register set. */
static struct regset tilegx_linux_regset =
static const struct regset tilegx_linux_regset =
{
NULL,
tilegx_linux_supply_regset

View file

@ -85,7 +85,7 @@ vax_supply_gregset (const struct regset *regset, struct regcache *regcache,
/* VAX register set. */
static struct regset vax_gregset =
static const struct regset vax_gregset =
{
NULL,
vax_supply_gregset