From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Pedro Alves'" <pedro@codesourcery.com>
Cc: <gdb-patches@sourceware.org>
Subject: [RFA] Use winsock2 for mingw gdbserver
Date: Sat, 17 Apr 2010 05:39:00 -0000 [thread overview]
Message-ID: <001c01caddf0$63952a10$2abf7e30$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <201004161815.36864.pedro@codesourcery.com>
I implement this as a separate patch:
I just tested compilation with msys/mingw system.
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Pedro Alves
> Envoyé : Friday, April 16, 2010 7:16 PM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFC] Mingw Windows 64-bit gdbserver
>
> On Friday 16 April 2010 17:38:28, Pierre Muller wrote:
> > GDb sources is still a mix:
> >
> > > Typo: I meant winsock2.h instead of winsock.h.
> >
> > $ grep "include.*<winso" *.h gdbserver/*.h *.c gdbserver/*.c
> > gdb_select.h:#include <winsock2.h>
> > serial.h:#include <winsock2.h>
> > m32r-rom.c:#include <winsock.h>
> > remote-m32r-sdi.c:#include <winsock.h>
> > ser-base.c:#include <winsock2.h>
> > ser-tcp.c:#include <winsock2.h>
> > gdbserver/gdbreplay.c:#include <winsock.h>
> > gdbserver/remote-utils.c:#include <winsock.h>
> >
> > should all be moved to winsock2.h?
>
> Probably not a real problem as we only activate
> Winsock 1:
>
> gdb/
> >grep WSAStart *.c -rn
> m32r-rom.c:451: if (WSAStartup (MAKEWORD (1, 1), &wd))
> ser-mingw.c:1255: if (WSAStartup (MAKEWORD (1, 0), &wsa_data) != 0)
>
> gdb/gdbserver/
> >grep WSAStart *.c -rn
> gdbreplay.c:207: WSAStartup (MAKEWORD (1, 0), &wsad);
> remote-utils.c:288: WSAStartup (MAKEWORD (1, 0), &wsad);
>
> Presumably winsock2.h is a superset of winsock.h and so we're
> likely fine. Wouldn't hurt to be consistent, moreso since we
> include winsock2.h in some headers.
>
> > and -lws2_32 as library?
>
> You mean in gdbserver? Shouldn't hurt, yeah.
Here you are:
is this OK?
Once again, its the formatting of the
ChangeLog that seems the most uncertain to me...
Pierre
gdbserver ChangeLog entry:
2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
* configure.ac: Use `ws2_32' library for srv_mingw.
* configure: Regenerate.
* gdbreplay.c: Use winsock2 header instead of winsock for mingw.
* remote-utils.c: Likewise.
Index: configure
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/configure,v
retrieving revision 1.47
diff -u -p -r1.47 configure
--- configure 16 Apr 2010 16:22:15 -0000 1.47
+++ configure 17 Apr 2010 05:25:59 -0000
@@ -4056,7 +4056,7 @@ esac
if test "${srv_mingwce}" = "yes"; then
LIBS="$LIBS -lws2"
elif test "${srv_mingw}" = "yes"; then
- LIBS="$LIBS -lwsock32"
+ LIBS="$LIBS -lws2_32"
elif test "${srv_qnx}" = "yes"; then
LIBS="$LIBS -lsocket"
fi
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/configure.ac,v
retrieving revision 1.33
diff -u -p -r1.33 configure.ac
--- configure.ac 23 Feb 2010 19:16:16 -0000 1.33
+++ configure.ac 17 Apr 2010 05:25:59 -0000
@@ -118,7 +118,7 @@ esac
if test "${srv_mingwce}" = "yes"; then
LIBS="$LIBS -lws2"
elif test "${srv_mingw}" = "yes"; then
- LIBS="$LIBS -lwsock32"
+ LIBS="$LIBS -lws2_32"
elif test "${srv_qnx}" = "yes"; then
LIBS="$LIBS -lsocket"
fi
Index: gdbreplay.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/gdbreplay.c,v
retrieving revision 1.24
diff -u -p -r1.24 gdbreplay.c
--- gdbreplay.c 1 Jan 2010 07:31:49 -0000 1.24
+++ gdbreplay.c 17 Apr 2010 05:25:59 -0000
@@ -59,7 +59,7 @@
#endif
#if USE_WIN32API
-#include <winsock.h>
+#include <winsock2.h>
#endif
#ifndef HAVE_SOCKLEN_T
Index: remote-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/remote-utils.c,v
retrieving revision 1.72
diff -u -p -r1.72 remote-utils.c
--- remote-utils.c 11 Apr 2010 16:33:56 -0000 1.72
+++ remote-utils.c 17 Apr 2010 05:25:59 -0000
@@ -63,7 +63,7 @@
#endif
#if USE_WIN32API
-#include <winsock.h>
+#include <winsock2.h>
#endif
#if __QNX__
next prev parent reply other threads:[~2010-04-17 5:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 15:32 [RFC] Mingw Windows 64-bit gdbserver Pierre Muller
2010-04-16 15:59 ` Pedro Alves
2010-04-16 16:20 ` Pierre Muller
2010-04-16 16:27 ` Pedro Alves
2010-04-16 16:38 ` Pierre Muller
2010-04-16 17:15 ` Pedro Alves
2010-04-17 5:39 ` Pierre Muller [this message]
2010-04-17 8:28 ` [RFA] Use winsock2 for mingw gdbserver Pedro Alves
2010-04-17 20:44 ` Pierre Muller
2010-04-17 5:40 ` [RFC] Mingw Windows 64-bit gdbserver Pierre Muller
2010-04-17 10:58 ` Pedro Alves
2010-04-17 23:18 ` [RFC-v2] " Pierre Muller
2010-04-17 23:46 ` Pedro Alves
2010-04-19 6:37 ` [RFA] Prepare for " Pierre Muller
[not found] ` <6200558430975530197@unknownmsgid>
2010-04-19 13:56 ` H.J. Lu
2010-04-19 14:13 ` Pierre Muller
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='001c01caddf0$63952a10$2abf7e30$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
/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