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


> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Sat, 14 Jun 2008 16:14:07 +0400
> Cc: gdb-patches@sources.redhat.com
> 
> Speaking of the issues you've raised in:
> 
> 	http://sourceware.org/ml/gdb-patches/2005-05/msg00612.html
> 
> I think that:
> 
> 1. The order of slashes is a cosmetic issue.
> 2. The case of filenames is also a cosmetic issues.

Would it surprise you that I disagree?

Fixing those is not a big deal, so how about making gdb_realpath
correct both cosmetically and behavior-wise?

> 3. The matter of filename existance is a behaviour issue, and I think
> I can modify gdb_realpath to perform a check explicitly. OTOH, it's not
> clear if any code actually expects file existane check to be performed.

I don't think it matters whether the callers expect it or not.  As
long as we use realpath, which always checks the result for existence,
we should do the same in the other branches, so that the resulting GDB
function behaves consistently.  Alternatively, we could refrain from
using realpath, in which case we should consistently _not_ require
that the file exists.


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