From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4069 invoked by alias); 27 Dec 2011 14:00:32 -0000 Received: (qmail 4060 invoked by uid 22791); 27 Dec 2011 14:00:31 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_DB X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Dec 2011 14:00:18 +0000 Received: by iacb35 with SMTP id b35so21971774iac.0 for ; Tue, 27 Dec 2011 06:00:17 -0800 (PST) Received: by 10.50.195.164 with SMTP id if4mr31167706igc.11.1324994417752; Tue, 27 Dec 2011 06:00:17 -0800 (PST) Received: from [192.168.1.103] ([218.109.117.104]) by mx.google.com with ESMTPS id z22sm90380226ibg.5.2011.12.27.06.00.14 (version=SSLv3 cipher=OTHER); Tue, 27 Dec 2011 06:00:16 -0800 (PST) Message-ID: <4EF9D06E.7080008@gmail.com> Date: Tue, 27 Dec 2011 14:12:00 -0000 From: asmwarrior User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sourceware.org Subject: Re: [RFA/commit] Improve gdb_realpath for Windows hosts References: <1324574084-7971-1-git-send-email-brobecker@adacore.com> <4EF9B94C.7030204@gmail.com> <20111227124009.GG23376@adacore.com> In-Reply-To: <20111227124009.GG23376@adacore.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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/msg00841.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) The original code in iberty library is like: > /* The MS Windows method. If we don't have realpath, we assume we > don't have symlinks and just canonicalize to a Windows absolute > path. GetFullPath converts ../ and ./ in relative paths to > absolute paths, filling in current drive if one is not given > or using the current directory of a specified drive (eg, "E:foo"). > It also converts all forward slashes to back slashes. */ > #if defined (_WIN32) > { > char buf[MAX_PATH]; > char* basename; > DWORD len = GetFullPathName (filename, MAX_PATH, buf, &basename); > if (len == 0 || len > MAX_PATH - 1) > return xstrdup (filename); > else > { > /* The file system is case-preserving but case-insensitive, > Canonicalize to lowercase, using the codepage associated > with the process locale. */ > CharLowerBuff (buf, len); > return xstrdup (buf); > } > } > #endif Thanks. asmwarrior ollydbg from codeblocks' forum