From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97721 invoked by alias); 13 Jul 2015 09:35:02 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 97707 invoked by uid 89); 13 Jul 2015 09:35:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f51.google.com Received: from mail-pa0-f51.google.com (HELO mail-pa0-f51.google.com) (209.85.220.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 13 Jul 2015 09:35:01 +0000 Received: by padck2 with SMTP id ck2so40004780pad.0 for ; Mon, 13 Jul 2015 02:34:59 -0700 (PDT) X-Received: by 10.69.10.196 with SMTP id ec4mr67990077pbd.69.1436780099472; Mon, 13 Jul 2015 02:34:59 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id q5sm18180422pde.56.2015.07.13.02.34.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Jul 2015 02:34:58 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH] Fix attach-pie-noexec.exp fail on native-extended-gdbserver Date: Mon, 13 Jul 2015 09:35:00 -0000 Message-Id: <1436780091-7312-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00367.txt.bz2 When I examine the buildbot fails, I see this fail on native-extended-gdbserver, Attaching to process 13529^M "target:/scratch/yao/gdb/build-git/x86_64/gdb/testsuite/gdb.base/attach-pie-noexec (deleted)": could not open as an executable file: No such file or directory^M (gdb) FAIL: gdb.base/attach-pie-noexec.exp: attach if I run tests with board file unix, it doesn't exist, Attaching to process 13869^M /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/gdb.base/attach-pie-noexec (deleted): No such file or directory.^M (gdb) PASS: gdb.base/attach-pie-noexec.exp: attach the test expects to see the period at the end of the error message, gdb_test "attach $testpid" "Attaching to process $testpid\r\n.*: No such file or directory\\." "attach" however the period is missing when running with native-extended-gdbserver. in exec.c:exec_file_attach, GDB has two places may throw errors [1] and [2], if (load_via_target) { ... } else { ... if (scratch_chan < 0) perror_with_name (filename); <--- [1] } ... if (!exec_bfd) { error (_("\"%s\": could not open as an executable file: %s"), <-- [2] scratch_pathname, bfd_errmsg (bfd_get_error ())); } perror_with_name [1] append a period at the end of error message, but error [2] doesn't. This fix is to add a period at the end of the error message. Note that this fail is shown up on 7.9 release as well. gdb: 2015-07-13 Yao Qi * exec.c (exec_file_attach): Add period at the end of error message. --- gdb/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/exec.c b/gdb/exec.c index 3dfc437..f1b1049 100644 --- a/gdb/exec.c +++ b/gdb/exec.c @@ -283,7 +283,7 @@ exec_file_attach (const char *filename, int from_tty) if (!exec_bfd) { - error (_("\"%s\": could not open as an executable file: %s"), + error (_("\"%s\": could not open as an executable file: %s."), scratch_pathname, bfd_errmsg (bfd_get_error ())); } -- 1.9.1