+2002-06-09 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-nat.c (suppy_gregset): Don't supply
+ I386_LINUX_ORIG_EAX_REGNUM if there isn't room for it in GDB's
+ register cache.
+ (fill_gregset): Don't fetch it under the same circumstances.
+
2002-06-09 Andrew Cagney <cagney@redhat.com>
* Makefile.in (callback_h): Define.
for (i = 0; i < NUM_GREGS; i++)
supply_register (i, (char *) (regp + regmap[i]));
- supply_register (I386_LINUX_ORIG_EAX_REGNUM, (char *) (regp + ORIG_EAX));
+ if (I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
+ supply_register (I386_LINUX_ORIG_EAX_REGNUM, (char *) (regp + ORIG_EAX));
}
/* Fill register REGNO (if it is a general-purpose register) in
if ((regno == -1 || regno == i))
regcache_collect (i, regp + regmap[i]);
- if (regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
+ if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
+ && I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
regcache_collect (I386_LINUX_ORIG_EAX_REGNUM, regp + ORIG_EAX);
}