public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@yandex.ru>
To: Holger Machens <homac@strace.org>, cygwin@cygwin.com
Subject: Re: cygwin gdb: issue with non-posix style absolute paths
Date: Sat, 4 Mar 2023 20:17:33 +0300	[thread overview]
Message-ID: <846091478.20230304201733@yandex.ru> (raw)
In-Reply-To: <56fc361f-fb07-393c-b7df-d07353d70c14@strace.org>

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...


      reply	other threads:[~2023-03-04 17:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-04 16:49 Holger Machens
2023-03-04 17:17 ` Andrey Repin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=846091478.20230304201733@yandex.ru \
    --to=anrdaemon@yandex.ru \
    --cc=cygwin@cygwin.com \
    --cc=homac@strace.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).