This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Use regcache_raw_supply in i386bsd-nat.c
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 15 May 2004 19:04:54 +0200 (CEST)
- Subject: [PATCH] Use regcache_raw_supply in i386bsd-nat.c
Committed as obvious,
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* i386bsd-nat.c (supply_gregset): Use regcache_raw_supply.
(fill_gregset): Use regcache_raw_collect.
Index: i386bsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386bsd-nat.c,v
retrieving revision 1.26
diff -u -p -r1.26 i386bsd-nat.c
--- i386bsd-nat.c 16 Mar 2004 13:54:10 -0000 1.26
+++ i386bsd-nat.c 15 May 2004 17:03:16 -0000
@@ -123,14 +123,15 @@ cannot_fetch_register (int regnum)
void
supply_gregset (gregset_t *gregsetp)
{
- int i;
+ struct regcache *regcache = current_regcache;
+ int regnum;
- for (i = 0; i < I386_NUM_GREGS; i++)
+ for (regnum = 0; regnum < I386_NUM_GREGS; regnum++)
{
- if (CANNOT_FETCH_REGISTER (i))
- supply_register (i, NULL);
+ if (CANNOT_FETCH_REGISTER (regnum))
+ regcache_raw_supply (regcache, regnum, NULL);
else
- supply_register (i, REG_ADDR (gregsetp, i));
+ regcache_raw_supply (regcache, regnum, REG_ADDR (gregsetp, regnum));
}
}
@@ -141,11 +142,12 @@ supply_gregset (gregset_t *gregsetp)
void
fill_gregset (gregset_t *gregsetp, int regnum)
{
+ struct regcache *regcache = current_regcache;
int i;
for (i = 0; i < I386_NUM_GREGS; i++)
if ((regnum == -1 || regnum == i) && ! CANNOT_STORE_REGISTER (i))
- regcache_collect (i, REG_ADDR (gregsetp, i));
+ regcache_raw_collect (regcache, i, REG_ADDR (gregsetp, i));
}
#include "i387-tdep.h"