aboutsummaryrefslogtreecommitdiff
path: root/gdb/i387-tdep.c
diff options
context:
space:
mode:
authorKlee Dienes <kdienes@apple.com>2002-11-09 19:34:35 +0000
committerKlee Dienes <kdienes@apple.com>2002-11-09 19:34:35 +0000
commit932bb5249e2a85de849b8cf07b3b74a4816a4d21 (patch)
tree03543d55ec9cd07a7eb28fc75bbfdd4684508d75 /gdb/i387-tdep.c
parentebe68b2757630eabe111578a463387af99db8d1a (diff)
downloadgdb-932bb5249e2a85de849b8cf07b3b74a4816a4d21.zip
gdb-932bb5249e2a85de849b8cf07b3b74a4816a4d21.tar.gz
gdb-932bb5249e2a85de849b8cf07b3b74a4816a4d21.tar.bz2
2002-11-09 Klee Dienes <kdienes@apple.com>
* i387-tdep.c (i387_supply_register): When called with NULL as a buffer, mark the register as not provided (to mirror the behavior of supply_register). (i387_supply_fxsave): Ditto. (i387_supply_fsave): Ditto (inherits the behavior from i387_supply_register).
Diffstat (limited to 'gdb/i387-tdep.c')
-rw-r--r--gdb/i387-tdep.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 4999ff8..9b47e58 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -444,6 +444,12 @@ static int fsave_offset[] =
void
i387_supply_register (int regnum, char *fsave)
{
+ if (fsave == NULL)
+ {
+ supply_register (regnum, NULL);
+ return;
+ }
+
/* Most of the FPU control registers occupy only 16 bits in
the fsave area. Give those a special treatment. */
if (regnum >= FPC_REGNUM
@@ -564,6 +570,12 @@ i387_supply_fxsave (char *fxsave)
for (i = FP0_REGNUM; i <= last_regnum; i++)
{
+ if (fxsave == NULL)
+ {
+ supply_register (i, NULL);
+ continue;
+ }
+
/* Most of the FPU control registers occupy only 16 bits in
the fxsave area. Give those a special treatment. */
if (i >= FPC_REGNUM && i < XMM0_REGNUM