Building today's snapshot of GDB with MinGW

Eli Zaretskii eliz@gnu.org
Tue Jun 30 16:18:38 GMT 2020


> Date: Mon, 29 Jun 2020 21:27:32 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> At Joel's request I've built today's (29 June) snapshot of GDB using
> mingw.org's MinGW and GCC 9.2.0.  There are a few issues I bumped into
> related to Gnulib and MinGW runtime (which I recently upgraded to a
> newer version), and I'm still working on those.  So what's below is an
> interim report of issues related to GDB itself:

More information:

Two issues I reported to Gnulib were fixed:

  https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00068.html
  https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00069.html

So I hope we could update from Gnulib before the GDB 10 branch is cut.

Another problem is specific to the MinGW headers, and was also fixed:

  https://osdn.net/projects/mingw/lists/archive/users/2020-June/000543.html

Yet another problem, which I'm not yet sure whether it's specific to
MinGW or to Windows XP, is still unfolding:

  https://osdn.net/projects/mingw/lists/archive/users/2020-June/000541.html

It currently makes me unable to run the built GDB on Windows XP, but I
can run it on newer versions of Windows.  So this is not a blocking
problem.

Last, but not least: the test we do in gdbserver/configure for the
socklen_t data type declaration doesn't work on Windows.  We do this:

  AC_CHECK_TYPES(socklen_t, [], [],
  [#include <sys/types.h>
  #include <sys/socket.h>
  ])

But on Windows this fails, because sys/socket.h doesn't exist;
instead, socklen_t is supposed to be defined in ws2tcpip.h.  So the
correct headers inclusion for the test program would be

  #include <sys/types.h>
  #if HAVE_SYS_SOCKET_H
  # include <sys/socket.h>
  #elif HAVE_WS2TCPIP_H
  # include <ws2tcpip.h>

Can we please fix this minor issue?

Thanks.


More information about the Gdb-patches mailing list