mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-28 06:20:30 +00:00
* arm-linux-nat.c (store_newfpe_single): Use regcache_collect.
(store_newfpe_double, store_newfpe_extended, store_fpregister) (store_register, store_regs, fill_gregset, fill_fpregset): Likewise.
This commit is contained in:
parent
081ff160e9
commit
85ae890cdf
@ -1,3 +1,9 @@
|
||||
2002-02-23 Richard Earnshaw <rearnsha"arm.com>
|
||||
|
||||
* arm-linux-nat.c (store_newfpe_single): Use regcache_collect.
|
||||
(store_newfpe_double, store_newfpe_extended, store_fpregister)
|
||||
(store_register, store_regs, fill_gregset, fill_fpregset): Likewise.
|
||||
|
||||
2002-02-22 Jim Blandy <jimb@redhat.com>
|
||||
|
||||
Indicate that the bcache functions don't change the strings
|
||||
|
@ -161,32 +161,32 @@ fetch_nwfpe_register (int regno, FPA11 * fpa11)
|
||||
}
|
||||
|
||||
static void
|
||||
store_nwfpe_single (unsigned int fn, FPA11 * fpa11)
|
||||
store_nwfpe_single (unsigned int fn, FPA11 *fpa11)
|
||||
{
|
||||
unsigned int mem[3];
|
||||
|
||||
read_register_gen (ARM_F0_REGNUM + fn, (char *) &mem[0]);
|
||||
regcache_collect (ARM_F0_REGNUM + fn, (char *) &mem[0]);
|
||||
fpa11->fpreg[fn].fSingle = mem[0];
|
||||
fpa11->fType[fn] = typeSingle;
|
||||
}
|
||||
|
||||
static void
|
||||
store_nwfpe_double (unsigned int fn, FPA11 * fpa11)
|
||||
store_nwfpe_double (unsigned int fn, FPA11 *fpa11)
|
||||
{
|
||||
unsigned int mem[3];
|
||||
|
||||
read_register_gen (ARM_F0_REGNUM + fn, (char *) &mem[0]);
|
||||
regcache_collect (ARM_F0_REGNUM + fn, (char *) &mem[0]);
|
||||
fpa11->fpreg[fn].fDouble[1] = mem[0];
|
||||
fpa11->fpreg[fn].fDouble[0] = mem[1];
|
||||
fpa11->fType[fn] = typeDouble;
|
||||
}
|
||||
|
||||
void
|
||||
store_nwfpe_extended (unsigned int fn, FPA11 * fpa11)
|
||||
store_nwfpe_extended (unsigned int fn, FPA11 *fpa11)
|
||||
{
|
||||
unsigned int mem[3];
|
||||
|
||||
read_register_gen (ARM_F0_REGNUM + fn, (char *) &mem[0]);
|
||||
regcache_collect (ARM_F0_REGNUM + fn, (char *) &mem[0]);
|
||||
fpa11->fpreg[fn].fExtended[0] = mem[0]; /* sign & exponent */
|
||||
fpa11->fpreg[fn].fExtended[2] = mem[1]; /* ls bits */
|
||||
fpa11->fpreg[fn].fExtended[1] = mem[2]; /* ms bits */
|
||||
@ -336,7 +336,7 @@ store_fpregister (int regno)
|
||||
|
||||
/* Store fpsr. */
|
||||
if (ARM_FPS_REGNUM == regno && register_cached (ARM_FPS_REGNUM))
|
||||
read_register_gen (ARM_FPS_REGNUM, (char *) &fp.fpsr);
|
||||
regcache_collect (ARM_FPS_REGNUM, (char *) &fp.fpsr);
|
||||
|
||||
/* Store the floating point register. */
|
||||
if (regno >= ARM_F0_REGNUM && regno <= ARM_F7_REGNUM)
|
||||
@ -374,7 +374,7 @@ store_fpregs (void)
|
||||
|
||||
/* Store fpsr. */
|
||||
if (register_cached (ARM_FPS_REGNUM))
|
||||
read_register_gen (ARM_FPS_REGNUM, (char *) &fp.fpsr);
|
||||
regcache_collect (ARM_FPS_REGNUM, (char *) &fp.fpsr);
|
||||
|
||||
/* Store the floating point registers. */
|
||||
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
|
||||
@ -482,7 +482,7 @@ store_register (int regno)
|
||||
}
|
||||
|
||||
if (regno >= ARM_A1_REGNUM && regno <= ARM_PC_REGNUM)
|
||||
read_register_gen (regno, (char *) ®s[regno]);
|
||||
regcache_collect (regno, (char *) ®s[regno]);
|
||||
|
||||
ret = ptrace (PTRACE_SETREGS, tid, 0, ®s);
|
||||
if (ret < 0)
|
||||
@ -512,7 +512,7 @@ store_regs (void)
|
||||
for (regno = ARM_A1_REGNUM; regno <= ARM_PC_REGNUM; regno++)
|
||||
{
|
||||
if (register_cached (regno))
|
||||
read_register_gen (regno, (char *) ®s[regno]);
|
||||
regcache_collect (regno, (char *) ®s[regno]);
|
||||
}
|
||||
|
||||
ret = ptrace (PTRACE_SETREGS, tid, 0, ®s);
|
||||
@ -579,19 +579,19 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
|
||||
{
|
||||
int regnum;
|
||||
for (regnum = ARM_A1_REGNUM; regnum <= ARM_PC_REGNUM; regnum++)
|
||||
read_register_gen (regnum, (char *) &(*gregsetp)[regnum]);
|
||||
regcache_collect (regnum, (char *) &(*gregsetp)[regnum]);
|
||||
}
|
||||
else if (regno >= ARM_A1_REGNUM && regno <= ARM_PC_REGNUM)
|
||||
read_register_gen (regno, (char *) &(*gregsetp)[regno]);
|
||||
regcache_collect (regno, (char *) &(*gregsetp)[regno]);
|
||||
|
||||
if (ARM_PS_REGNUM == regno || -1 == regno)
|
||||
{
|
||||
if (arm_apcs_32)
|
||||
read_register_gen (ARM_PS_REGNUM,
|
||||
(char *) &(*gregsetp)[ARM_CPSR_REGNUM]);
|
||||
regcache_collect (ARM_PS_REGNUM,
|
||||
(char *) &(*gregsetp)[ARM_CPSR_REGNUM]);
|
||||
else
|
||||
read_register_gen (ARM_PC_REGNUM,
|
||||
(char *) &(*gregsetp)[ARM_PC_REGNUM]);
|
||||
regcache_collect (ARM_PC_REGNUM,
|
||||
(char *) &(*gregsetp)[ARM_PC_REGNUM]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -638,7 +638,7 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
|
||||
|
||||
/* Store fpsr. */
|
||||
if (ARM_FPS_REGNUM == regno || -1 == regno)
|
||||
read_register_gen (ARM_FPS_REGNUM, (char *) &fp->fpsr);
|
||||
regcache_collect (ARM_FPS_REGNUM, (char *) &fp->fpsr);
|
||||
}
|
||||
|
||||
/* Fill GDB's register array with the floating-point register values
|
||||
|
Loading…
Reference in New Issue
Block a user