From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69954 invoked by alias); 28 Mar 2019 14:03:24 -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 69838 invoked by uid 89); 28 Mar 2019 14:03:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_1,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1993 X-HELO: mail-wr1-f49.google.com Received: from mail-wr1-f49.google.com (HELO mail-wr1-f49.google.com) (209.85.221.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Mar 2019 14:03:18 +0000 Received: by mail-wr1-f49.google.com with SMTP id s15so23039297wra.12 for ; Thu, 28 Mar 2019 07:03:17 -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 t15sm23259504wrx.22.2019.03.28.07.03.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 07:03:15 -0700 (PDT) Subject: Re: [RFC/PATCH] Testsuite: set sysroot when using gdbserver To: Alan Hayward References: <20190327164025.48105-1-alan.hayward@arm.com> <20190327134915.5e9b19ba@f29-4.lan> <20190327221438.1fade1ef@f29-4.lan> <3C508419-659A-46F9-915E-0F96AF6FBC91@arm.com> <655F33FF-0FD8-4478-A765-F76F004FB317@arm.com> Cc: Kevin Buettner , GDB Patches , nd From: Pedro Alves Message-ID: Date: Thu, 28 Mar 2019 14:03:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <655F33FF-0FD8-4478-A765-F76F004FB317@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2019-03/txt/msg00714.txt.bz2 On 03/28/2019 12:50 PM, Alan Hayward wrote: > >> >> IMO we could also look at this from the perspective that the slowness is >> something that we should tackle, improve in gdb somehow. For example, we >> could improve caching a lot. We have a readahead cache for vFile:pread, but >> we could also have a persistent cache layer, so that we wouldn't be >> downloading the same shared library files over and over again. > > Will caching only effect extended gdbserver (which AIUI, gdbserver stays alive > between tests)? It’s not an area I’ve (yet) looked at. It'd work for plain target remote too. What I meant by persistent is that it would persist across gdb invocations, saved in a cache directory, similarly to where we put the new index cache. We could e.g., key that on build id. > >> >>> >>> I don’t know much about how the board files work, but, looks like I can >>> just add a flag via “set_board_info” in the relevant board files. >>> >>> I can then check for it at the end of gdbserver_start. Or instead check >>> at the same place “target remote” is run (although I couldn’t find where >>> that was yesterday!). >> >> Probably just adding >> >> set GDBFLAGS "${GDBFLAGS} -ex \"set sysroot /\"" >> >> to testsuite/boards/local-board.exp is all you'd need. > > > That fixes it! And logically makes sense too. > Works fine on the buildbot slave. > >> >> I think it'd be good to have a testcase in gdb.server/ that explicitly >> tests debugging a bit with "set sysroot target:" enabled, so that we >> don't lose coverage of that. > > Agreed. Happy to raise that as a new patch next week - trying to avoid > writing anything new as I’m not really here today. That'd be great, thanks. > > Is the following patch ok for pushing? > > Given you told me the line to add, I wasn’t sure if I should be adding you > to the changelog line too :) > Fine with me either way. Patch is OK. Thanks, Pedro Alves