From patchwork Thu Oct 3 14:23:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 34818 Received: (qmail 24180 invoked by alias); 3 Oct 2019 14:23:11 -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 24172 invoked by uid 89); 3 Oct 2019 14:23:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Oct 2019 14:23:09 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8F6E7AF0D for ; Thu, 3 Oct 2019 14:23:07 +0000 (UTC) Date: Thu, 3 Oct 2019 16:23:06 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix list-missing-source.exp with gcc 4.8 Message-ID: <20191003142304.GA31045@delia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes Hi, With gcc 4.8.5, we see this FAIL: ... (gdb) PASS: gdb.base/list-missing-source.exp: list info source^M Current source file is outputs/gdb.base/list-missing-source/main.c^M Source language is c.^M Producer is GNU C 4.8.5 -mtune=generic -march=x86-64 -g -fno-stack-protector.^M Compiled with DWARF 2 debugging format.^M Does not include preprocessor macro info.^M (gdb) FAIL: gdb.base/list-missing-source.exp: info source ... The problem is that a "Compilation directory is " line is expected, but this is missing due to the fact the the compilation unit for main.c doesn't contain a DW_AT_comp_dir in the DW_TAG_compile_unit DIE. Fix this by allowing the "Compilation directory" line to be missing. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix list-missing-source.exp with gcc 4.8 gdb/testsuite/ChangeLog: 2019-10-03 Tom de Vries PR testsuite/25059 * gdb.base/list-missing-source.exp: Allowing the "Compilation directory" line to be missing. --- gdb/testsuite/gdb.base/list-missing-source.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/list-missing-source.exp b/gdb/testsuite/gdb.base/list-missing-source.exp index 703603e7cb2..497ccab1f70 100644 --- a/gdb/testsuite/gdb.base/list-missing-source.exp +++ b/gdb/testsuite/gdb.base/list-missing-source.exp @@ -54,8 +54,8 @@ gdb_test "list" "1\[ \t\]+in\[ \t\]+$srcfile" gdb_test "info source" \ [multi_line \ "info source" \ - "Current source file is $srcfile" \ - "Compilation directory is \[^\n\r\]+" \ + "Current source file is $srcfile\(" \ + "Compilation directory is \[^\n\r\]+)?" \ "Source language is c." \ "Producer is \[^\n\r\]+" \ "Compiled with DWARF $decimal debugging format." \