diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-12-04 03:20:30 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-12-04 03:20:30 +0000 |
commit | 02ae777101c4e5debdf1277352997702fd1d4961 (patch) | |
tree | dd5fbd5968f3db95edc66ff3bb46552a483206d7 /gdb/lin-lwp.c | |
parent | 92806416b350aebd596e9a779b4d762430b2fb0a (diff) | |
download | gdb-02ae777101c4e5debdf1277352997702fd1d4961.zip gdb-02ae777101c4e5debdf1277352997702fd1d4961.tar.gz gdb-02ae777101c4e5debdf1277352997702fd1d4961.tar.bz2 |
2002-12-03 Andrew Cagney <ac131313@redhat.com>
* sparc-nat.c (fetch_inferior_registers)
(store_inferior_registers): Add comment on problem of LWP vs
threads.
From 2002-11-21 Daniel Jacobowitz <drow@mvista.com>
* lin-lwp.c (lin_lwp_fetch_registers): Remove.
(lin_lwp_store_registers): Remove.
(init_lin_lwp_ops): Use fetch_inferior_registers
and store_inferior_registers directly.
* sparc-nat.c (fetch_inferior_registers): Honor LWP ID.
(store_inferior_registers): Likewise.
Fix PR gdb/725.
Diffstat (limited to 'gdb/lin-lwp.c')
-rw-r--r-- | gdb/lin-lwp.c | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c index 88a10d8..444c221 100644 --- a/gdb/lin-lwp.c +++ b/gdb/lin-lwp.c @@ -1343,32 +1343,6 @@ lin_lwp_mourn_inferior (void) 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, @@ -1428,8 +1402,10 @@ init_lin_lwp_ops (void) 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; |