* regcache.c (supply_register): Clear regcache if buf is NULL.
+2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * regcache.c (supply_register): Clear regcache if buf is NULL.
+
2010-02-02 Nicolas Roche <roche@sourceware.org>
- Joel Brobecker <brobecker@adacore.com>
+ Joel Brobecker <brobecker@adacore.com>
* inferiors.c (find_inferior): Add function documentation.
(unloaded_dll): Handle the case where the unloaded dll has not
void
supply_register (struct regcache *regcache, int n, const void *buf)
{
- memcpy (register_data (regcache, n, 0), buf, register_size (n));
+ if (buf)
+ memcpy (register_data (regcache, n, 0), buf, register_size (n));
+ else
+ memset (register_data (regcache, n, 0), 0, register_size (n));
}
void