[PATCH] testsuite: use cygpath to convert from Unix to Windows paths

Christian Biesinger cbiesinger@google.com
Fri Mar 13 18:14:40 GMT 2020


On Fri, Mar 13, 2020 at 12:57 PM Tom Tromey <tom@tromey.com> wrote:
>
> >> Right, using "pwd -W" was exactly what I wanted to propose for this
> >> purpose.
>
> Simon> Ok thanks, I have pushed this version of the patch.
>
> Today I tried something a little weird -- I did a mingw build on Linux
> and then tried to run the gdb.server test cases.  Linux can run mingw
> executables via wine...
>
> However this fails with:
>
>     ERROR: tcl error sourcing /home/tromey/gdb/build-mingw/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.server/wrapper.exp.
>     ERROR: sh: line 0: pwd: -W: invalid option
>     pwd: usage: pwd [-LP]
>
> My site.exp says:
>
>     set host_triplet i686-w64-mingw32
>     set target_alias i686-w64-mingw32
>     set target_triplet i686-w64-mingw32
>     set build_triplet x86_64-pc-linux-gnu
>
> I guess maybe this is expected, I wonder if there's a clean way to fix
> the problem.  Christian suggested maybe we could have a wine board file
> to work around it.  Or maybe we could check build_triplet?  I'm not sure
> if that would be incorrect in some case.

Just to clarify... it is not enough to just bypass that call for wine.
You do need to convert the linux path to a Windows path, or GDB will
not be able to load the file. So since that translation has to be done
by the testrunner, it has to be aware that you're running GDB under
Wine.

It looks like by default, Z:\ is mapped to /, so /foo should become Z:/foo.

Christian


More information about the Gdb-patches mailing list