* remote.c (remote_close): Reset INFERIOR_PTID to NULL_PTID
authorPierre Muller <muller@sourceware.org>
Mon, 21 Feb 2011 15:56:16 +0000 (15:56 +0000)
committerPierre Muller <muller@sourceware.org>
Mon, 21 Feb 2011 15:56:16 +0000 (15:56 +0000)
before calling discard_all_inferiors.

gdb/ChangeLog
gdb/remote.c

index b1d233c23199a0004bbb83c0660e2c929a3946a1..89f74acd5c6bcc037dbe91e80f44187dab09c98f 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+       * remote.c (remote_close): Reset INFERIOR_PTID to NULL_PTID
+       before calling discard_all_inferiors.
+
 2011-02-21  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * opencl-lang.c (STRUCT_OCL_TYPE): Remove.
index c0fd9a7e07d11e41d0d95a595755ed0524f3719a..322b26e04048cc132b9fdf69b6c640bf0cd0921f 100644 (file)
@@ -2908,9 +2908,11 @@ remote_close (int quitting)
   remote_desc = NULL;
 
   /* We don't have a connection to the remote stub anymore.  Get rid
-     of all the inferiors and their threads we were controlling.  */
-  discard_all_inferiors ();
+     of all the inferiors and their threads we were controlling.
+     Reset inferior_ptid to null_ptid first, as otherwise has_stack_frame
+     will be unable to find the thread corresponding to (pid, 0, 0).  */
   inferior_ptid = null_ptid;
+  discard_all_inferiors ();
 
   /* We're no longer interested in any of these events.  */
   discard_pending_stop_replies (-1);
This page took 0.028689 seconds and 4 git commands to generate.