From patchwork Wed Aug 17 20:04:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 14719 Received: (qmail 31822 invoked by alias); 17 Aug 2016 20:07:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 31806 invoked by uid 89); 17 Aug 2016 20:07:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=Follow, H*M:0101 X-HELO: usplmg20.ericsson.net Received: from usplmg20.ericsson.net (HELO usplmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 17 Aug 2016 20:07:12 +0000 Received: from EUSAAHC004.ericsson.se (Unknown_Domain [147.117.188.84]) by (Symantec Mail Security) with SMTP id DA.AC.02568.9D4C4B75; Wed, 17 Aug 2016 22:11:05 +0200 (CEST) Received: from [142.133.110.144] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.86) with Microsoft SMTP Server id 14.3.301.0; Wed, 17 Aug 2016 16:04:24 -0400 Subject: Re: [PATCH] Add remove-inferiors test To: Pedro Alves , References: <20160817171239.24022-1-simon.marchi@ericsson.com> <93f11fe0-3693-6dc9-0865-20e6fa49f44c@redhat.com> From: Simon Marchi Message-ID: <33bbf145-67b8-0101-43fb-bba3656c53de@ericsson.com> Date: Wed, 17 Aug 2016 16:04:24 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <93f11fe0-3693-6dc9-0865-20e6fa49f44c@redhat.com> X-IsSubscribed: yes On 16-08-17 02:49 PM, Pedro Alves wrote: > On 08/17/2016 06:12 PM, Simon Marchi wrote: > >> gdb/testsuite/ChangeLog: >> >> * gdb.multi/remove-inferiors.exp: New file. >> * gdb.multi/remove-inferiors.c: New file. > > OK. > >> +proc test_remove_inferiors { } { >> + global binfile >> + >> + clean_restart ${binfile} >> + >> + # Add another inferior and switch to it. >> + add_inferior 2 "add second inferior" >> + switch_to_inferior 2 "switch to second inferior" >> + >> + # Test that it is not possible to remove the current inferior. >> + gdb_test "remove-inferiors 2" \ >> + "warning: Can not remove current symbol inferior 2." \ >> + "can't remove current inferior" > > Eh, this "symbol inferior" reference sounds like a bad > global replace on my part, years ago. The original multi-exec > support called program spaces "symbol spaces" instead. > > Follow up patch to remove that stray "symbol" preapproved. Ahh that explains it, I thought it was odd but didn't think about it too much. Pushed the main patch, as well as this one that fixes the error message: From eb2332d78d4ef40a2696aa0f6c833ea26a739efc Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 17 Aug 2016 16:02:27 -0400 Subject: [PATCH] Fix remove-inferior error message This error message should not contain the word symbol: (gdb) remove-inferiors 1 Warning: Can not remove current symbol inferior 1. gdb/ChangeLog: * inferior.c (remove_inferior_command): Fix error message. gdb/testsuite/ChangeLog: * gdb.multi/remove-inferiors.exp (test_remove_inferiors): Fix expected error message. --- gdb/ChangeLog | 4 ++++ gdb/inferior.c | 2 +- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.multi/remove-inferiors.exp | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 51504a0..dbd90dd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2016-08-17 Simon Marchi + * inferior.c (remove_inferior_command): Fix error message. + +2016-08-17 Simon Marchi + * inferior.c (exit_inferior_1): Remove comment. 2016-08-15 Matthew Wahab diff --git a/gdb/inferior.c b/gdb/inferior.c index 6507ae7..47d91c7 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -803,7 +803,7 @@ remove_inferior_command (char *args, int from_tty) if (inf == current_inferior ()) { - warning (_("Can not remove current symbol inferior %d."), num); + warning (_("Can not remove current inferior %d."), num); continue; } diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6e01da2..d025133 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2016-08-17 Simon Marchi + * gdb.multi/remove-inferiors.exp (test_remove_inferiors): Fix + expected error message. + +2016-08-17 Simon Marchi + * gdb.multi/remove-inferiors.exp: New file. * gdb.multi/remove-inferiors.c: New file. diff --git a/gdb/testsuite/gdb.multi/remove-inferiors.exp b/gdb/testsuite/gdb.multi/remove-inferiors.exp index c49b31d..d46beec 100644 --- a/gdb/testsuite/gdb.multi/remove-inferiors.exp +++ b/gdb/testsuite/gdb.multi/remove-inferiors.exp @@ -40,7 +40,7 @@ proc test_remove_inferiors { } { # Test that it is not possible to remove the current inferior. gdb_test "remove-inferiors 2" \ - "warning: Can not remove current symbol inferior 2." \ + "warning: Can not remove current inferior 2." \ "can't remove current inferior" # Test that it is possible to remove a non-active non-current inferior.