}
static void
-sol_thread_fetch_registers (int regnum)
+sol_thread_fetch_registers (struct regcache *regcache, int regnum)
{
thread_t thread;
td_thrhandle_t thandle;
{
/* It's an LWP; pass the request on to procfs. */
if (target_has_execution)
- procfs_ops.to_fetch_registers (regnum);
+ procfs_ops.to_fetch_registers (regcache, regnum);
else
- orig_core_ops.to_fetch_registers (regnum);
+ orig_core_ops.to_fetch_registers (regcache, regnum);
return;
}
calling the td routines because the td routines call ps_lget*
which affect the values stored in the registers array. */
- supply_gregset (current_regcache, (const gdb_gregset_t *) &gregset);
- supply_fpregset (current_regcache, (const gdb_fpregset_t *) &fpregset);
+ supply_gregset (regcache, (const gdb_gregset_t *) &gregset);
+ supply_fpregset (regcache, (const gdb_fpregset_t *) &fpregset);
#if 0
/* FIXME: libthread_db doesn't seem to handle this right. */
}
static void
-sol_thread_store_registers (int regnum)
+sol_thread_store_registers (struct regcache *regcache, int regnum)
{
thread_t thread;
td_thrhandle_t thandle;
if (!is_thread (inferior_ptid))
{
/* It's an LWP; pass the request on to procfs.c. */
- procfs_ops.to_store_registers (regnum);
+ procfs_ops.to_store_registers (regcache, regnum);
return;
}
char old_value[MAX_REGISTER_SIZE];
/* Save new register value. */
- regcache_raw_collect (current_regcache, regnum, old_value);
+ regcache_raw_collect (regcache, regnum, old_value);
val = p_td_thr_getgregs (&thandle, gregset);
if (val != TD_OK)
td_err_string (val));
/* Restore new register value. */
- regcache_raw_supply (current_regcache, regnum, old_value);
+ regcache_raw_supply (regcache, regnum, old_value);
#if 0
/* FIXME: libthread_db doesn't seem to handle this right. */
#endif
}
- fill_gregset (current_regcache, (gdb_gregset_t *) &gregset, regnum);
- fill_fpregset (current_regcache, (gdb_fpregset_t *) &fpregset, regnum);
+ fill_gregset (regcache, (gdb_gregset_t *) &gregset, regnum);
+ fill_fpregset (regcache, (gdb_fpregset_t *) &fpregset, regnum);
val = p_td_thr_setgregs (&thandle, gregset);
if (val != TD_OK)
inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
if (target_has_execution)
- procfs_ops.to_fetch_registers (-1);
+ procfs_ops.to_fetch_registers (current_regcache, -1);
else
- orig_core_ops.to_fetch_registers (-1);
+ orig_core_ops.to_fetch_registers (current_regcache, -1);
fill_gregset (current_regcache, (gdb_gregset_t *) gregset, -1);
do_cleanups (old_chain);
supply_gregset (current_regcache, (const gdb_gregset_t *) gregset);
if (target_has_execution)
- procfs_ops.to_store_registers (-1);
+ procfs_ops.to_store_registers (current_regcache, -1);
else
- orig_core_ops.to_store_registers (-1);
+ orig_core_ops.to_store_registers (current_regcache, -1);
do_cleanups (old_chain);
inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
if (target_has_execution)
- procfs_ops.to_fetch_registers (-1);
+ procfs_ops.to_fetch_registers (current_regcache, -1);
else
- orig_core_ops.to_fetch_registers (-1);
+ orig_core_ops.to_fetch_registers (current_regcache, -1);
fill_fpregset (current_regcache, (gdb_fpregset_t *) fpregset, -1);
do_cleanups (old_chain);
supply_fpregset (current_regcache, (const gdb_fpregset_t *) fpregset);
if (target_has_execution)
- procfs_ops.to_store_registers (-1);
+ procfs_ops.to_store_registers (current_regcache, -1);
else
- orig_core_ops.to_store_registers (-1);
+ orig_core_ops.to_store_registers (current_regcache, -1);
do_cleanups (old_chain);