child_ops.to_mourn_inferior ();
}
-static void
-lin_lwp_fetch_registers (int regno)
-{
- struct cleanup *old_chain = save_inferior_ptid ();
-
- if (is_lwp (inferior_ptid))
- inferior_ptid = pid_to_ptid (GET_LWP (inferior_ptid));
-
- fetch_inferior_registers (regno);
-
- do_cleanups (old_chain);
-}
-
-static void
-lin_lwp_store_registers (int regno)
-{
- struct cleanup *old_chain = save_inferior_ptid ();
-
- if (is_lwp (inferior_ptid))
- inferior_ptid = pid_to_ptid (GET_LWP (inferior_ptid));
-
- store_inferior_registers (regno);
-
- do_cleanups (old_chain);
-}
-
static int
lin_lwp_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
struct mem_attrib *attrib,
lin_lwp_ops.to_detach = lin_lwp_detach;
lin_lwp_ops.to_resume = lin_lwp_resume;
lin_lwp_ops.to_wait = lin_lwp_wait;
- lin_lwp_ops.to_fetch_registers = lin_lwp_fetch_registers;
- lin_lwp_ops.to_store_registers = lin_lwp_store_registers;
+ /* fetch_inferior_registers and store_inferior_registers will
+ honor the LWP id, so we can use them directly. */
+ lin_lwp_ops.to_fetch_registers = fetch_inferior_registers;
+ lin_lwp_ops.to_store_registers = store_inferior_registers;
lin_lwp_ops.to_xfer_memory = lin_lwp_xfer_memory;
lin_lwp_ops.to_kill = lin_lwp_kill;
lin_lwp_ops.to_create_inferior = lin_lwp_create_inferior;