#include "regcache.h"
#include "symfile.h"
+#include "gdb_string.h"
+
extern struct target_ops sol_thread_ops; /* Forward declaration */
extern struct target_ops sol_core_ops; /* Forward declaration */
/* Most target vector functions from here on actually just pass through to
procfs.c, as they don't need to do anything specific for threads. */
-
-/* ARGSUSED */
static void
sol_thread_open (char *arg, int from_tty)
{
if (regno != -1)
{ /* Not writing all the regs */
- /* save new register value */
- char* old_value = (char*) alloca (REGISTER_SIZE);
- memcpy (old_value, &deprecated_registers[REGISTER_BYTE (regno)],
- 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,
- REGISTER_SIZE);
+ /* Restore new register value. */
+ supply_register (regno, old_value);
#if 0
/* thread_db doesn't seem to handle this right */