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: [RFC] make handling of input path vs subfile path consistent


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


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