mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-23 20:19:49 +00:00
* sparc64-nat.c (sparc64_gregset_supplies_p): Add GDBARCH parameter.
Use it instead of current_gdbarch. Pass architecture to sparc32_gregset_supplies_p. (sparc64_fpregset_supplies_p): Add GDBARCH parameter. Use it instead of current_gdbarch. Pass architecture to sparc32_fpregset_supplies_p. * sparc64nbsd-nat.c (sparc64nbsd_gregset_supplies_p, sparc64nbsd_fpregset_supplies_p): Likewise. * sparc-nat.c (sparc_gregset_supplies_p, sparc_fpregset_supplies_p): Add GDBARCH parameter. (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise. (sparc_fetch_inferior_registers): Pass regcache architecture to sparc_gregset_supplies_p and sparc_fpregset_supplies_p. (sparc_store_inferior_registers): Likewise. * sparc-nat.h (sparc_gregset_supplies_p, sparc_fpregset_supplies_p: Add GDBARCH parameter. (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
This commit is contained in:
parent
a97b0ac8cf
commit
ec22ec346b
@ -1,3 +1,22 @@
|
||||
2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* sparc64-nat.c (sparc64_gregset_supplies_p): Add GDBARCH parameter.
|
||||
Use it instead of current_gdbarch. Pass architecture to
|
||||
sparc32_gregset_supplies_p.
|
||||
(sparc64_fpregset_supplies_p): Add GDBARCH parameter. Use it instead
|
||||
of current_gdbarch. Pass architecture to sparc32_fpregset_supplies_p.
|
||||
* sparc64nbsd-nat.c (sparc64nbsd_gregset_supplies_p,
|
||||
sparc64nbsd_fpregset_supplies_p): Likewise.
|
||||
* sparc-nat.c (sparc_gregset_supplies_p, sparc_fpregset_supplies_p):
|
||||
Add GDBARCH parameter.
|
||||
(sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
|
||||
(sparc_fetch_inferior_registers): Pass regcache architecture to
|
||||
sparc_gregset_supplies_p and sparc_fpregset_supplies_p.
|
||||
(sparc_store_inferior_registers): Likewise.
|
||||
* sparc-nat.h (sparc_gregset_supplies_p, sparc_fpregset_supplies_p:
|
||||
Add GDBARCH parameter.
|
||||
(sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
|
||||
|
||||
2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* ada-tasks.c (read_known_tasks_array): Use target_gdbarch instead
|
||||
|
@ -89,13 +89,13 @@ void (*sparc_collect_gregset) (const struct sparc_gregset *,
|
||||
const struct regcache *, int, void *);
|
||||
void (*sparc_supply_fpregset) (struct regcache *, int , const void *);
|
||||
void (*sparc_collect_fpregset) (const struct regcache *, int , void *);
|
||||
int (*sparc_gregset_supplies_p) (int);
|
||||
int (*sparc_fpregset_supplies_p) (int);
|
||||
int (*sparc_gregset_supplies_p) (struct gdbarch *, int);
|
||||
int (*sparc_fpregset_supplies_p) (struct gdbarch *, int);
|
||||
|
||||
/* Determine whether `gregset_t' contains register REGNUM. */
|
||||
|
||||
int
|
||||
sparc32_gregset_supplies_p (int regnum)
|
||||
sparc32_gregset_supplies_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
/* Integer registers. */
|
||||
if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_G7_REGNUM)
|
||||
@ -117,7 +117,7 @@ sparc32_gregset_supplies_p (int regnum)
|
||||
/* Determine whether `fpregset_t' contains register REGNUM. */
|
||||
|
||||
int
|
||||
sparc32_fpregset_supplies_p (int regnum)
|
||||
sparc32_fpregset_supplies_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
/* Floating-point registers. */
|
||||
if (regnum >= SPARC_F0_REGNUM && regnum <= SPARC_F31_REGNUM)
|
||||
@ -137,6 +137,7 @@ void
|
||||
sparc_fetch_inferior_registers (struct target_ops *ops,
|
||||
struct regcache *regcache, int regnum)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
int pid;
|
||||
|
||||
/* NOTE: cagney/2002-12-03: This code assumes that the currently
|
||||
@ -162,7 +163,7 @@ sparc_fetch_inferior_registers (struct target_ops *ops,
|
||||
return;
|
||||
}
|
||||
|
||||
if (regnum == -1 || sparc_gregset_supplies_p (regnum))
|
||||
if (regnum == -1 || sparc_gregset_supplies_p (gdbarch, regnum))
|
||||
{
|
||||
gregset_t regs;
|
||||
|
||||
@ -174,7 +175,7 @@ sparc_fetch_inferior_registers (struct target_ops *ops,
|
||||
return;
|
||||
}
|
||||
|
||||
if (regnum == -1 || sparc_fpregset_supplies_p (regnum))
|
||||
if (regnum == -1 || sparc_fpregset_supplies_p (gdbarch, regnum))
|
||||
{
|
||||
fpregset_t fpregs;
|
||||
|
||||
@ -189,6 +190,7 @@ void
|
||||
sparc_store_inferior_registers (struct target_ops *ops,
|
||||
struct regcache *regcache, int regnum)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
int pid;
|
||||
|
||||
/* NOTE: cagney/2002-12-02: See comment in fetch_inferior_registers
|
||||
@ -197,7 +199,7 @@ sparc_store_inferior_registers (struct target_ops *ops,
|
||||
if (pid == 0)
|
||||
pid = PIDGET (inferior_ptid);
|
||||
|
||||
if (regnum == -1 || sparc_gregset_supplies_p (regnum))
|
||||
if (regnum == -1 || sparc_gregset_supplies_p (gdbarch, regnum))
|
||||
{
|
||||
gregset_t regs;
|
||||
|
||||
@ -223,7 +225,7 @@ sparc_store_inferior_registers (struct target_ops *ops,
|
||||
return;
|
||||
}
|
||||
|
||||
if (regnum == -1 || sparc_fpregset_supplies_p (regnum))
|
||||
if (regnum == -1 || sparc_fpregset_supplies_p (gdbarch, regnum))
|
||||
{
|
||||
fpregset_t fpregs, saved_fpregs;
|
||||
|
||||
|
@ -29,11 +29,11 @@ extern void (*sparc_collect_gregset) (const struct sparc_gregset *,
|
||||
const struct regcache *, int, void *);
|
||||
extern void (*sparc_supply_fpregset) (struct regcache *, int , const void *);
|
||||
extern void (*sparc_collect_fpregset) (const struct regcache *, int , void *);
|
||||
extern int (*sparc_gregset_supplies_p) (int);
|
||||
extern int (*sparc_fpregset_supplies_p) (int);
|
||||
extern int (*sparc_gregset_supplies_p) (struct gdbarch *gdbarch, int);
|
||||
extern int (*sparc_fpregset_supplies_p) (struct gdbarch *gdbarch, int);
|
||||
|
||||
extern int sparc32_gregset_supplies_p (int regnum);
|
||||
extern int sparc32_fpregset_supplies_p (int regnum);
|
||||
extern int sparc32_gregset_supplies_p (struct gdbarch *gdbarch, int regnum);
|
||||
extern int sparc32_fpregset_supplies_p (struct gdbarch *gdbarch, int regnum);
|
||||
|
||||
/* Create a prototype generic SPARC target. The client can override
|
||||
it with local methods. */
|
||||
|
@ -26,10 +26,10 @@
|
||||
/* Determine whether `gregset_t' contains register REGNUM. */
|
||||
|
||||
static int
|
||||
sparc64_gregset_supplies_p (int regnum)
|
||||
sparc64_gregset_supplies_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
if (gdbarch_ptr_bit (current_gdbarch) == 32)
|
||||
return sparc32_gregset_supplies_p (regnum);
|
||||
if (gdbarch_ptr_bit (gdbarch) == 32)
|
||||
return sparc32_gregset_supplies_p (gdbarch, regnum);
|
||||
|
||||
/* Integer registers. */
|
||||
if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_G7_REGNUM)
|
||||
@ -52,10 +52,10 @@ sparc64_gregset_supplies_p (int regnum)
|
||||
/* Determine whether `fpregset_t' contains register REGNUM. */
|
||||
|
||||
static int
|
||||
sparc64_fpregset_supplies_p (int regnum)
|
||||
sparc64_fpregset_supplies_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
if (gdbarch_ptr_bit (current_gdbarch) == 32)
|
||||
return sparc32_fpregset_supplies_p (regnum);
|
||||
if (gdbarch_ptr_bit (gdbarch) == 32)
|
||||
return sparc32_fpregset_supplies_p (gdbarch, regnum);
|
||||
|
||||
/* Floating-point registers. */
|
||||
if ((regnum >= SPARC_F0_REGNUM && regnum <= SPARC_F31_REGNUM)
|
||||
|
@ -83,10 +83,10 @@ sparc64nbsd_collect_fpregset (const struct regcache *regcache,
|
||||
/* Determine whether `gregset_t' contains register REGNUM. */
|
||||
|
||||
static int
|
||||
sparc64nbsd_gregset_supplies_p (int regnum)
|
||||
sparc64nbsd_gregset_supplies_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
if (gdbarch_ptr_bit (current_gdbarch) == 32)
|
||||
return sparc32_gregset_supplies_p (regnum);
|
||||
if (gdbarch_ptr_bit (gdbarch) == 32)
|
||||
return sparc32_gregset_supplies_p (gdbarch, regnum);
|
||||
|
||||
/* Integer registers. */
|
||||
if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_G7_REGNUM)
|
||||
@ -108,10 +108,10 @@ sparc64nbsd_gregset_supplies_p (int regnum)
|
||||
/* Determine whether `fpregset_t' contains register REGNUM. */
|
||||
|
||||
static int
|
||||
sparc64nbsd_fpregset_supplies_p (int regnum)
|
||||
sparc64nbsd_fpregset_supplies_p (struct gdbarch *gdbarch, int regnum)
|
||||
{
|
||||
if (gdbarch_ptr_bit (current_gdbarch) == 32)
|
||||
return sparc32_fpregset_supplies_p (regnum);
|
||||
if (gdbarch_ptr_bit (gdbarch) == 32)
|
||||
return sparc32_fpregset_supplies_p (gdbarch, regnum);
|
||||
|
||||
/* Floating-point registers. */
|
||||
if ((regnum >= SPARC_F0_REGNUM && regnum <= SPARC_F31_REGNUM)
|
||||
|
Loading…
Reference in New Issue
Block a user