From 8fa067afb27618ea0b54d76b8096faca0d7ab0e7 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Wed, 22 Dec 2010 18:30:19 +0000 Subject: * inferior.c (remove_inferior_command): Don't remove an active inferior. * mi/mi-main.c (mi_cmd_remove_inferior): Ditto. --- gdb/inferior.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/inferior.c') diff --git a/gdb/inferior.c b/gdb/inferior.c index cad7e55..3493c16 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -754,6 +754,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); } -- cgit v1.1