From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5554 invoked by alias); 27 Dec 2011 14:12:42 -0000 Received: (qmail 5525 invoked by uid 22791); 27 Dec 2011 14:12:41 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Dec 2011 14:12:26 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 059902BB206; Tue, 27 Dec 2011 09:12:26 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id l0ymRG1dK+Fn; Tue, 27 Dec 2011 09:12:25 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 8A58F2BB205; Tue, 27 Dec 2011 09:12:25 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 83A0D145615; Tue, 27 Dec 2011 06:12:14 -0800 (PST) Date: Tue, 27 Dec 2011 14:35:00 -0000 From: Joel Brobecker To: asmwarrior Cc: gdb-patches@sourceware.org Subject: Re: [RFA/commit] Improve gdb_realpath for Windows hosts Message-ID: <20111227141214.GH23376@adacore.com> References: <1324574084-7971-1-git-send-email-brobecker@adacore.com> <4EF9B94C.7030204@gmail.com> <20111227124009.GG23376@adacore.com> <4EF9D06E.7080008@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EF9D06E.7080008@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2011-12/txt/msg00842.txt.bz2 > Can you explain that why you avoid converting to lowercase? > > > /* The file system is case-insensitive but case-preserving. > > So we do not lowercase the path. Otherwise, we might not > > be able to display the original casing in a given path. */ > > I just thought that lowercase is another canonization of path, so you > can have a uniform path when you set breakpoints(file specification) Two reasons, mostly: . It is unnecessary; . It changes the filename casing when displaying the name of the file where the breakpoint has been inserted. Several Windows users at AdaCore often complain that GNU tools do not properly preserve the filename casing, so I did not think it was proper for us to do so. Even as a Unix user, I do feel that it is important to preserve the casing as well. I should say that it does not affect filename matching, which is performed through another specialized function. > The original code in iberty library is like: Honestly, I do not understand why they do it. There is no correlation, IMO, between the fact that the FS is case-insensitive and the fact that you'd want to change the filename casing (again, doing something extra which is unnecessary, since it does not make a difference to the filesystem). -- Joel