SPARC: Rename register maps from "*regset" to "*regmap"

Clear the naming confusion about "regset" versus "sparc*regset".  The
latter was used to represent the *map* of a register set, not the
register set itself, and is thus renamed accordingly.

The following identifiers are renamed:

  sparc32_bsd_fpregset => sparc32_bsd_fpregmap
  sparc32_linux_core_gregset => sparc32_linux_core_gregmap
  sparc32_sol2_fpregset => sparc32_sol2_fpregmap
  sparc32_sol2_gregset => sparc32_sol2_gregmap
  sparc32_sunos4_fpregset => sparc32_sunos4_fpregmap
  sparc32_sunos4_gregset => sparc32_sunos4_gregmap
  sparc32nbsd_gregset => sparc32nbsd_gregmap
  sparc64_bsd_fpregset => sparc64_bsd_fpregmap
  sparc64_linux_core_gregset => sparc64_linux_core_gregmap
  sparc64_linux_ptrace_gregset => sparc64_linux_ptrace_gregmap
  sparc64_sol2_fpregset => sparc64_sol2_fpregmap
  sparc64_sol2_gregset => sparc64_sol2_gregmap
  sparc64fbsd_gregset => sparc64fbsd_gregmap
  sparc64nbsd_gregset => sparc64nbsd_gregmap
  sparc64obsd_core_gregset => sparc64obsd_core_gregmap
  sparc64obsd_gregset => sparc64obsd_gregmap
  sparc_fpregset => sparc_fpregmap
  sparc_gregset => sparc_gregmap
  sparc_sol2_fpregset => sparc_sol2_fpregmap
  sparc_sol2_gregset => sparc_sol2_gregmap

Also, all local variables 'gregset' and 'fpregset' are renamed to
'gregmap' and 'fpregmap', respectively.
This commit is contained in:
Andreas Arnez 2014-03-28 17:34:19 +00:00 committed by Andreas Krebbel
parent 8fea322418
commit b4fd25c939
22 changed files with 275 additions and 179 deletions

View File

@ -1,3 +1,99 @@
2014-05-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
* sparc-linux-nat.c (supply_gregset, supply_fpregset)
(fill_gregset, fill_fpregset, _initialize_sparc_linux_nat): Rename
register maps ("regmaps") from "*regset" to "*regmap". Do this
for all regmap types and variables.
* sparc-linux-tdep.c (sparc32_linux_step_trap)
(sparc32_linux_supply_core_gregset)
(sparc32_linux_collect_core_gregset)
(sparc32_linux_supply_core_fpregset)
(sparc32_linux_collect_core_fpregset): Likewise.
* sparc-nat.c (sparc_gregset, sparc_fpregset): Rename to...
(sparc_gregmap, sparc_fpregmap): ... these.
(sparc_supply_gregset, sparc_collect_gregset)
(sparc_supply_fpregset, sparc_collect_fpregset): Likewise.
(sparc_fetch_inferior_registers, sparc_store_inferior_registers)
(_initialize_sparc_nat): Rename regmaps.
* sparc-nat.h (sparc_gregset, sparc_fpregset): Rename to...
(sparc_gregmap, sparc_fpregmap): ... these.
(sparc_supply_gregset, sparc_collect_gregset)
(sparc_supply_fpregset, sparc_collect_fpregset): Likewise.
* sparc-sol2-nat.c (sparc_sol2_gregset, sparc_sol2_fpregset):
Rename macros to...
(sparc_sol2_gregmap, sparc_sol2_fpregmap): ... these.
(supply_gregset, supply_fpregset, fill_gregset, fill_fpregset):
Likewise.
* sparc-sol2-tdep.c (sparc32_sol2_gregset, sparc32_sol2_fpregset):
Rename to...
(sparc32_sol2_gregmap, sparc32_sol2_fpregmap): ... these.
* sparc-tdep.c (sparc32_supply_gregset, sparc32_collect_gregset)
(sparc32_supply_fpregset, sparc32_collect_fpregset): Rename
regmaps.
(sparc32_sunos4_gregset, sparc32_sunos4_fpregset)
(sparc32_bsd_fpregset): Rename to...
(sparc32_sunos4_gregmap, sparc32_sunos4_fpregmap)
(sparc32_bsd_fpregmap): ... these.
* sparc-tdep.h (struct sparc_gregset, struct sparc_fpregset)
(sparc32_sunos4_gregset, sparc32_sunos4_fpregset)
(sparc32_bsd_fpregset, sparc32_sol2_gregset)
(sparc32_sol2_fpregset, sparc32nbsd_gregset): Rename to...
(struct sparc_gregmap, struct sparc_fpregmap)
(sparc32_sunos4_gregmap, sparc32_sunos4_fpregmap)
(sparc32_bsd_fpregmap, sparc32_sol2_gregmap)
(sparc32_sol2_fpregmap, sparc32nbsd_gregmap): ... these.
(sparc32_supply_regset, sparc32_collect_gregset)
(sparc32_supply_fpregset, sparc32_collect_fpregset): Adjust
prototypes.
* sparc64-linux-nat.c (sparc64_linux_ptrace_gregset): Rename to...
(sparc64_linux_ptrace_gregmap): ... this.
(supply_gregset, supply_fpregset, fill_gregset, fill_fpregset)
(_initialize_sparc64_linux_nat): Rename regmaps.
* sparc64-linux-tdep.c (sparc64_linux_core_gregset): Rename to...
(sparc64_linux_core_gregmap): ... this.
(sparc64_linux_supply_core_gregset)
(sparc64_linux_collect_core_gregset)
(sparc64_linux_supply_core_fpregset)
(sparc64_linux_collect_core_fpregset): Rename regmaps.
* sparc64-sol2-tdep.c (sparc64_sol2_gregset)
(sparc64_sol2_fpregset): Rename to...
(sparc64_sol2_gregmap, sparc64_sol2_fpregmap): ... these.
* sparc64-tdep.c (sparc64_supply_gregset, sparc64_collect_gregset)
(sparc64_supply_fpregset, sparc64_collect_fpregset): Rename
regmaps.
* sparc64-tdep.h (struct sparc_gregset, sparc64_sol2_gregset)
(sparc64_sol2_fpregset, sparc64fbsd_gregset, sparc64nbsd_gregset)
(sparc64_bsd_fpregset): Rename to...
(struct sparc_gregmap, sparc64_sol2_gregmap)
(sparc64_sol2_fpregmap, sparc64fbsd_gregmap, sparc64nbsd_gregmap)
(sparc64_bsd_fpregmap): ... these.
(sparc64_supply_gregset, sparc64_collect_gregset)
(sparc64_supply_fpregset, sparc64_collect_fpregset): Adjust
prototypes.
* sparc64fbsd-nat.c (_initialize_sparc64fbsd_nat): Rename regmaps.
* sparc64fbsd-tdep.c (sparc64fbsd_gregset): Rename to...
(sparc64fbsd_gregmap): ... this.
(sparc64fbsd_supply_gregset, sparc64fbsd_collect_gregset)
(sparc64fbsd_supply_fpregset, sparc64fbsd_collect_fpregset):
Rename regmaps.
* sparc64nbsd-nat.c (sparc64nbsd_supply_gregset)
(sparc64nbsd_collect_gregset, sparc64nbsd_supply_fpregset)
(sparc64nbsd_collect_fpregset): Likewise.
* sparc64nbsd-tdep.c (sparc64nbsd_gregset): Rename to...
(sparc64nbsd_gregmap): ... this.
(sparc64nbsd_supply_gregset, sparc64nbsd_supply_fpregset): Rename
regmaps.
* sparc64obsd-nat.c (_initialize_sparc64obsd_nat): Likewise.
* sparc64obsd-tdep.c (sparc64obsd_gregset): Rename to...
(sparc64obsd_gregmap): ... this.
(sparc64obsd_supply_gregset, sparc64obsd_supply_fpregset): Rename
regmaps.
* sparcnbsd-nat.c (_initialize_sparcnbsd_nat): Likewise.
* sparcnbsd-tdep.c (sparc32nbsd_gregset): Rename to...
(sparc32nbsd_gregmap): ... this.
(sparc32nbsd_supply_gregset, sparc32nbsd_supply_fpregset): Rename
regmaps.
2014-05-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
* score-tdep.c (score7_linux_gregset): New static regset

