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: Better realpath


On Sun, Jun 15, 2008 at 06:18:45AM +0300, Eli Zaretskii wrote:
> > > Alternatively, we could refrain from 
> > > using realpath, in which case we should consistently _not_ require
> > > that the file exists.
> > 
> > ... as I've said, I can modify gdb_realpath to check for file existance,
> > on Windows, which will make the behaviour of gdb_realpath the same
> > everywhere. 
> 
> The question is, what kind of consistent behavior do we want.
> Personally, I think realpath's behavior is wrong for most GDB usages,
> that's why I suggested the alternative.

It seems to me that the thing to do is eliminate gdb_realpath in favor
of lrealpath.  That's supposed to be a portable version of realpath,
so realpath semantics seem like the way to go.

Why do you think realpath's behavior is wrong for GDB?  The only times
we're interested in realpath should be when we have an actual on-disk
file.  If it doesn't exist, its expanded path is not important.

-- 
Daniel Jacobowitz
CodeSourcery


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