delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/03/04/11:51:19

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D0843857C43
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1677948634;
bh=hUOQVPVMWbUUQKW35uS8DLDZwXxcy6DLkdoIMUwnQrY=;
h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=GDvu6c80Lt+pygqxDYAP/kRYcnzWG4TGZGToQA7EeRDm4vXmm34UsNyfl/RYCqQpf
ERcHNYQQaTlLLsqXONTS9djBqg9g7OSVKVBQQAiAP7Q1dYvdK6jbnqB1BAIm8naTl0
rEVXzWo68hGML6tCjOpAZ/Z2Lec+4YQJkNPo87VM=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8E1393858D28
X-Virus-Scanned: Debian amavisd-new at mail.cakelab.org
Message-ID: <56fc361f-fb07-393c-b7df-d07353d70c14@strace.org>
Date: Sat, 4 Mar 2023 17:49:38 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.7.1
To: cygwin AT cygwin DOT com
Subject: cygwin gdb: issue with non-posix style absolute paths
X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Holger Machens via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Holger Machens <homac AT strace DOT org>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

Hello there,



when starting gdb (v10 or higher) with a windows absolute path to an 
executable, it runs into issues with paths in several cases, reporting 
the following error:

BFD: reopening /cygdrive/x/project/bin/X:\project\bin\simple.test.exe: 
No such file or directory

It looks like it does not recognize the windows path as beeing absolute 
and adds the posix-style absolute path to the current working directory 
as prefix. When using a posix-style absolute path to the executable 
instead, everything works normally.



AFFECTED USERS

This is especially an issue for developers using Eclipse CDT as reported 
here:
	https://www.eclipse.org/forums/index.php/t/1105969/
Apparently there was the same issue 13 years ago, but must have been 
fixed in the meantime and reappeared now:
	https://stackoverflow.com/questions/541099/how-to-get-eclipse-to-give-cygwins-gdb-a-posix-path-to-the-executable

I guess this commit might be a possible source of the issue on CDT side:
	https://github.com/eclipse-cdt/cdt/commit/5654112209d440469e40660c946ffdee3daa938f



FILED BUG REPORTS

CDT developers did state, that this is a bug in GDB, as you can read here:
	https://github.com/eclipse-cdt/cdt/issues/228

Consequently, the "bug" was also reported to gdb:
	https://sourceware.org/bugzilla/show_bug.cgi?id=30017


I'm not sure, if this is the correct conclusion. Does gdb actually 
support windows? In other words - does cygwin apply patches or flags to 
gdb to get it to work with cygwin and windows paths?



Thanks in advance
  - homac


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019