This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] patch for DW_AT_comp_dir/DW_AT_name vs .debug_line inco nsistencies


Doug Evans wrote:
> On Mon, Apr 7, 2008 at 10:41 PM, Doug Evans <dje@google.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]