From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8419 invoked by alias); 9 Apr 2008 18:04:35 -0000 Received: (qmail 8410 invoked by uid 22791); 9 Apr 2008 18:04:34 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 Apr 2008 18:04:07 +0000 Received: from zps75.corp.google.com (zps75.corp.google.com [172.25.146.75]) by smtp-out.google.com with ESMTP id m39I3xSR018622 for ; Wed, 9 Apr 2008 19:03:59 +0100 Received: from wa-out-1112.google.com (wafm38.prod.google.com [10.114.189.38]) by zps75.corp.google.com with ESMTP id m39I3wY8013465 for ; Wed, 9 Apr 2008 11:03:58 -0700 Received: by wa-out-1112.google.com with SMTP id m38so2101906waf.16 for ; Wed, 09 Apr 2008 11:03:58 -0700 (PDT) Received: by 10.114.47.10 with SMTP id u10mr348342wau.191.1207764237851; Wed, 09 Apr 2008 11:03:57 -0700 (PDT) Received: by 10.115.107.18 with HTTP; Wed, 9 Apr 2008 11:03:57 -0700 (PDT) Message-ID: Date: Wed, 09 Apr 2008 20:52:00 -0000 From: "Doug Evans" To: "Aleksandar Ristovski" Subject: Re: [RFA] patch for DW_AT_comp_dir/DW_AT_name vs .debug_line inco nsistencies Cc: "GDB Patches" In-Reply-To: <47FCC953.8060008@qnx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47FCC953.8060008@qnx.com> 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: 2008-04/txt/msg00174.txt.bz2 On Wed, Apr 9, 2008 at 6:49 AM, Aleksandar Ristovski wrote: > > Doug Evans wrote: > > On Mon, Apr 7, 2008 at 10:41 PM, Doug Evans wrote: > >> I have an occasion to revisit this: > >> http://sourceware.org/ml/gdb-patches/2007-11/msg00314.html > >> > >> Or in a different form: > >> http://sourceware.org/ml/gdb-patches/2008-01/msg00103.html > >> > >> When we last left our story, watching for a single path mismatch of > >> the main source file only seemed ok. That's what this patch does. > >> It's just a minor revision of > >> http://sourceware.org/ml/gdb-patches/2008-01/msg00103.html > > > > While reading end_symtab I was inspired to try again for a > > debug-format independent solution. > > > > > Haven't tested, just thinking: Will it work in this case: > > Let's imagine we have two files > /.../foo/bar.c > /.../foo/baz/bar.c > > First file goes something like this: > .. > #include "baz/bar.c" > ... > > In that case we will have lbasename(mainsub->name) == "bar.c" > and (strcmp (lbasename (subfile->name), mainbase) == 0) (since lbasename > ("/../foo/baz/bar.c" == "bar.c") > > So if I am not mistaken, you would have nr_matches == 1 which would lead to > losing info about one of the files. In the case where /.../foo/bar.c doesn't contain anything that would require line number info itself (e.g. all it does is #include "/.../foo/baz/bar.c") then yes information will be lost, but in this case there's not much information to lose ...