From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25141 invoked by alias); 9 Apr 2008 13:49:42 -0000 Received: (qmail 25128 invoked by uid 22791); 9 Apr 2008 13:49:41 -0000 X-Spam-Check-By: sourceware.org Received: from qnxmail.qnx.com (HELO nimbus.ott.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 Apr 2008 13:49:09 +0000 Received: by nimbus.ott.qnx.com with Internet Mail Service (5.5.2653.19) id <2FVR8HG5>; Wed, 9 Apr 2008 09:49:06 -0400 Message-ID: <47FCC953.8060008@qnx.com> From: Aleksandar Ristovski To: Doug Evans Cc: GDB Patches Subject: Re: [RFA] patch for DW_AT_comp_dir/DW_AT_name vs .debug_line inco nsistencies Date: Wed, 09 Apr 2008 14:55:00 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) user-agent: Content-Type: text/plain; charset="iso-8859-1" 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/msg00163.txt.bz2 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. --- Aleksandar Ristovski QNX Software Systems