2003-08-10 Mark Kettenis <kettenis@gnu.org>
+ From Peter Schauer (Peter.Schauer@regent.e-technik.tu-muenchen.de):
+ * sol-thread.c (sol_thread_store_registers): Use regcache_collect
+ and supply_register instead of manipulating the register buffer
+ directly.
+
From Peter Schauer (Peter.Schauer@regent.e-technik.tu-muenchen.de):
* config/i386/nm-i386sol2.h
(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Define to one.
if (regno != -1)
{ /* Not writing all the regs */
- /* save new register value */
- char* old_value = (char*) alloca (DEPRECATED_REGISTER_SIZE);
- memcpy (old_value, &deprecated_registers[REGISTER_BYTE (regno)],
- DEPRECATED_REGISTER_SIZE);
+ char old_value[MAX_REGISTER_SIZE];
+
+ /* Save new register value. */
+ regcache_collect (regno, old_value);
val = p_td_thr_getgregs (&thandle, gregset);
if (val != TD_OK)
error ("sol_thread_store_registers: td_thr_getfpregs %s",
td_err_string (val));
- /* restore new register value */
- memcpy (&deprecated_registers[REGISTER_BYTE (regno)], old_value,
- DEPRECATED_REGISTER_SIZE);
+ /* Restore new register value. */
+ supply_register (regno, old_value);
#if 0
/* thread_db doesn't seem to handle this right */