aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-linux-nat.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2001-11-18 01:19:47 +0000
committerKevin Buettner <kevinb@redhat.com>2001-11-18 01:19:47 +0000
commit8a4067459977e8d635777ac60ba2c4f99da80b2e (patch)
tree3e8a3068ac740de35b6b516bbf4ef9c06f810d30 /gdb/i386-linux-nat.c
parent27758734ec42118153529d5928d69c67fbec928f (diff)
downloadgdb-8a4067459977e8d635777ac60ba2c4f99da80b2e.zip
gdb-8a4067459977e8d635777ac60ba2c4f99da80b2e.tar.gz
gdb-8a4067459977e8d635777ac60ba2c4f99da80b2e.tar.bz2
* i386-linux-nat.c (fill_gregset): Use regcache_collect() instead
of accessing registers[] directly.
Diffstat (limited to 'gdb/i386-linux-nat.c')
-rw-r--r--gdb/i386-linux-nat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index fb32df0..df0838b 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -322,11 +322,10 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
for (i = 0; i < NUM_GREGS; i++)
if ((regno == -1 || regno == i))
- *(regp + regmap[i]) = *(elf_greg_t *) &registers[REGISTER_BYTE (i)];
+ regcache_collect (i, regp + regmap[i]);
if (regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
- *(regp + regmap[ORIG_EAX]) =
- *(elf_greg_t *) &registers[REGISTER_BYTE (I386_LINUX_ORIG_EAX_REGNUM)];
+ regcache_collect (I386_LINUX_ORIG_EAX_REGNUM, regp + regmap[ORIG_EAX]);
}
#ifdef HAVE_PTRACE_GETREGS