View File

@ -31,26 +31,26 @@
void
supply_gregset (struct regcache *regcache, const prgregset_t *gregs)
{
sparc32_supply_gregset (sparc_gregset, regcache, -1, gregs);
sparc32_supply_gregset (sparc_gregmap, regcache, -1, gregs);
}
void
supply_fpregset (struct regcache *regcache, const prfpregset_t *fpregs)
{
sparc32_supply_fpregset (sparc_fpregset, regcache, -1, fpregs);
sparc32_supply_fpregset (sparc_fpregmap, regcache, -1, fpregs);
}
void
fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum)
{
sparc32_collect_gregset (sparc_gregset, regcache, regnum, gregs);
sparc32_collect_gregset (sparc_gregmap, regcache, regnum, gregs);
}
void
fill_fpregset (const struct regcache *regcache,
prfpregset_t *fpregs, int regnum)
{
sparc32_collect_fpregset (sparc_fpregset, regcache, regnum, fpregs);
sparc32_collect_fpregset (sparc_fpregmap, regcache, regnum, fpregs);
}
void _initialize_sparc_linux_nat (void);
@ -63,7 +63,7 @@ _initialize_sparc_linux_nat (void)
/* Fill in the generic GNU/Linux methods. */
t = linux_target ();
sparc_fpregset = &sparc32_bsd_fpregset;
sparc_fpregmap = &sparc32_bsd_fpregmap;
/* Add our register access methods. */
t->to_fetch_registers = sparc_fetch_inferior_registers;

View File

@ -198,7 +198,7 @@ sparc32_linux_step_trap (struct frame_info *frame, unsigned long insn)
}
const struct sparc_gregset sparc32_linux_core_gregset =
const struct sparc_gregmap sparc32_linux_core_gregmap =
{
32 * 4, /* %psr */
33 * 4, /* %pc */
@ -217,7 +217,7 @@ sparc32_linux_supply_core_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
sparc32_supply_gregset (&sparc32_linux_core_gregset,
sparc32_supply_gregset (&sparc32_linux_core_gregmap,
regcache, regnum, gregs);
}
@ -226,7 +226,7 @@ sparc32_linux_collect_core_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
sparc32_collect_gregset (&sparc32_linux_core_gregset,
sparc32_collect_gregset (&sparc32_linux_core_gregmap,
regcache, regnum, gregs);
}
@ -235,7 +235,7 @@ sparc32_linux_supply_core_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
sparc32_supply_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs);
sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
}
static void
@ -243,7 +243,7 @@ sparc32_linux_collect_core_fpregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *fpregs, size_t len)
{
sparc32_collect_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs);
sparc32_collect_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
}
/* Set the program counter for process PTID to PC. */

View File

