From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98123 invoked by alias); 21 Apr 2019 12:06:10 -0000 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 Received: (qmail 98115 invoked by uid 89); 21 Apr 2019 12:06:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=afaiu, UD:debug, AFAIU, dropping X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 21 Apr 2019 12:06:08 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIBEU-0002nR-NY for gdb-patches@sourceware.org; Sun, 21 Apr 2019 08:06:06 -0400 Received: from [176.228.60.248] (port=1362 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hIBET-0006sK-PL for gdb-patches@sourceware.org; Sun, 21 Apr 2019 08:06:06 -0400 Date: Sun, 21 Apr 2019 12:06:00 -0000 Message-Id: <831s1va7h8.fsf@gnu.org> From: Eli Zaretskii To: gdb-patches@sourceware.org In-reply-to: <8336mfdumf.fsf@gnu.org> (message from Eli Zaretskii on Thu, 18 Apr 2019 21:40:56 +0300) Subject: Re: Fix lookup of separate debug file on MS-Windows References: <83ef5ze84y.fsf@gnu.org> <03da9895-5136-1da6-8c37-c4be0d06b608@gmail.com> <8336mfdumf.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00405.txt.bz2 Ping! Would people please voice their opinions regarding preservation of the drive letter (and removing the colon) vs just dropping the drive letter altogether? I'd like to fix this issue for the upcoming release of GDB 8.3. > Date: Thu, 18 Apr 2019 21:40:56 +0300 > From: Eli Zaretskii > CC: gdb-patches@sourceware.org > > > From: LRN > > Date: Thu, 18 Apr 2019 19:19:39 +0300 > > > > While this is *a* fix, the result, AFAIU is: > > > > d:/usr/lib/debug/usr/bin/foo.debug > > > > This is a functional filename, but is it correct? > > It fits the documentation, so yes. > > > 1) Drive letters are lost (meaning that you can't have two paths with equal > > names on two different drives be mapped to different debug tree paths - they > > only differ in the drive letter, and you make that letter disappear) > > > > A more correct way to fix this is to replace 'X:/' with 'X/'. > > We could do that, but it will need a documentation change. I think > it's overkill, as the chances of the binaries and the debug directory > to be on different drives are nil, but if others prefer to convert X:/ > to X/, I'm fine with that. > > > 2) This doesn't take runtime tree location into account. Your debug tree has to > > reflect the absolute, Windows path to the binary (since you're not doing any > > other adjustments, and since gdb gives you an asbolute, Windows path to begin > > with), otherwise gdb won't find the debug files. > > I.e. in the 'c:/some/directory/mingw/lib/debug/some/directory/mingw/bin/foo' > > example above the second '/some/directory' is clearly incidental, as the user > > just used that as a root of an installation. > > It is as "incidental" as the same situation of Posix platforms, where > we simply splice the two directories. > > > The package maintainer can't know where the binaries will end up, > > and can only predict the '/mingw/bin/foo' part. > > Package maintainers shouldn't use global debug directories, because > for starters such directories might not exist at all, and even if they > do, their location cannot be predicted in advance. Package > maintainers should instead use the .debug subdirectory of where they > put the binaries, that arrangement already works, and is predictable. > > > I.e. the path that gdb should look for should be: > > > > c:/some/directory/mingw/lib/debug/mingw/bin/foo > > > > or > > > > c:/some/directory/mingw/lib/debug/bin/foo > > This would deviate from what we do on Unix, so I'm opposed to it. > Unless we also change the Unix behavior, of course. >