This is the mail archive of the gdb@sources.redhat.com 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: handling of absolute source file paths (feature wish/implementation idea)


On Thu, Jan 22, 2004 at 04:39:01PM +0100, Gernot Hillier wrote:
> Hi!
> 
> Am Donnerstag, 22. Januar 2004 16:07 schrieb Daniel Jacobowitz:
> > On Thu, Jan 22, 2004 at 04:01:14PM +0100, Gernot Hillier wrote:
> > > Revision 1.39, Mon Jan 13 20:11:47 2003 UTC by drow
> > > * source.c (openp): If the file does not exist don't necessarily
> > >   search the path.
> > >
> > > 1. Reverting the change in the mainline as we did. I currently can see no
> > > real reason why this change was made but I think there was a reason. So I
> > > assume you won't like it, do you?
> >
> > I recommend you read the list archives to see why the change was made.
> >
> > You'd have found this:
> > > Sometime last April, when Joel committed a patch to not try to open
> > > directories as programs, we started always searching the given path in
> > > openp ().  Try it:
> > > % gdb ./ls
> > > will open /bin/ls if there is no ls in the current directory.
> 
> Sorry, I tried to search in the gdb archives for some keywords but the web 
> search was terribly slow and so I gave up after three tries or so. But yes, I 
> should've done it... :-}

May want to use google instead.  Even simpler, look at the gdb-patches
archive for that particular month, and then search for relevant
subjects that day or the day before.

> > > 3. Implement a new setting "source-absolute-prefix" (analog to the
> > > already existing "solib-absolute-prefix") which allows the user to set a
> > > prefix for given absolute source code paths.
> >
> > I think this is a good idea, but let's see if anyone else has an
> > opinion.
> 
> And what about idea 2 (using the already given pathes, not using another 
> list)? This would be much less work to implement ;-) Let's say an additional 
> parameter of openp which is only set by open_source_file() and only if 
> "source-absolute-search-mode" is enabled or so...

Actually, source-absolute-prefix would not be too hard; it would be
just about parallel to the existing implementation of
solib-absolute-prefix.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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