cygwin gdb: issue with non-posix style absolute paths
Sat Mar 4 17:17:33 GMT 2023
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:
> Apparently there was the same issue 13 years ago, but must have been fixed in the meantime and reappeared now:
> I guess this commit might be a possible source of the issue on CDT side:
> FILED BUG REPORTS
> CDT developers did state, that this is a bug in GDB, as you can read here:
> Consequently, the "bug" was also reported to gdb:
> 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,
Saturday, March 4, 2023 20:14:54
Sorry for my terrible english...
More information about the Cygwin