summaryrefslogtreecommitdiffstats
path: root/gdb/ppc-linux-nat.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2001-11-20 16:35:24 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2001-11-20 16:35:24 +0000
commitf00d375378d3736554aa60d7c2c4529ce00b3800 (patch)
tree2ac064b5da7fc8e2241dcd08b69166deed0ba235 /gdb/ppc-linux-nat.c
parent2181f54fd8bcebf21905b3fc5cff5e8acfeab641 (diff)
downloadppe42-binutils-f00d375378d3736554aa60d7c2c4529ce00b3800.tar.gz
ppe42-binutils-f00d375378d3736554aa60d7c2c4529ce00b3800.zip
2001-11-19 Elena Zannoni <ezannoni@redhat.com>
* ppc-linux-nat.c (COPY_REG): Use regcache_collect instead of accessing registers[]. (fill_fpregset): Ditto.
Diffstat (limited to 'gdb/ppc-linux-nat.c')
-rw-r--r--gdb/ppc-linux-nat.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index bcb438c543..13eb839cbc 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -80,8 +80,7 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
#define COPY_REG(_idx_,_regi_) \
if ((regno == -1) || regno == _regi_) \
- memcpy (regp + _idx_, &registers[REGISTER_BYTE (_regi_)], \
- REGISTER_RAW_SIZE (_regi_))
+ regcache_collect (_regi_, regp + _idx_)
for (regi = 0; regi < 32; regi++)
{
@@ -113,16 +112,10 @@ void
fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
{
int regi;
- char *to;
- char *from;
for (regi = 0; regi < 32; regi++)
{
if ((regno == -1) || (regno == FP0_REGNUM + regi))
- {
- from = (char *) &registers[REGISTER_BYTE (FP0_REGNUM + regi)];
- to = (char *) (*fpregsetp + regi);
- memcpy (to, from, REGISTER_RAW_SIZE (FP0_REGNUM + regi));
- }
+ regcache_collect (FP0_REGNUM + regi, (char *) (*fpregsetp + regi));
}
}
OpenPOWER on IntegriCloud