From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11865 invoked by alias); 18 Apr 2019 18:13:26 -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 11857 invoked by uid 89); 18 Apr 2019 18:13:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: mail-wr1-f68.google.com Received: from mail-wr1-f68.google.com (HELO mail-wr1-f68.google.com) (209.85.221.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Apr 2019 18:13:25 +0000 Received: by mail-wr1-f68.google.com with SMTP id o12so749593wrn.2 for ; Thu, 18 Apr 2019 11:13:24 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:4c97:6d52:2cea:997b? ([2001:8a0:f913:f700:4c97:6d52:2cea:997b]) by smtp.gmail.com with ESMTPSA id c2sm2490389wrr.13.2019.04.18.11.13.22 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 11:13:22 -0700 (PDT) Subject: Re: [PATCH][gdb/testsuite] Fix break-probes.exp with native-gdbserver To: Tom de Vries , gdb-patches@sourceware.org References: <20190418165011.GA14803@delia> From: Pedro Alves Message-ID: <27f28bbf-107d-dbd0-9bbd-480776aa5d0c@redhat.com> Date: Thu, 18 Apr 2019 18:13:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190418165011.GA14803@delia> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-04/txt/msg00355.txt.bz2 On 4/18/19 5:50 PM, Tom de Vries wrote: > 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? > I think we made a little mistake in the recent "set sysroot in board file" patch: commit c92df149c29518f6e1d4a3174b3e29162fcd3ad6 Author: Alan Hayward AuthorDate: Thu Mar 28 12:33:29 2019 +0000 Testsuite: set sysroot when using gdbserver I think it would be better to make that do "set sysroot" instead of the current "set sysroot /" Setting the sysroot to empty means to read from the local filesystem, which is what was intended. And with that, this patch shouldn't be necessary. Thanks, Pedro Alves