* cris.h (R_CRIS_32_IE): New relocation.
[deliverable/binutils-gdb.git] / gdb / remote.c
index 9af9efea1870cd5ebb2ccc63998b23b8d38f9129..fa0b4bc13f39e879ea1568e5f2a5f30cb0956fcc 100644 (file)
@@ -3316,7 +3316,6 @@ remote_detach_1 (char *args, int from_tty, int extended)
     }
 
   discard_pending_stop_replies (pid);
-  detach_inferior (pid);
   target_mourn_inferior ();
 }
 
@@ -4510,32 +4509,29 @@ process_stop_reply (struct stop_reply *stop_reply,
   if (ptid_equal (ptid, null_ptid))
     ptid = inferior_ptid;
 
-  if (status->kind == TARGET_WAITKIND_EXITED
-      || status->kind == TARGET_WAITKIND_SIGNALLED)
+  if (status->kind != TARGET_WAITKIND_EXITED
+      && status->kind != TARGET_WAITKIND_SIGNALLED)
     {
-      int pid = ptid_get_pid (ptid);
-      delete_inferior (pid);
-    }
-  else
-    notice_new_inferiors (ptid);
+      notice_new_inferiors (ptid);
 
-  /* Expedited registers.  */
-  if (stop_reply->regcache)
-    {
-      cached_reg_t *reg;
-      int ix;
+      /* Expedited registers.  */
+      if (stop_reply->regcache)
+       {
+         cached_reg_t *reg;
+         int ix;
+
+         for (ix = 0;
+              VEC_iterate(cached_reg_t, stop_reply->regcache, ix, reg);
+              ix++)
+           regcache_raw_supply (get_thread_regcache (ptid),
+                                reg->num, reg->data);
+         VEC_free (cached_reg_t, stop_reply->regcache);
+       }
 
-      for (ix = 0;
-          VEC_iterate(cached_reg_t, stop_reply->regcache, ix, reg);
-          ix++)
-       regcache_raw_supply (get_thread_regcache (ptid),
-                            reg->num, reg->data);
-      VEC_free (cached_reg_t, stop_reply->regcache);
+      remote_stopped_by_watchpoint_p = stop_reply->stopped_by_watchpoint_p;
+      remote_watch_data_address = stop_reply->watch_data_address;
     }
 
-  remote_stopped_by_watchpoint_p = stop_reply->stopped_by_watchpoint_p;
-  remote_watch_data_address = stop_reply->watch_data_address;
-
   stop_reply_xfree (stop_reply);
   return ptid;
 }
@@ -6509,7 +6505,6 @@ extended_remote_kill (void)
   if (res != 0)
     error (_("Can't kill process"));
 
-  delete_inferior (pid);
   target_mourn_inferior ();
 }
 
@@ -6556,6 +6551,9 @@ extended_remote_mourn_1 (struct target_ops *target)
   /* Unlike "target remote", we do not want to unpush the target; then
      the next time the user says "run", we won't be connected.  */
 
+  /* Call common code to mark the inferior as not running.     */
+  generic_mourn_inferior ();
+
   if (have_inferiors ())
     {
       extern void nullify_last_target_wait_ptid ();
@@ -6567,10 +6565,6 @@ extended_remote_mourn_1 (struct target_ops *target)
     }
   else
     {
-      struct remote_state *rs = get_remote_state ();
-
-      /* Call common code to mark the inferior as not running. */
-      generic_mourn_inferior ();
       if (!remote_multi_process_p (rs))
        {
          /* Check whether the target is running now - some remote stubs
This page took 0.025712 seconds and 4 git commands to generate.