+2011-10-11 David S. Miller <davem@davemloft.net>
+
+ * regcache.c (regcache_restore): Do not write unavailable regs, mark
+ static.
+ * regcache.h (regcache_restore): Remove declaration.
+
2011-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Revert this part of:
}
}
-void
+static void
regcache_restore (struct regcache *dst,
regcache_cooked_read_ftype *cooked_read,
void *cooked_read_context)
{
if (gdbarch_register_reggroup_p (gdbarch, regnum, restore_reggroup))
{
- int valid = cooked_read (cooked_read_context, regnum, buf);
+ enum register_status status;
- if (valid)
+ status = cooked_read (cooked_read_context, regnum, buf);
+ if (status == REG_VALID)
regcache_cooked_write (dst, regnum, buf);
}
}
extern void regcache_save (struct regcache *dst,
regcache_cooked_read_ftype *cooked_read,
void *cooked_read_context);
-extern void regcache_restore (struct regcache *dst,
- regcache_cooked_read_ftype *cooked_read,
- void *cooked_read_context);
/* Copy/duplicate the contents of a register cache. By default, the
operation is pass-through. Writes to DST and reads from SRC will