From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29332 invoked by alias); 19 Aug 2010 16:35:34 -0000 Received: (qmail 29319 invoked by uid 22791); 19 Aug 2010 16:35:32 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Aug 2010 16:34:55 +0000 Received: from wpaz29.hot.corp.google.com (wpaz29.hot.corp.google.com [172.24.198.93]) by smtp-out.google.com with ESMTP id o7JGYr3T027628 for ; Thu, 19 Aug 2010 09:34:53 -0700 Received: from vws11 (vws11.prod.google.com [10.241.21.139]) by wpaz29.hot.corp.google.com with ESMTP id o7JGYqkn031180 for ; Thu, 19 Aug 2010 09:34:52 -0700 Received: by vws11 with SMTP id 11so2133361vws.36 for ; Thu, 19 Aug 2010 09:34:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.89.30 with SMTP id c30mr73535vcm.21.1282235691943; Thu, 19 Aug 2010 09:34:51 -0700 (PDT) Received: by 10.220.83.37 with HTTP; Thu, 19 Aug 2010 09:34:51 -0700 (PDT) In-Reply-To: <20100819100121.GA32167@adacore.com> References: <1282209516-3612-1-git-send-email-brobecker@adacore.com> <20100819100121.GA32167@adacore.com> Date: Thu, 19 Aug 2010 16:35:00 -0000 Message-ID: Subject: Re: [PATCH] Fix regression in -file-list-exec-source-files command. From: Doug Evans To: Joel Brobecker Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes 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 X-SW-Source: 2010-08/txt/msg00343.txt.bz2 On Thu, Aug 19, 2010 at 3:01 AM, Joel Brobecker wro= te: >> This was tested on x86_64-linux in HEAD. =A0I'll see whether it's possib= le >> to create a regression test or not, next. > > The problem that I am seeing is that, in the testsuite, we compile the > examples using the source full filenames. For instance, using > gdb.base/arrayidx.exp, we do: > > =A0 =A0% gcc /[...]/gdb.base/arrayidx.c -g =A0-lm =A0 -o [...] > > As a result, the filename field ends up containing the fullname: > > =A0 =A0(gdb) interpreter-exec mi -file-list-exec-source-files > =A0 =A0^done,files=3D[{file=3D"/[...]/gdb.base/arrayidx.c",fullname=3D"/[= ...]/gdb.base/arrayidx.c"}, [...] > > Because of that, we cannot use one of our source files to demonstrate > the problem. > > The only thing I can think of that we could use to demonstrate the problem > is to check for empty filenames. Before the patch was applied, one of > the entries looked like this: > > =A0 =A0{file=3D"",fullname=3D"init.c"} > > There is no guaranty that this is going to happen on all platforms, > or even appear consistently on a given platform. This is probably > dependent on the compiler as well as the way system libraries such > as the C library have been built. =A0But I suppose that is better than > nothing. While not ideal, could you create a test in assembler/dwarf?