2003-04-09 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / i387-tdep.c
index f2ed6b8e37ad91ac33d49f1e87956a938dcc255a..9b47e5827af9ac18ae95a3e512d1c5ccf019585a 100644 (file)
@@ -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
@@ -630,7 +642,7 @@ i387_fill_fxsave (char *fxsave, int regnum)
        /* 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
-           && i != FIOFF_REGNUM && i != FDOFF_REGNUM)
+           && i != FIOFF_REGNUM && i != FOOFF_REGNUM)
          {
            unsigned char buf[4];
 
This page took 0.023455 seconds and 4 git commands to generate.