@ -81,15 +81,15 @@ typedef struct fp_status fpregset_t;
#endif
/* Register set description. */
const struct sparc_gregset *sparc_gregset;
const struct sparc_fpregset *sparc_fpregset;
void (*sparc_supply_gregset) (const struct sparc_gregset *,
const struct sparc_gregmap *sparc_gregmap;
const struct sparc_fpregmap *sparc_fpregmap;
void (*sparc_supply_gregset) (const struct sparc_gregmap *,
struct regcache *, int , const void *);
void (*sparc_collect_gregset) (const struct sparc_gregset *,
void (*sparc_collect_gregset) (const struct sparc_gregmap *,
const struct regcache *, int, void *);
void (*sparc_supply_fpregset) (const struct sparc_fpregset *,
void (*sparc_supply_fpregset) (const struct sparc_fpregmap *,
struct regcache *, int , const void *);
void (*sparc_collect_fpregset) (const struct sparc_fpregset *,
void (*sparc_collect_fpregset) (const struct sparc_fpregmap *,
const struct regcache *, int , void *);
int (*sparc_gregset_supplies_p) (struct gdbarch *, int);
int (*sparc_fpregset_supplies_p) (struct gdbarch *, int);
@ -174,7 +174,7 @@ sparc_fetch_inferior_registers (struct target_ops *ops,
if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name (_("Couldn't get registers"));
sparc_supply_gregset (sparc_gregset, regcache, -1, &regs);
sparc_supply_gregset (sparc_gregmap, regcache, -1, &regs);
if (regnum != -1)
return;
}
@ -186,7 +186,7 @@ sparc_fetch_inferior_registers (struct target_ops *ops,
if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
sparc_supply_fpregset (sparc_fpregset, regcache, -1, &fpregs);
sparc_supply_fpregset (sparc_fpregmap, regcache, -1, &fpregs);
}
}
@ -210,7 +210,7 @@ sparc_store_inferior_registers (struct target_ops *ops,
if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name (_("Couldn't get registers"));
sparc_collect_gregset (sparc_gregset, regcache, regnum, &regs);
sparc_collect_gregset (sparc_gregmap, regcache, regnum, &regs);
if (ptrace (PTRACE_SETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name (_("Couldn't write registers"));
@ -237,7 +237,7 @@ sparc_store_inferior_registers (struct target_ops *ops,
perror_with_name (_("Couldn't get floating-point registers"));
memcpy (&saved_fpregs, &fpregs, sizeof (fpregs));
sparc_collect_fpregset (sparc_fpregset, regcache, regnum, &fpregs);
sparc_collect_fpregset (sparc_fpregmap, regcache, regnum, &fpregs);
/* Writing the floating-point registers will fail on NetBSD with
EINVAL if the inferior process doesn't have an FPU state
@ -352,10 +352,10 @@ void
_initialize_sparc_nat (void)
{
/* Deafult to using SunOS 4 register sets. */
if (sparc_gregset == NULL)
sparc_gregset = &sparc32_sunos4_gregset;
if (sparc_fpregset == NULL)
sparc_fpregset = &sparc32_sunos4_fpregset;
if (sparc_gregmap == NULL)
sparc_gregmap = &sparc32_sunos4_gregmap;
if (sparc_fpregmap == NULL)
sparc_fpregmap = &sparc32_sunos4_fpregmap;
if (sparc_supply_gregset == NULL)
sparc_supply_gregset = sparc32_supply_gregset;
if (sparc_collect_gregset == NULL)

View File

@ -20,18 +20,18 @@
#ifndef SPARC_NAT_H
#define SPARC_NAT_H 1
struct sparc_gregset;
struct sparc_fpregset;
struct sparc_gregmap;
struct sparc_fpregmap;
extern const struct sparc_gregset *sparc_gregset;
extern const struct sparc_fpregset *sparc_fpregset;
extern void (*sparc_supply_gregset) (const struct sparc_gregset *,
extern const struct sparc_gregmap *sparc_gregmap;
extern const struct sparc_fpregmap *sparc_fpregmap;
extern void (*sparc_supply_gregset) (const struct sparc_gregmap *,
struct regcache *, int , const void *);
extern void (*sparc_collect_gregset) (const struct sparc_gregset *,
extern void (*sparc_collect_gregset) (const struct sparc_gregmap *,
const struct regcache *, int, void *);
extern void (*sparc_supply_fpregset) (const struct sparc_fpregset *,
extern void (*sparc_supply_fpregset) (const struct sparc_fpregmap *,
struct regcache *, int , const void *);
extern void (*sparc_collect_fpregset) (const struct sparc_fpregset *,
extern void (*sparc_collect_fpregset) (const struct sparc_fpregmap *,
const struct regcache *, int , void *);
extern int (*sparc_gregset_supplies_p) (struct gdbarch *gdbarch, int);
extern int (*sparc_fpregset_supplies_p) (struct gdbarch *gdbarch, int);

View File

@ -58,8 +58,8 @@
#define sparc_collect_gregset sparc64_collect_gregset
#define sparc_collect_fpregset sparc64_collect_fpregset
#define sparc_sol2_gregset sparc64_sol2_gregset
#define sparc_sol2_fpregset sparc64_sol2_fpregset
#define sparc_sol2_gregmap sparc64_sol2_gregmap
#define sparc_sol2_fpregmap sparc64_sol2_fpregmap
#else
@ -68,34 +68,34 @@
#define sparc_collect_gregset sparc32_collect_gregset
#define sparc_collect_fpregset sparc32_collect_fpregset
#define sparc_sol2_gregset sparc32_sol2_gregset
#define sparc_sol2_fpregset sparc32_sol2_fpregset
#define sparc_sol2_gregmap sparc32_sol2_gregmap
#define sparc_sol2_fpregmap sparc32_sol2_fpregmap
#endif
void
supply_gregset (struct regcache *regcache, const prgregset_t *gregs)
{
sparc_supply_gregset (&sparc_sol2_gregset, regcache, -1, gregs);
sparc_supply_gregset (&sparc_sol2_gregmap, regcache, -1, gregs);
}
void
supply_fpregset (struct regcache *regcache, const prfpregset_t *fpregs)
{
sparc_supply_fpregset (&sparc_sol2_fpregset, regcache, -1, fpregs);
sparc_supply_fpregset (&sparc_sol2_fpregmap, regcache, -1, fpregs);
}
void
fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum)
{
sparc_collect_gregset (&sparc_sol2_gregset, regcache, regnum, gregs);
sparc_collect_gregset (&sparc_sol2_gregmap, regcache, regnum, gregs);
}
void
fill_fpregset (const struct regcache *regcache,
prfpregset_t *fpregs, int regnum)
{
sparc_collect_fpregset (&sparc_sol2_fpregset, regcache, regnum, fpregs);
sparc_collect_fpregset (&sparc_sol2_fpregmap, regcache, regnum, fpregs);
}
/* Provide a prototype to silence -Wmissing-prototypes. */

View File

@ -36,7 +36,7 @@
#include "solib-svr4.h"
/* From <sys/regset.h>. */
const struct sparc_gregset sparc32_sol2_gregset =
const struct sparc_gregmap sparc32_sol2_gregmap =
{
32 * 4, /* %psr */
33 * 4, /* %pc */
@ -48,7 +48,7 @@ const struct sparc_gregset sparc32_sol2_gregset =
16 * 4, /* %l0 */
};
const struct sparc_fpregset sparc32_sol2_fpregset =
const struct sparc_fpregmap sparc32_sol2_fpregmap =
{
0 * 4, /* %f0 */
33 * 4, /* %fsr */

View File

@ -1898,7 +1898,7 @@ sparc_collect_rwindow (const struct regcache *regcache,
/* Helper functions for dealing with register sets. */
void
sparc32_supply_gregset (const struct sparc_gregset *gregset,
sparc32_supply_gregset (const struct sparc_gregmap *gregmap,
struct regcache *regcache,
int regnum, const void *gregs)
{
@ -1908,26 +1908,26 @@ sparc32_supply_gregset (const struct sparc_gregset *gregset,
if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
regcache_raw_supply (regcache, SPARC32_PSR_REGNUM,
regs + gregset->r_psr_offset);
regs + gregmap->r_psr_offset);
if (regnum == SPARC32_PC_REGNUM || regnum == -1)
regcache_raw_supply (regcache, SPARC32_PC_REGNUM,
regs + gregset->r_pc_offset);
regs + gregmap->r_pc_offset);
if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
regcache_raw_supply (regcache, SPARC32_NPC_REGNUM,
regs + gregset->r_npc_offset);
regs + gregmap->r_npc_offset);
if (regnum == SPARC32_Y_REGNUM || regnum == -1)
regcache_raw_supply (regcache, SPARC32_Y_REGNUM,
regs + gregset->r_y_offset);
regs + gregmap->r_y_offset);
if (regnum == SPARC_G0_REGNUM || regnum == -1)
regcache_raw_supply (regcache, SPARC_G0_REGNUM, &zero);
if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1)
{
int offset = gregset->r_g1_offset;
int offset = gregmap->r_g1_offset;
for (i = SPARC_G1_REGNUM; i <= SPARC_O7_REGNUM; i++)
{
@ -1941,7 +1941,7 @@ sparc32_supply_gregset (const struct sparc_gregset *gregset,
{
/* Not all of the register set variants include Locals and
Inputs. For those that don't, we read them off the stack. */
if (gregset->r_l0_offset == -1)
if (gregmap->r_l0_offset == -1)
{
ULONGEST sp;
@ -1950,7 +1950,7 @@ sparc32_supply_gregset (const struct sparc_gregset *gregset,
}
else
{
int offset = gregset->r_l0_offset;
int offset = gregmap->r_l0_offset;
for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++)
{
@ -1963,7 +1963,7 @@ sparc32_supply_gregset (const struct sparc_gregset *gregset,
}
void
sparc32_collect_gregset (const struct sparc_gregset *gregset,
sparc32_collect_gregset (const struct sparc_gregmap *gregmap,
const struct regcache *regcache,
int regnum, void *gregs)
{
@ -1972,23 +1972,23 @@ sparc32_collect_gregset (const struct sparc_gregset *gregset,
if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
regcache_raw_collect (regcache, SPARC32_PSR_REGNUM,
regs + gregset->r_psr_offset);
regs + gregmap->r_psr_offset);
if (regnum == SPARC32_PC_REGNUM || regnum == -1)
regcache_raw_collect (regcache, SPARC32_PC_REGNUM,
regs + gregset->r_pc_offset);
regs + gregmap->r_pc_offset);
if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
regcache_raw_collect (regcache, SPARC32_NPC_REGNUM,
regs + gregset->r_npc_offset);
regs + gregmap->r_npc_offset);
if (regnum == SPARC32_Y_REGNUM || regnum == -1)
regcache_raw_collect (regcache, SPARC32_Y_REGNUM,
regs + gregset->r_y_offset);
regs + gregmap->r_y_offset);
if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1)
{
int offset = gregset->r_g1_offset;
int offset = gregmap->r_g1_offset;
/* %g0 is always zero. */
for (i = SPARC_G1_REGNUM; i <= SPARC_O7_REGNUM; i++)
@ -2003,9 +2003,9 @@ sparc32_collect_gregset (const struct sparc_gregset *gregset,
{
/* Not all of the register set variants include Locals and
Inputs. For those that don't, we read them off the stack. */
if (gregset->r_l0_offset != -1)
if (gregmap->r_l0_offset != -1)
{
int offset = gregset->r_l0_offset;
int offset = gregmap->r_l0_offset;
for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++)
{
@ -2018,7 +2018,7 @@ sparc32_collect_gregset (const struct sparc_gregset *gregset,
}
void
sparc32_supply_fpregset (const struct sparc_fpregset *fpregset,
sparc32_supply_fpregset (const struct sparc_fpregmap *fpregmap,
struct regcache *regcache,
int regnum, const void *fpregs)
{
@ -2029,16 +2029,16 @@ sparc32_supply_fpregset (const struct sparc_fpregset *fpregset,
{
if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
regcache_raw_supply (regcache, SPARC_F0_REGNUM + i,
regs + fpregset->r_f0_offset + (i * 4));
regs + fpregmap->r_f0_offset + (i * 4));
}
if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
regcache_raw_supply (regcache, SPARC32_FSR_REGNUM,
regs + fpregset->r_fsr_offset);
regs + fpregmap->r_fsr_offset);
}
void
sparc32_collect_fpregset (const struct sparc_fpregset *fpregset,
sparc32_collect_fpregset (const struct sparc_fpregmap *fpregmap,
const struct regcache *regcache,
int regnum, void *fpregs)
{
@ -2049,19 +2049,19 @@ sparc32_collect_fpregset (const struct sparc_fpregset *fpregset,
{
if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
regcache_raw_collect (regcache, SPARC_F0_REGNUM + i,
regs + fpregset->r_f0_offset + (i * 4));
regs + fpregmap->r_f0_offset + (i * 4));
}
if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
regcache_raw_collect (regcache, SPARC32_FSR_REGNUM,
regs + fpregset->r_fsr_offset);
regs + fpregmap->r_fsr_offset);
}
/* SunOS 4. */
/* From <machine/reg.h>. */
const struct sparc_gregset sparc32_sunos4_gregset =
const struct sparc_gregmap sparc32_sunos4_gregmap =
{
0 * 4, /* %psr */
1 * 4, /* %pc */
@ -2073,13 +2073,13 @@ const struct sparc_gregset sparc32_sunos4_gregset =
-1 /* %l0 */
};
const struct sparc_fpregset sparc32_sunos4_fpregset =
const struct sparc_fpregmap sparc32_sunos4_fpregmap =
{
0 * 4, /* %f0 */
33 * 4, /* %fsr */
};
const struct sparc_fpregset sparc32_bsd_fpregset =
const struct sparc_fpregmap sparc32_bsd_fpregmap =
{
0 * 4, /* %f0 */
32 * 4, /* %fsr */

View File

@ -28,7 +28,7 @@ struct trad_frame_saved_reg;
/* Register offsets for the general-purpose register set. */
struct sparc_gregset
struct sparc_gregmap
{
int r_psr_offset;
int r_pc_offset;
@ -41,7 +41,7 @@ struct sparc_gregset
int r_y_size;
};
struct sparc_fpregset
struct sparc_fpregmap
{
int r_f0_offset;
int r_fsr_offset;
@ -206,20 +206,20 @@ extern void sparc_collect_rwindow (const struct regcache *regcache,
CORE_ADDR sp, int regnum);
/* Register offsets for SunOS 4. */
extern const struct sparc_gregset sparc32_sunos4_gregset;
extern const struct sparc_fpregset sparc32_sunos4_fpregset;
extern const struct sparc_fpregset sparc32_bsd_fpregset;
extern const struct sparc_gregmap sparc32_sunos4_gregmap;
extern const struct sparc_fpregmap sparc32_sunos4_fpregmap;
extern const struct sparc_fpregmap sparc32_bsd_fpregmap;
extern void sparc32_supply_gregset (const struct sparc_gregset *gregset,
extern void sparc32_supply_gregset (const struct sparc_gregmap *gregmap,
struct regcache *regcache,
int regnum, const void *gregs);
extern void sparc32_collect_gregset (const struct sparc_gregset *gregset,
extern void sparc32_collect_gregset (const struct sparc_gregmap *gregmap,
const struct regcache *regcache,
int regnum, void *gregs);
extern void sparc32_supply_fpregset (const struct sparc_fpregset *fpregset,
extern void sparc32_supply_fpregset (const struct sparc_fpregmap *fpregmap,
struct regcache *regcache,
int regnum, const void *fpregs);
extern void sparc32_collect_fpregset (const struct sparc_fpregset *fpregset,
extern void sparc32_collect_fpregset (const struct sparc_fpregmap *fpregmap,
const struct regcache *regcache,
int regnum, void *fpregs);
@ -228,8 +228,8 @@ extern int sparc_is_annulled_branch_insn (CORE_ADDR pc);
/* Functions and variables exported from sparc-sol2-tdep.c. */
/* Register offsets for Solaris 2. */
extern const struct sparc_gregset sparc32_sol2_gregset;
extern const struct sparc_fpregset sparc32_sol2_fpregset;
extern const struct sparc_gregmap sparc32_sol2_gregmap;
extern const struct sparc_fpregmap sparc32_sol2_fpregmap;
extern int sparc_sol2_pc_in_sigtramp (CORE_ADDR pc, const char *name);
@ -241,7 +241,7 @@ extern void sparc32_sol2_init_abi (struct gdbarch_info info,
/* Functions and variables exported from sparcnbsd-tdep.c. */
/* Register offsets for NetBSD. */
extern const struct sparc_gregset sparc32nbsd_gregset;
extern const struct sparc_gregmap sparc32nbsd_gregmap;
/* Return the address of a system call's alternative return
address. */

View File

@ -30,7 +30,7 @@
#include "target.h"
#include "linux-nat.h"
static const struct sparc_gregset sparc64_linux_ptrace_gregset =
static const struct sparc_gregmap sparc64_linux_ptrace_gregmap =
{
16 * 8, /* "tstate" */
17 * 8, /* %pc */
@ -47,26 +47,26 @@ static const struct sparc_gregset sparc64_linux_ptrace_gregset =
void
supply_gregset (struct regcache *regcache, const prgregset_t *gregs)
{
sparc64_supply_gregset (sparc_gregset, regcache, -1, gregs);
sparc64_supply_gregset (sparc_gregmap, regcache, -1, gregs);
}
void
supply_fpregset (struct regcache *regcache, const prfpregset_t *fpregs)
{
sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, -1, fpregs);
sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, -1, fpregs);
}
void
fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum)
{
sparc64_collect_gregset (sparc_gregset, regcache, regnum, gregs);
sparc64_collect_gregset (sparc_gregmap, regcache, regnum, gregs);
}
void
fill_fpregset (const struct regcache *regcache,
prfpregset_t *fpregs, int regnum)
{
sparc64_collect_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
}
/* Provide a prototype to silence -Wmissing-prototypes. */
@ -80,7 +80,7 @@ _initialize_sparc64_linux_nat (void)
/* Fill in the generic GNU/Linux methods. */
t = linux_target ();
sparc_fpregset = &sparc64_bsd_fpregset;
sparc_fpregmap = &sparc64_bsd_fpregmap;
/* Add our register access methods. */
t->to_fetch_registers = sparc_fetch_inferior_registers;
@ -89,5 +89,5 @@ _initialize_sparc64_linux_nat (void)
/* Register the target. */
linux_nat_add_target (t);
sparc_gregset = &sparc64_linux_ptrace_gregset;
sparc_gregmap = &sparc64_linux_ptrace_gregmap;
}

View File

@ -139,7 +139,7 @@ sparc64_linux_step_trap (struct frame_info *frame, unsigned long insn)
}
const struct sparc_gregset sparc64_linux_core_gregset =
const struct sparc_gregmap sparc64_linux_core_gregmap =
{
32 * 8, /* %tstate */
33 * 8, /* %tpc */
@ -158,7 +158,7 @@ sparc64_linux_supply_core_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
sparc64_supply_gregset (&sparc64_linux_core_gregset,
sparc64_supply_gregset (&sparc64_linux_core_gregmap,
regcache, regnum, gregs);
}
@ -167,7 +167,7 @@ sparc64_linux_collect_core_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
sparc64_collect_gregset (&sparc64_linux_core_gregset,
sparc64_collect_gregset (&sparc64_linux_core_gregmap,
regcache, regnum, gregs);
}
@ -176,7 +176,7 @@ sparc64_linux_supply_core_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
}
static void
@ -184,7 +184,7 @@ sparc64_linux_collect_core_fpregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *fpregs, size_t len)
{
sparc64_collect_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
}
/* Set the program counter for process PTID to PC. */

View File

@ -33,7 +33,7 @@
#include "solib-svr4.h"
/* From <sys/regset.h>. */
const struct sparc_gregset sparc64_sol2_gregset =
const struct sparc_gregmap sparc64_sol2_gregmap =
{
32 * 8, /* "tstate" */
33 * 8, /* %pc */
@ -46,7 +46,7 @@ const struct sparc_gregset sparc64_sol2_gregset =
8 /* sizeof (%y) */
};
const struct sparc_fpregset sparc64_sol2_fpregset =
const struct sparc_fpregmap sparc64_sol2_fpregmap =
{
0 * 8, /* %f0 */
33 * 8, /* %fsr */

View File

@ -1240,7 +1240,7 @@ sparc64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
#define PSR_XCC 0x000f0000
void
sparc64_supply_gregset (const struct sparc_gregset *gregset,
sparc64_supply_gregset (const struct sparc_gregmap *gregmap,
struct regcache *regcache,
int regnum, const void *gregs)
{
@ -1255,7 +1255,7 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset,
{
if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
{
int offset = gregset->r_tstate_offset;
int offset = gregmap->r_tstate_offset;
ULONGEST tstate, psr;
gdb_byte buf[4];
@ -1268,15 +1268,15 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset,
if (regnum == SPARC32_PC_REGNUM || regnum == -1)
regcache_raw_supply (regcache, SPARC32_PC_REGNUM,
regs + gregset->r_pc_offset + 4);
regs + gregmap->r_pc_offset + 4);
if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
regcache_raw_supply (regcache, SPARC32_NPC_REGNUM,
regs + gregset->r_npc_offset + 4);
regs + gregmap->r_npc_offset + 4);
if (regnum == SPARC32_Y_REGNUM || regnum == -1)
{
int offset = gregset->r_y_offset + 8 - gregset->r_y_size;
int offset = gregmap->r_y_offset + 8 - gregmap->r_y_size;
regcache_raw_supply (regcache, SPARC32_Y_REGNUM, regs + offset);
}
}
@ -1284,30 +1284,30 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset,
{
if (regnum == SPARC64_STATE_REGNUM || regnum == -1)
regcache_raw_supply (regcache, SPARC64_STATE_REGNUM,
regs + gregset->r_tstate_offset);
regs + gregmap->r_tstate_offset);
if (regnum == SPARC64_PC_REGNUM || regnum == -1)
regcache_raw_supply (regcache, SPARC64_PC_REGNUM,
regs + gregset->r_pc_offset);
regs + gregmap->r_pc_offset);
if (regnum == SPARC64_NPC_REGNUM || regnum == -1)
regcache_raw_supply (regcache, SPARC64_NPC_REGNUM,
regs + gregset->r_npc_offset);
regs + gregmap->r_npc_offset);
if (regnum == SPARC64_Y_REGNUM || regnum == -1)
{
gdb_byte buf[8];
memset (buf, 0, 8);
memcpy (buf + 8 - gregset->r_y_size,
regs + gregset->r_y_offset, gregset->r_y_size);
memcpy (buf + 8 - gregmap->r_y_size,
regs + gregmap->r_y_offset, gregmap->r_y_size);
regcache_raw_supply (regcache, SPARC64_Y_REGNUM, buf);
}
if ((regnum == SPARC64_FPRS_REGNUM || regnum == -1)
&& gregset->r_fprs_offset != -1)
&& gregmap->r_fprs_offset != -1)
regcache_raw_supply (regcache, SPARC64_FPRS_REGNUM,
regs + gregset->r_fprs_offset);
regs + gregmap->r_fprs_offset);
}
if (regnum == SPARC_G0_REGNUM || regnum == -1)
@ -1315,7 +1315,7 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset,
if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1)
{
int offset = gregset->r_g1_offset;
int offset = gregmap->r_g1_offset;
if (sparc32)
offset += 4;
@ -1332,7 +1332,7 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset,
{
/* Not all of the register set variants include Locals and
Inputs. For those that don't, we read them off the stack. */
if (gregset->r_l0_offset == -1)
if (gregmap->r_l0_offset == -1)
{
ULONGEST sp;
@ -1341,7 +1341,7 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset,
}
else
{
int offset = gregset->r_l0_offset;
int offset = gregmap->r_l0_offset;
if (sparc32)
offset += 4;
@ -1357,7 +1357,7 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset,
}
void
sparc64_collect_gregset (const struct sparc_gregset *gregset,
sparc64_collect_gregset (const struct sparc_gregmap *gregmap,
const struct regcache *regcache,
int regnum, void *gregs)
{
@ -1371,7 +1371,7 @@ sparc64_collect_gregset (const struct sparc_gregset *gregset,
{
if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
{
int offset = gregset->r_tstate_offset;
int offset = gregmap->r_tstate_offset;
ULONGEST tstate, psr;
gdb_byte buf[8];
@ -1387,15 +1387,15 @@ sparc64_collect_gregset (const struct sparc_gregset *gregset,
if (regnum == SPARC32_PC_REGNUM || regnum == -1)
regcache_raw_collect (regcache, SPARC32_PC_REGNUM,
regs + gregset->r_pc_offset + 4);
regs + gregmap->r_pc_offset + 4);
if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
regcache_raw_collect (regcache, SPARC32_NPC_REGNUM,
regs + gregset->r_npc_offset + 4);
regs + gregmap->r_npc_offset + 4);
if (regnum == SPARC32_Y_REGNUM || regnum == -1)
{
int offset = gregset->r_y_offset + 8 - gregset->r_y_size;
int offset = gregmap->r_y_offset + 8 - gregmap->r_y_size;
regcache_raw_collect (regcache, SPARC32_Y_REGNUM, regs + offset);
}
}
@ -1403,35 +1403,35 @@ sparc64_collect_gregset (const struct sparc_gregset *gregset,
{
if (regnum == SPARC64_STATE_REGNUM || regnum == -1)
regcache_raw_collect (regcache, SPARC64_STATE_REGNUM,
regs + gregset->r_tstate_offset);
regs + gregmap->r_tstate_offset);
if (regnum == SPARC64_PC_REGNUM || regnum == -1)
regcache_raw_collect (regcache, SPARC64_PC_REGNUM,
regs + gregset->r_pc_offset);
regs + gregmap->r_pc_offset);
if (regnum == SPARC64_NPC_REGNUM || regnum == -1)
regcache_raw_collect (regcache, SPARC64_NPC_REGNUM,
regs + gregset->r_npc_offset);
regs + gregmap->r_npc_offset);
if (regnum == SPARC64_Y_REGNUM || regnum == -1)
{
gdb_byte buf[8];
regcache_raw_collect (regcache, SPARC64_Y_REGNUM, buf);
memcpy (regs + gregset->r_y_offset,
buf + 8 - gregset->r_y_size, gregset->r_y_size);
memcpy (regs + gregmap->r_y_offset,
buf + 8 - gregmap->r_y_size, gregmap->r_y_size);
}
if ((regnum == SPARC64_FPRS_REGNUM || regnum == -1)
&& gregset->r_fprs_offset != -1)
&& gregmap->r_fprs_offset != -1)
regcache_raw_collect (regcache, SPARC64_FPRS_REGNUM,
regs + gregset->r_fprs_offset);
regs + gregmap->r_fprs_offset);
}
if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1)
{
int offset = gregset->r_g1_offset;
int offset = gregmap->r_g1_offset;
if (sparc32)
offset += 4;
@ -1449,9 +1449,9 @@ sparc64_collect_gregset (const struct sparc_gregset *gregset,
{
/* Not all of the register set variants include Locals and
Inputs. For those that don't, we read them off the stack. */
if (gregset->r_l0_offset != -1)
if (gregmap->r_l0_offset != -1)
{
int offset = gregset->r_l0_offset;
int offset = gregmap->r_l0_offset;
if (sparc32)
offset += 4;
@ -1467,7 +1467,7 @@ sparc64_collect_gregset (const struct sparc_gregset *gregset,
}
void
sparc64_supply_fpregset (const struct sparc_fpregset *fpregset,
sparc64_supply_fpregset (const struct sparc_fpregmap *fpregmap,
struct regcache *regcache,
int regnum, const void *fpregs)
{
@ -1479,14 +1479,14 @@ sparc64_supply_fpregset (const struct sparc_fpregset *fpregset,
{
if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
regcache_raw_supply (regcache, SPARC_F0_REGNUM + i,
regs + fpregset->r_f0_offset + (i * 4));
regs + fpregmap->r_f0_offset + (i * 4));
}
if (sparc32)
{
if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
regcache_raw_supply (regcache, SPARC32_FSR_REGNUM,
regs + fpregset->r_fsr_offset);
regs + fpregmap->r_fsr_offset);
}
else
{
@ -1494,18 +1494,18 @@ sparc64_supply_fpregset (const struct sparc_fpregset *fpregset,
{
if (regnum == (SPARC64_F32_REGNUM + i) || regnum == -1)
regcache_raw_supply (regcache, SPARC64_F32_REGNUM + i,
(regs + fpregset->r_f0_offset
(regs + fpregmap->r_f0_offset
+ (32 * 4) + (i * 8)));
}
if (regnum == SPARC64_FSR_REGNUM || regnum == -1)
regcache_raw_supply (regcache, SPARC64_FSR_REGNUM,
regs + fpregset->r_fsr_offset);
regs + fpregmap->r_fsr_offset);
}
}
void
sparc64_collect_fpregset (const struct sparc_fpregset *fpregset,
sparc64_collect_fpregset (const struct sparc_fpregmap *fpregmap,
const struct regcache *regcache,
int regnum, void *fpregs)
{
@ -1517,14 +1517,14 @@ sparc64_collect_fpregset (const struct sparc_fpregset *fpregset,
{
if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
regcache_raw_collect (regcache, SPARC_F0_REGNUM + i,
regs + fpregset->r_f0_offset + (i * 4));
regs + fpregmap->r_f0_offset + (i * 4));
}
if (sparc32)
{
if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
regcache_raw_collect (regcache, SPARC32_FSR_REGNUM,
regs + fpregset->r_fsr_offset);
regs + fpregmap->r_fsr_offset);
}
else
{
@ -1532,17 +1532,17 @@ sparc64_collect_fpregset (const struct sparc_fpregset *fpregset,
{
if (regnum == (SPARC64_F32_REGNUM + i) || regnum == -1)
regcache_raw_collect (regcache, SPARC64_F32_REGNUM + i,
(regs + fpregset->r_f0_offset
(regs + fpregmap->r_f0_offset
+ (32 * 4) + (i * 8)));
}
if (regnum == SPARC64_FSR_REGNUM || regnum == -1)
regcache_raw_collect (regcache, SPARC64_FSR_REGNUM,
regs + fpregset->r_fsr_offset);
regs + fpregmap->r_fsr_offset);
}
}
const struct sparc_fpregset sparc64_bsd_fpregset =
const struct sparc_fpregmap sparc64_bsd_fpregmap =
{
0 * 8, /* %f0 */
32 * 8, /* %fsr */

View File

@ -23,7 +23,7 @@
struct frame_info;
struct gdbarch;
struct regcache;
struct sparc_gregset;
struct sparc_gregmap;
struct trad_frame_saved_reg;
#include "sparc-tdep.h"
@ -97,24 +97,24 @@ enum sparc64_regnum
extern void sparc64_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch);
extern void sparc64_supply_gregset (const struct sparc_gregset *gregset,
extern void sparc64_supply_gregset (const struct sparc_gregmap *gregmap,
struct regcache *regcache,
int regnum, const void *gregs);
extern void sparc64_collect_gregset (const struct sparc_gregset *gregset,
extern void sparc64_collect_gregset (const struct sparc_gregmap *gregmap,
const struct regcache *regcache,
int regnum, void *gregs);
extern void sparc64_supply_fpregset (const struct sparc_fpregset *fpregset,
extern void sparc64_supply_fpregset (const struct sparc_fpregmap *fpregmap,
struct regcache *regcache,
int regnum, const void *fpregs);
extern void sparc64_collect_fpregset (const struct sparc_fpregset *fpregset,
extern void sparc64_collect_fpregset (const struct sparc_fpregmap *fpregmap,
const struct regcache *regcache,
int regnum, void *fpregs);
/* Functions and variables exported from sparc64-sol2-tdep.c. */
/* Register offsets for Solaris 2. */
extern const struct sparc_gregset sparc64_sol2_gregset;
extern const struct sparc_fpregset sparc64_sol2_fpregset;
extern const struct sparc_gregmap sparc64_sol2_gregmap;
extern const struct sparc_fpregmap sparc64_sol2_fpregmap;
extern void sparc64_sol2_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch);
@ -122,17 +122,17 @@ extern void sparc64_sol2_init_abi (struct gdbarch_info info,
/* Variables exported from sparc64fbsd-tdep.c. */
/* Register offsets for FreeBSD/sparc64. */
extern const struct sparc_gregset sparc64fbsd_gregset;
extern const struct sparc_gregmap sparc64fbsd_gregmap;
/* Functions and variables exported from sparc64nbsd-tdep.c. */
/* Register offsets for NetBSD/sparc64. */
extern const struct sparc_gregset sparc64nbsd_gregset;
extern const struct sparc_gregmap sparc64nbsd_gregmap;
extern struct trad_frame_saved_reg *
sparc64nbsd_sigcontext_saved_regs (CORE_ADDR sigcontext_addr,
struct frame_info *next_frame);
extern const struct sparc_fpregset sparc64_bsd_fpregset;
extern const struct sparc_fpregmap sparc64_bsd_fpregmap;
#endif /* sparc64-tdep.h */

View File

@ -75,7 +75,7 @@ _initialize_sparc64fbsd_nat (void)
t->to_make_corefile_notes = fbsd_make_corefile_notes;
add_target (t);
sparc_gregset = &sparc64fbsd_gregset;
sparc_gregmap = &sparc64fbsd_gregmap;
/* Support debugging kernel virtual memory images. */
bsd_kvm_add_target (sparc64fbsd_kvm_supply_pcb);

View File

@ -34,7 +34,7 @@
#include "solib-svr4.h"
/* From <machine/reg.h>. */
const struct sparc_gregset sparc64fbsd_gregset =
const struct sparc_gregmap sparc64fbsd_gregmap =
{
26 * 8, /* "tstate" */
25 * 8, /* %pc */
@ -53,7 +53,7 @@ sparc64fbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
sparc64_supply_gregset (&sparc64fbsd_gregset, regcache, regnum, gregs);
sparc64_supply_gregset (&sparc64fbsd_gregmap, regcache, regnum, gregs);
}
static void
@ -61,7 +61,7 @@ sparc64fbsd_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
sparc64_collect_gregset (&sparc64fbsd_gregset, regcache, regnum, gregs);
sparc64_collect_gregset (&sparc64fbsd_gregmap, regcache, regnum, gregs);
}
static void
@ -69,7 +69,7 @@ sparc64fbsd_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
}
static void
@ -77,7 +77,7 @@ sparc64fbsd_collect_fpregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *fpregs, size_t len)
{
sparc64_collect_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
}

View File

@ -30,55 +30,55 @@
traced process is 32-bit or 64-bit. */
static void
sparc64nbsd_supply_gregset (const struct sparc_gregset *gregset,
sparc64nbsd_supply_gregset (const struct sparc_gregmap *gregmap,
struct regcache *regcache,
int regnum, const void *gregs)
{
int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
if (sparc32)
sparc32_supply_gregset (&sparc32nbsd_gregset, regcache, regnum, gregs);
sparc32_supply_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs);
else
sparc64_supply_gregset (&sparc64nbsd_gregset, regcache, regnum, gregs);
sparc64_supply_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs);
}
static void
sparc64nbsd_collect_gregset (const struct sparc_gregset *gregset,
sparc64nbsd_collect_gregset (const struct sparc_gregmap *gregmap,
const struct regcache *regcache,
int regnum, void *gregs)
{
int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
if (sparc32)
sparc32_collect_gregset (&sparc32nbsd_gregset, regcache, regnum, gregs);
sparc32_collect_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs);
else
sparc64_collect_gregset (&sparc64nbsd_gregset, regcache, regnum, gregs);
sparc64_collect_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs);
}
static void
sparc64nbsd_supply_fpregset (const struct sparc_fpregset *fpregset,
sparc64nbsd_supply_fpregset (const struct sparc_fpregmap *fpregmap,
struct regcache *regcache,
int regnum, const void *fpregs)
{
int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
if (sparc32)
sparc32_supply_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs);
sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
else
sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
}
static void
sparc64nbsd_collect_fpregset (const struct sparc_fpregset *fpregset,
sparc64nbsd_collect_fpregset (const struct sparc_fpregmap *fpregmap,
const struct regcache *regcache,
int regnum, void *fpregs)
{
int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
if (sparc32)
sparc32_collect_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs);
sparc32_collect_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
else
sparc64_collect_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
}
/* Determine whether `gregset_t' contains register REGNUM. */

View File

@ -37,7 +37,7 @@
#include "nbsd-tdep.h"
/* From <machine/reg.h>. */
const struct sparc_gregset sparc64nbsd_gregset =
const struct sparc_gregmap sparc64nbsd_gregmap =
{
0 * 8, /* "tstate" */
1 * 8, /* %pc */
@ -56,7 +56,7 @@ sparc64nbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
sparc64_supply_gregset (&sparc64nbsd_gregset, regcache, regnum, gregs);
sparc64_supply_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs);
}
static void
@ -64,7 +64,7 @@ sparc64nbsd_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
}

View File

@ -120,8 +120,8 @@ _initialize_sparc64obsd_nat (void)
sparc_gregset_supplies_p = sparc64obsd_gregset_supplies_p;
sparc_fpregset_supplies_p = sparc64obsd_fpregset_supplies_p;
sparc_gregset = &sparc64nbsd_gregset;
sparc_fpregset = &sparc64_bsd_fpregset;
sparc_gregmap = &sparc64nbsd_gregmap;
sparc_fpregmap = &sparc64_bsd_fpregmap;
/* Add some extra features to the generic SPARC target. */
obsd_add_target (sparc_target ());

View File

@ -46,7 +46,7 @@
match the ptrace(2) layout. */
/* From <machine/reg.h>. */
const struct sparc_gregset sparc64obsd_gregset =
const struct sparc_gregmap sparc64obsd_gregmap =
{
0 * 8, /* "tstate" */
1 * 8, /* %pc */
@ -59,7 +59,7 @@ const struct sparc_gregset sparc64obsd_gregset =
4 /* sizeof (%y) */
};
const struct sparc_gregset sparc64obsd_core_gregset =
const struct sparc_gregmap sparc64obsd_core_gregmap =
{
0 * 8, /* "tstate" */
1 * 8, /* %pc */
@ -81,12 +81,12 @@ sparc64obsd_supply_gregset (const struct regset *regset,
if (len < 832)
{
sparc64_supply_gregset (&sparc64obsd_gregset, regcache, regnum, gregs);
sparc64_supply_gregset (&sparc64obsd_gregmap, regcache, regnum, gregs);
return;
}
sparc64_supply_gregset (&sparc64obsd_core_gregset, regcache, regnum, gregs);
sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
sparc64_supply_gregset (&sparc64obsd_core_gregmap, regcache, regnum, gregs);
sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
}
static void
@ -94,7 +94,7 @@ sparc64obsd_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs);
sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs);
}

View File

@ -62,8 +62,8 @@ void _initialize_sparcnbsd_nat (void);
void
_initialize_sparcnbsd_nat (void)
{
sparc_gregset = &sparc32nbsd_gregset;
sparc_fpregset = &sparc32_bsd_fpregset;
sparc_gregmap = &sparc32nbsd_gregmap;
sparc_fpregmap = &sparc32_bsd_fpregmap;
/* We've got nothing to add to the generic SPARC target. */
add_target (sparc_target ());

View File

@ -41,7 +41,7 @@
#define X_RS2(i) ((i) & 0x1f)
#define X_I(i) (((i) >> 13) & 1)
const struct sparc_gregset sparc32nbsd_gregset =
const struct sparc_gregmap sparc32nbsd_gregmap =
{
0 * 4, /* %psr */
1 * 4, /* %pc */
@ -58,13 +58,13 @@ sparc32nbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
sparc32_supply_gregset (&sparc32nbsd_gregset, regcache, regnum, gregs);
sparc32_supply_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs);
/* Traditional NetBSD core files don't use multiple register sets.
Instead, the general-purpose and floating-point registers are
lumped together in a single section. */
if (len >= 212)
sparc32_supply_fpregset (&sparc32_bsd_fpregset, regcache, regnum,
sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum,
(const char *) gregs + 80);
}
@ -73,7 +73,7 @@ sparc32nbsd_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
sparc32_supply_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs);
sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
}