aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-06-27 21:52:21 +0000
committerMark Kettenis <kettenis@gnu.org>2004-06-27 21:52:21 +0000
commit40e2047218f16d9bdf4fb452f614cf12c7d2e1b2 (patch)
tree56ddd4ce92eac753f2c89a639a6fcc116b24d461
parent12b0b6deedc672f75f59aac556e21e290e202ca2 (diff)
downloadgdb-40e2047218f16d9bdf4fb452f614cf12c7d2e1b2.zip
gdb-40e2047218f16d9bdf4fb452f614cf12c7d2e1b2.tar.gz
gdb-40e2047218f16d9bdf4fb452f614cf12c7d2e1b2.tar.bz2
* i386v4-nat.c: Update copyright year and tweak comment.
(regmap): Remove trailing comma. (supply_gregset): Rename local variable i to regnum. Call regcache_raw_supply instead of supply_register. (fill_gregset): Rename argument regno to regnum. Call regcache_raw_collect instead of regcache_collect.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/i386v4-nat.c23
2 files changed, 21 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index de06f93..f5ce86b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2004-06-27 Mark Kettenis <kettenis@gnu.org>
+
+ * i386v4-nat.c: Update copyright year and tweak comment.
+ (regmap): Remove trailing comma.
+ (supply_gregset): Rename local variable i to regnum. Call
+ regcache_raw_supply instead of supply_register.
+ (fill_gregset): Rename argument regno to regnum. Call
+ regcache_raw_collect instead of regcache_collect.
+
2004-06-27 Ulrich Weigand <uweigand@de.ibm.com>
* frame.h (struct frame_id): New fields stack_addr_p, code_addr_p
diff --git a/gdb/i386v4-nat.c b/gdb/i386v4-nat.c
index 188f01b..a2f3cd3 100644
--- a/gdb/i386v4-nat.c
+++ b/gdb/i386v4-nat.c
@@ -1,6 +1,7 @@
-/* Native-dependent code for SVR4 Unix running on i386's.
+/* Native-dependent code for Unix SVR4 running on i386's.
+
Copyright 1988, 1989, 1991, 1992, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002
+ 2001, 2002, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -95,7 +96,7 @@ static int regmap[] =
EAX, ECX, EDX, EBX,
UESP, EBP, ESI, EDI,
EIP, EFL, CS, SS,
- DS, ES, FS, GS,
+ DS, ES, FS, GS
};
/* Fill GDB's register array with the general-purpose register values
@@ -105,25 +106,25 @@ void
supply_gregset (gregset_t *gregsetp)
{
greg_t *regp = (greg_t *) gregsetp;
- int i;
+ int regnum;
- for (i = 0; i < I386_NUM_GREGS; i++)
- supply_register (i, (char *) (regp + regmap[i]));
+ for (regnum = 0; regnum < I386_NUM_GREGS; regnum++)
+ regcache_raw_supply (current_regcache, regnum, regp + regmap[regnum]);
}
-/* Fill register REGNO (if it is a general-purpose register) in
- *GREGSETPS with the value in GDB's register array. If REGNO is -1,
+/* Fill register REGNUM (if it is a general-purpose register) in
+ *GREGSETPS with the value in GDB's register array. If REGNUM is -1,
do this for all registers. */
void
-fill_gregset (gregset_t *gregsetp, int regno)
+fill_gregset (gregset_t *gregsetp, int regnum)
{
greg_t *regp = (greg_t *) gregsetp;
int i;
for (i = 0; i < I386_NUM_GREGS; i++)
- if (regno == -1 || regno == i)
- regcache_collect (i, regp + regmap[i]);
+ if (regnum == -1 || regnum == i)
+ regcache_raw_collect (current_regcache, i, regp + regmap[i]);
}
#endif /* HAVE_GREGSET_T */