This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC PATCH] Finding files in source trees (was Re: Finding source files under Cygwin)
On Mon, Sep 16, 2002 at 01:37:21PM -0700, Earl Chew wrote:
> Christopher Faylor wrote:
> > I'm sorry but it is rarely a good idea to mix functionality like this.
> > You're mixing an (arguable) bug fix with an (arguable) gdb enhancement.
> >
> > Please submit each as a separate patch.
>
> Ok. This patch allows files to be found in source trees.
>
> The motivation for this addition is to accommodate large projects
> where source files are scattered in large source trees. I want to
> be able to point gdb at the root of the source tree, rather than have
> to specify each leaf directory. Thus I can write:
>
> gdb> dir /myproject/source
>
> instead of:
>
> gdb> dir /myproject/source/a/b/c:/myproject/source/z/b/d: etc
This patch needs a lot more testing before I'd be comfortable with it.
We went to a fair amount of trouble to support finding the right file
when multiple files have the same name.
For instance, given:
dir /a:/b
filename foo/bar.c
files /a/bar.c /b/foo/bar.c
will your patch find /b/foo/bar.c? I don't think it will.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer