From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23711 invoked by alias); 14 Jun 2008 20:04:05 -0000 Received: (qmail 23701 invoked by uid 22791); 14 Jun 2008 20:04:03 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 14 Jun 2008 20:03:37 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K7byI-0003ku-7S for gdb-patches@sources.redhat.com; Sat, 14 Jun 2008 20:03:34 +0000 Received: from 78.158.192.230 ([78.158.192.230]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jun 2008 20:03:34 +0000 Received: from vladimir by 78.158.192.230 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jun 2008 20:03:34 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: Better realpath Date: Sat, 14 Jun 2008 22:26:00 -0000 Message-ID: References: <200806141024.41812.vladimir@codesourcery.com> <200806141614.07742.vladimir@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.9 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-06/txt/msg00270.txt.bz2 Eli Zaretskii wrote: >> From: Vladimir Prus >> 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? I'm not sure how big deal that is, but it appears we have a major functionality bug for 3 years already, at least. I'm interested in fixing that bug, and if somebody (for example you) find those cosmetic changes important, I think they can be address by follow-up patches. >> 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. If no caller of that function cares about this aspect of behaviour, why should we bother about consistency. But anyway... > 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. - Volodya