From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20219 invoked by alias); 18 Apr 2019 16:50:18 -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 20198 invoked by uid 89); 18 Apr 2019 16:50:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=slashes, devel, gdb_versions, our 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, 18 Apr 2019 16:50:17 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 4E89FAE69 for ; Thu, 18 Apr 2019 16:50:15 +0000 (UTC) Date: Thu, 18 Apr 2019 16:50:00 -0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH][gdb/testsuite] Fix break-probes.exp with native-gdbserver Message-ID: <20190418165011.GA14803@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00348.txt.bz2 Hi, When running break-probes.exp with native-gdbserver, we run into: ... FAIL: gdb.base/break-probes.exp: run til our library loads (the program exited) FAIL: gdb.base/break-probes.exp: call (int) foo(23) ... due to the fact that we're trying to match: ... Inferior loaded /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base\ /break-probes/break-probes-solib.so ... using pattern: ... Inferior loaded $sysroot$binfile_lib ... which expands into: ... Inferior loaded //data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base\ /break-probes/break-probes-solib.so ... Fix this by removing trailing slashes from the sysroot variable. Tested on x86_64-linux with native and native-gdbserver (with sysroot set to "/", "/." and "/./"). OK for trunk? Thanks, - Tom [gdb/testsuite] Fix break-probes.exp with native-gdbserver gdb/testsuite/ChangeLog: 2019-04-18 Tom de Vries PR gdb/24433 * gdb.base/break-probes.exp: Remove trailing slash from sysroot variable. --- gdb/testsuite/gdb.base/break-probes.exp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdb/testsuite/gdb.base/break-probes.exp b/gdb/testsuite/gdb.base/break-probes.exp index ca9a7841f1..3c826e1aad 100644 --- a/gdb/testsuite/gdb.base/break-probes.exp +++ b/gdb/testsuite/gdb.base/break-probes.exp @@ -70,6 +70,9 @@ if { $using_probes } { } } + # Remove trailing slash. + regsub {/$} "$sysroot" "" sysroot + # GDB strips "target:" from the start of filenames # when operating on the local filesystem regsub "^target:" "$sysroot" "(target:)?" sysroot