From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24884 invoked by alias); 13 Oct 2009 10:57:36 -0000 Received: (qmail 24874 invoked by uid 22791); 13 Oct 2009 10:57:35 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Oct 2009 10:57:31 +0000 Received: (qmail 4927 invoked from network); 13 Oct 2009 10:57:28 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 13 Oct 2009 10:57:28 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: shared lib dos filename style - one more question Date: Tue, 13 Oct 2009 10:57:00 -0000 User-Agent: KMail/1.9.10 Cc: Joel Brobecker , Eli Zaretskii , danny.backx@scarlet.be, drow@false.org References: <1253973110.10921.76.camel@pavilion> <83ococicct.fsf@gnu.org> <20091013052437.GJ5272@adacore.com> In-Reply-To: <20091013052437.GJ5272@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200910131157.25180.pedro@codesourcery.com> 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: 2009-10/txt/msg00267.txt.bz2 On Tuesday 13 October 2009 06:24:37, Joel Brobecker wrote: >=20 > > If unixify is supposed to support Windows file semantics, then the > > last 2 cases are incorrect, IMO. =A04 should return "c:." and 5 > > "c:/path/to/a". >=20 > Actually, I think in this case "unixify" would mean trying to make > sense out of Windows path on a Unix machine: The target sent us > c:\path\to\dll, and we're trying to find that dll on the host. > So best guess on the host is probably /path/to/dll. =A0After that, > we should be able to use the root prefix setting, if necessary, > in order to find the file on the host. >=20 That leaves out drives other than "c:", unlike Eli's version. Do we always want to discard that possibility? If the "c:/" isn't there, then at least a "c/" could be, so that you can still map a "d:" using directories or symlinks on the host, something like this: /sysroot/c/path/to/a /sysroot/d/path/to/b Leaving the ':' in: /sysroot/c:/path/to/a /sysroot/d:/path/to/b The former, without ':' allows using the same sysroot on a Windows host, since I don't think you can create directories with ':' there. ( Wine maps a "sysroot" similarly: ls -als .wine/dosdevices/ c: -> ../harddiskvolume1 d: -> ../harddiskvolume2 z: -> / Look, a file named 'c:' on a unix box! Okay, this case doesn't really count. :-) ) Worth considering, IMHO, perhaps as an optional mode, similar (or exactly like) to Daniel's tri-state setting suggestion. --=20 Pedro Alves