]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* inferior.c (remove_inferior_command): Don't remove an active inferior.
authorMarc Khouzam <marc.khouzam@ericsson.com>
Wed, 22 Dec 2010 18:23:38 +0000 (18:23 +0000)
committerMarc Khouzam <marc.khouzam@ericsson.com>
Wed, 22 Dec 2010 18:23:38 +0000 (18:23 +0000)
* mi/mi-main.c (mi_cmd_remove_inferior): Ditto.

gdb/ChangeLog
gdb/inferior.c
gdb/mi/mi-main.c

index 0f9f4e0f54d1e652c0455d2eb2171c7f656a02fb..7ff1b371289915f124c02a4be4c141c3b9e7f1d6 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-22  Marc Khouzam  <marc.khouzam@ericsson.com>
+
+       * inferior.c (remove_inferior_command): Don't remove an active inferior.
+       * mi/mi-main.c (mi_cmd_remove_inferior): Ditto.
+
 2010-12-17  Marc Khouzam  <marc.khouzam@ericsson.com>
 
        * mi/mi-main.c (mi_cmd_remove_inferior): Don't delete current inferior.
index 28c586792b8bc63219242809ee602c4b192a7487..3ae87d76b7db51970fa62221bb07d8bb5aee97e1 100644 (file)
@@ -741,6 +741,9 @@ remove_inferior_command (char *args, int from_tty)
 
   if (inf == current_inferior ())
     error (_("Can not remove current symbol inferior."));
+    
+  if (inf->pid != 0)
+    error (_("Can not remove an active inferior."));
 
   delete_inferior_1 (inf, 1);
 }
index 1084155fd07b46af5c2440e1ea0256df1986d0dc..8d622e92216d6b08694ce6251205377e95145fd7 100644 (file)
@@ -1651,6 +1651,9 @@ mi_cmd_remove_inferior (char *command, char **argv, int argc)
   if (!inf)
     error ("the specified thread group does not exist");
 
+  if (inf->pid != 0)
+    error ("can not remove an active inferior");
+
   if (inf == current_inferior ())
     {
       struct thread_info *tp = 0;