- if (ourstatus->kind == TARGET_WAITKIND_STOPPED
- && ourstatus->value.sig == TARGET_SIGNAL_TRAP)
- /* Check for a thread event. */
- check_event (ptid);
-
- if (!ptid_equal (trap_ptid, null_ptid))
- trap_ptid = thread_from_lwp (trap_ptid);
-
- /* Change the ptid back into the higher level PID + TID format.
- If the thread is dead and no longer on the thread list, we will
- get back a dead ptid. This can occur if the thread death event
- gets postponed by other simultaneous events. In such a case,
- we want to just ignore the event and continue on. */
- ptid = thread_from_lwp (ptid);
- if (GET_PID (ptid) == -1)
- ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
-
- return ptid;
-}
-
-static int
-thread_db_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct mem_attrib *attrib, struct target_ops *target)
-{
- struct cleanup *old_chain = save_inferior_ptid ();
- int xfer;
-
- if (is_thread (inferior_ptid))