This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Use substitute-path for filename portion too
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org, dje at google dot com
- Date: Thu, 7 Feb 2008 09:56:58 -0800
- Subject: Re: [rfc] Use substitute-path for filename portion too
- References: <20080207174645.GA19452@caradoc.them.org>
> 2008-02-07 Doug Evans <dje@google.com>
>
> * source.c (find_and_open_source): Always rewrite absolute filenames.
No problem from my end.
> +
> + if (IS_ABSOLUTE_PATH (filename))
> {
> - /* If dirname is NULL, chances are the path is embedded in
> - the filename. Try the source path substitution on it. */
> + /* If filename is absolute path, try the source path
> + substitution on it. */
Do we want to restrict this to filenames that are absolute paths?
Imagine the filename was codesourcery/bar/bar.h and the rewrite was
s/codesourcery/adacore/, do we want to attempt the rewrite then?
I suppose we should wait to see a real example of such a situation
before trying to support it...
--
Joel