From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 16CD6385800C for ; Fri, 30 Jul 2021 16:33:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 16CD6385800C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from tarox.wildebeest.org (83-87-18-245.cable.dynamic.v4.ziggo.nl [83.87.18.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 000D830291A9; Fri, 30 Jul 2021 18:33:16 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 8C13D413CC73; Fri, 30 Jul 2021 18:33:16 +0200 (CEST) From: Mark Wielaard To: debugedit@sourceware.org Cc: Mark Wielaard Subject: [PATCH] tests: Handle zero directory entry in .debug_line DWARF5 debugedit.at Date: Fri, 30 Jul 2021 18:33:11 +0200 Message-Id: <20210730163311.6147-1-mark@klomp.org> X-Mailer: git-send-email 2.18.4 X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: debugedit@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: debugedit development mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2021 16:33:20 -0000 We were skipping the zero directory entry, because it was always the same as the directory entry at position one. But that isn't true anymore with gcc 11.2.1. There the zero dir entry is unique. Fix the debugedit.at .debug_line testcases using DWARF5 to also include dir entry zero. Signed-off-by: Mark Wielaard --- tests/debugedit.at | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/debugedit.at b/tests/debugedit.at index 608b1d0..f9b50f7 100644 --- a/tests/debugedit.at +++ b/tests/debugedit.at @@ -492,6 +492,7 @@ DEBUGEDIT_SETUP([-gdwarf-5]) AT_DATA([expout], [foo/bar/baz +foo/bar/baz/subdir_bar foo/bar/baz/subdir_headers ]) @@ -500,8 +501,8 @@ AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./subdir_bar/bar.o]]) AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./baz.o]]) AT_CHECK([[ readelf --debug-dump=line foo.o subdir_bar/bar.o baz.o \ - | grep -A5 "The Directory Table" | grep "^ [123]" \ - | cut -f2- -d/ | grep ^foo/ | sort + | grep -A5 "The Directory Table" | grep "^ [0123]" \ + | cut -f2- -d/ | grep ^foo/ | sort | uniq ]],[0],[expout]) AT_CLEANUP @@ -539,14 +540,15 @@ DEBUGEDIT_SETUP([-gdwarf-5]) AT_DATA([expout], [foo/bar/baz +foo/bar/baz/subdir_bar foo/bar/baz/subdir_headers ]) AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o]]) AT_CHECK([[ readelf --debug-dump=line ./foobarbaz.part.o \ - | grep -A5 "The Directory Table" | grep "^ [123]" \ - | cut -f2- -d/ | grep ^foo/ | sort + | grep -A5 "The Directory Table" | grep "^ [0123]" \ + | cut -f2- -d/ | grep ^foo/ | sort | uniq ]],[0],[expout]) AT_CLEANUP @@ -584,14 +586,15 @@ DEBUGEDIT_SETUP([-gdwarf-5]) AT_DATA([expout], [foo/bar/baz +foo/bar/baz/subdir_bar foo/bar/baz/subdir_headers ]) AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.exe]]) AT_CHECK([[ readelf --debug-dump=line ./foobarbaz.exe \ - | grep -A5 "The Directory Table" | grep "^ [123]" \ - | cut -f2- -d/ | grep ^foo/ | sort + | grep -A5 "The Directory Table" | grep "^ [0123]" \ + | cut -f2- -d/ | grep ^foo/ | sort | uniq ]],[0],[expout]) AT_CLEANUP -- 2.18.4