[PATCH] gdb: recognize 64 bits Windows executables as Cygwin osabi

Eli Zaretskii eliz@gnu.org
Sat Mar 7 17:45:34 GMT 2020


> Cc: gdb-patches@sourceware.org
> From: Simon Marchi <simon.marchi@efficios.com>
> Date: Sat, 7 Mar 2020 11:51:08 -0500
> 
>   https://sourceware.org/ml/gdb-patches/2020-03/msg00151.html
> 
> Currently, loading the 64-bits .exe in a GNU/Linux-hosted GDB ends up calling
> the svr4 libraries code, which is plain wrong.  By using the Cygwin osabi,
> at least the right shared libraries functions are used.
> 
> I agree with what you suggest below, but I think that the current patch is
> still a step forward and improves things.

I agree.  I just think we can do better.

> So what we can do is add an "MS-Windows" osabi and make "Cygwin" and
> "MS-Windows" functionally equivalent.  Any "pei-i386" or "pei-x86-64"
> executable would be detected as "MS-Windows".

That's fine with me, and IMO will be more accurate than calling them
all "Cygwin", since Cygwin programs are just a peculiar kind of
Windows executables.

> If we do such a change, I would like it to be done on top of the current
> patch, as to not mix concerns.

I'm okay with that, thanks.



More information about the Gdb-patches mailing list