From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward500b.mail.yandex.net (forward500b.mail.yandex.net [IPv6:2a02:6b8:c02:900:1:45:d181:d500]) by sourceware.org (Postfix) with ESMTPS id 959653858D28 for ; Sat, 4 Mar 2023 17:20:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 959653858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yandex.ru Received: from myt6-265321db07ea.qloud-c.yandex.net (myt6-265321db07ea.qloud-c.yandex.net [IPv6:2a02:6b8:c12:2626:0:640:2653:21db]) by forward500b.mail.yandex.net (Yandex) with ESMTP id 0A81D5ED12; Sat, 4 Mar 2023 20:20:01 +0300 (MSK) Received: by myt6-265321db07ea.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id 0KcXpWKdYKo1-Xoulf7me; Sat, 04 Mar 2023 20:20:00 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1677950400; bh=gzn3n7jZu2BJHxuwBHA4Mch07WEtQiNz6DO8TL5IfZA=; h=In-Reply-To:Subject:Date:References:To:Message-ID:Reply-To:From; b=tvLoll0GDAn55sXQ/oxTAoHBMwuskIjwarjmYBb1CD2i9bAnwSrcSrbH3mm7z378I O+SjWp2S8vHlxllX2Mbht38/p1opkshIhcOW6oi72Uf1dJhPUn4OjPRlVKeHh/VhG3 zz4evyrEnnZuEVN6mGuu0rrZfbDyy6/u9xVhgYm4= Authentication-Results: myt6-265321db07ea.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Sat, 04 Mar 2023 17:17:33 -0000 Date: Sat, 4 Mar 2023 20:17:33 +0300 From: Andrey Repin X-Mailer: The Bat! (v9.3.4) Professional Reply-To: cygwin@cygwin.com Message-ID: <846091478.20230304201733@yandex.ru> To: Holger Machens , cygwin@cygwin.com Subject: Re: cygwin gdb: issue with non-posix style absolute paths In-Reply-To: <56fc361f-fb07-393c-b7df-d07353d70c14@strace.org> References: <56fc361f-fb07-393c-b7df-d07353d70c14@strace.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_THEBAT,NICE_REPLY_A,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 List-Id: Greetings, Holger Machens! > 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. While in many cases, Cygwin executable may work with Windows paths OOTB, this kind of interoperability is not guaranteed or even promised. Cygwin is "a kind of POSIX" and expectation is that it works with POSIX paths. > 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? -- With best regards, Andrey Repin Saturday, March 4, 2023 20:14:54 Sorry for my terrible english...