From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15944 invoked by alias); 14 Apr 2006 07:41:09 -0000 Received: (qmail 15936 invoked by uid 22791); 14 Apr 2006 07:41:08 -0000 X-Spam-Check-By: sourceware.org Received: from xproxy.gmail.com (HELO xproxy.gmail.com) (66.249.82.195) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 14 Apr 2006 07:41:06 +0000 Received: by xproxy.gmail.com with SMTP id s13so10554wxc for ; Fri, 14 Apr 2006 00:41:04 -0700 (PDT) Received: by 10.70.67.11 with SMTP id p11mr864207wxa; Fri, 14 Apr 2006 00:41:04 -0700 (PDT) Received: by 10.70.125.5 with HTTP; Fri, 14 Apr 2006 00:41:04 -0700 (PDT) Message-ID: <8f2776cb0604140041o63c56c2xa9113d3c4ee259d@mail.gmail.com> Date: Fri, 14 Apr 2006 07:41:00 -0000 From: "Jim Blandy" To: "Frederic RISS" Subject: Re: [RFC] Don't lose compilation directory in Dwarf2 line-tables Cc: "GDB Patches" In-Reply-To: <1144999942.14807.721.camel@crx549.cro.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1144927446.14807.561.camel@crx549.cro.st.com> <8f2776cb0604131049i69e9b20fv78e60c023f245e56@mail.gmail.com> <1144999942.14807.721.camel@crx549.cro.st.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00180.txt.bz2 On 4/14/06, Frederic RISS wrote: > > - Then, at the top of dwarf2_start_subfile, check if dirname is > > relative, and if comp_dir is available, prepend comp_dir to it. At > > this point, we know dirname is as absolute as it can be. Then proceed > > as in the original unpatched code. (Watch out for allocation issues.) > > I don't think we should concat comp_dir and dirname. In my mind, > comp_dir makes only sense as an 'independant' information. Or the other > way around: dirname gives you information about your source tree > structure, and you lose it by prepending comp_dir to it. Have you an > objection to storing "dirname/filename" as filename and comp_dir as > directory? Maybe this makes only sense when dirname is also relative > like in the snippet that Jason posted. Once we agree on this part, I'll > post an updated patch. We agree that, when dirname is absolute, comp_dir shouldn't get used at all. When dirname is relative, I guess we lose information by concatenating it with comp_dir, but I don't see where we would ever use that information. I think the filename passed to start_subfile should be free of leading directory components; I believe this is necessary to make things like "print 'foo.c'::x" work.