From patchwork Wed Feb 28 16:46:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Durigan Junior X-Patchwork-Id: 26122 Received: (qmail 16985 invoked by alias); 28 Feb 2018 16:47:06 -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 16968 invoked by uid 89); 28 Feb 2018 16:47:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Feb 2018 16:47:04 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9BCF88182D20; Wed, 28 Feb 2018 16:47:02 +0000 (UTC) Received: from psique.yyz.redhat.com (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D4E02166BAE; Wed, 28 Feb 2018 16:47:02 +0000 (UTC) From: Sergio Durigan Junior To: GDB Patches Cc: Simon Marchi , Pedro Alves , Joel Brobecker , Sergio Durigan Junior Subject: [obvious/pushed] Change order of error message printed when gdbserver can't find CWD Date: Wed, 28 Feb 2018 11:46:55 -0500 Message-Id: <20180228164656.25363-1-sergiodj@redhat.com> In-Reply-To: <20180210014241.19278-3-sergiodj@redhat.com> References: <20180210014241.19278-3-sergiodj@redhat.com> X-IsSubscribed: yes I forgot to address Pedro's comment about my last patch and change the order of the message printed when getcwd returns NULL on gdbserver. This obvious commit does it. gdb/gdbserver/ChangeLog: 2018-02-28 Sergio Durigan Junior * server.c (captured_main): Change order of error message printed when the current working directory cannot be found. --- gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/server.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 8c3b02e5e4..ac88a9d778 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2018-02-28 Sergio Durigan Junior + + * server.c (captured_main): Change order of error message printed + when the current working directory cannot be found. + 2018-02-28 Sergio Durigan Junior * server.c: Include "filenames.h" and "pathstuff.h". diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 7745027628..f373d8a1e8 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -3573,7 +3573,7 @@ captured_main (int argc, char *argv[]) current_directory = getcwd (NULL, 0); if (current_directory == NULL) { - error (_("%s: error finding working directory"), + error (_("Could not find current working directory: %s"), safe_strerror (errno)); }