This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] make handling of input path vs subfile path consistent
- From: Daniel Jacobowitz <drow at false dot org>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 8 Jan 2008 15:21:56 -0500
- Subject: Re: [RFC] make handling of input path vs subfile path consistent
- References: <e394668d0801051432t34e56abet795972d8cd688fe@mail.gmail.com>
On Sat, Jan 05, 2008 at 02:32:57PM -0800, Doug Evans wrote:
> Hi. There's something I don't understand. Why does start_subfile not
> prepend dirname to name if the latter is not absolute? Since
> name,dirname are added to the subfile list if there isn't a match and
> then will later be used to do matches, it seems like we want to
> prepend dirname to the input name before doing FILENAME_CMP.
>
> Am I missing something?
I could only come up with one case to worry about: what if
subfile->dirname plus subfile->name produces a relative path that
would previously have matched the NAME argument? But dwarf2read.c
always passes the compilation directory (which we assume to be an
absolute path) as the dirname argument, so presumably the result of
combining subfile->dirname and subfile->name will be an absolute path
too.
Your patch is OK.
--
Daniel Jacobowitz
CodeSourcery