From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122284 invoked by alias); 28 Nov 2019 12:18:46 -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 121989 invoked by uid 89); 28 Nov 2019 12:18:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-wm1-f46.google.com Received: from mail-wm1-f46.google.com (HELO mail-wm1-f46.google.com) (209.85.128.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Nov 2019 12:18:45 +0000 Received: by mail-wm1-f46.google.com with SMTP id f129so11429451wmf.2 for ; Thu, 28 Nov 2019 04:18:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=cXUXctlVbobz49y5krAIgkbCCOF7K3hPmUVv6Fbtwq4=; b=czBEMlp/YHmDzos7AFaOE1AjVmkCkBdBeVbcquk2GZXNqVdTD80z0MzKYdMVeZ2Nx4 +heGOiq+1ZjG1F2kN6g4XTmzPUNHxdrs2HMxmofbAUTHLu/ktwxyU5F+bSwZUnvdteOw wM+6IljKlUPpz1q9kAaGKwZiL5pW/X8Sns8l/qPXGXprBfGjGAW70M5nTUpp3Kp3qThY 4584htBex/f0m02u9w5DJZtIo7Dwc25kC0WM1aLyKgPSpPBsjVeaf6NzbOygG41iWlWQ koBYMoxhXtcKTa9gR91j/EOmv6eI/33Ccf1E7edyeTmTGVftzE8pOUXuAs0nwxuAHQUE /pVw== Return-Path: Received: from localhost (host109-151-46-117.range109-151.btcentralplus.com. [109.151.46.117]) by smtp.gmail.com with ESMTPSA id m15sm23143020wrq.97.2019.11.28.04.18.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Nov 2019 04:18:42 -0800 (PST) Date: Thu, 28 Nov 2019 12:18:00 -0000 From: Andrew Burgess To: Tom de Vries Cc: gdb-patches Subject: Re: [PATCHv2 4/4] gdb: Add new commands to list module variables and functions Message-ID: <20191128121840.GE3410@embecosm.com> References: <2572574a445f9f32b4cca9a6f767d8495f4503c1.1570101531.git.andrew.burgess@embecosm.com> <20191127212923.GC3410@embecosm.com> <4ab6ac9f-1446-bf90-7aad-294864bdcc54@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ab6ac9f-1446-bf90-7aad-294864bdcc54@suse.de> X-Fortune: You have a strong desire for a home and your family interests come first. X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg01100.txt.bz2 * Tom de Vries [2019-11-28 10:20:59 +0100]: > On 27-11-2019 22:29, Andrew Burgess wrote: > >> This test-case fails to compile for me: > >> ... > >> $ cd build/gdb; make check RUNTESTFLAGS="gdb.fortran/info-modules.exp" > >> gdb compile failed, src/gdb/testsuite/gdb.fortran/info-types.f90:39:6: > >> > >> use mod2 > >> 1 > >> Fatal Error: Can't open module file 'mod2.mod' for reading at (1): No > >> such file or directory > >> compilation terminated. > >> > >> === gdb Summary === > >> > >> # of untested testcases 1 > > > > > I've committed the fix below to address this issue. > > > > > diff --git a/gdb/testsuite/gdb.fortran/info-modules.exp b/gdb/testsuite/gdb.fortran/info-modules.exp > > index 43570066d2f..c57ac3ff569 100644 > > --- a/gdb/testsuite/gdb.fortran/info-modules.exp > > +++ b/gdb/testsuite/gdb.fortran/info-modules.exp > > @@ -23,7 +23,7 @@ if { [skip_fortran_tests] } { continue } > > standard_testfile info-types.f90 info-types-2.f90 > > > > if { [prepare_for_testing "failed to prepare" $testfile \ > > - [list $srcfile $srcfile2] {debug f90}] } { > > + [list $srcfile2 $srcfile] {debug f90}] } { > > return -1 > > } > > > > > > Ah, interesting. I initially tried: > ... > -standard_testfile info-types.f90 info-types-2.f90 > +standard_testfile info-types-2.f90 info-types.f90 > ... > which made the test-case compile but caused a bunch of FAILs, but it > didn't occur to me to switch the order in the preparing_for_testing call. That change will result in $srcfile and $srcfile2 swapping over. This test checks that symbols are being reported as from the correct source file, so the output patterns make use of the srcfile variables. That's why this didn't work. Thanks, Andre