First of all, thank for your time!
Also thanks for the explanation, you're right, I was thinking 7.12 was
maintenance release of 7.11 and I understand that isn't the case.
Just for your information, I tried as requested to compile the current
version of gdb (gdb-8.2.50.20180829), just to know the results.
It doesn't compile:
CXX ser-tcp.o
ser-tcp.c:43:21: fatal error: wspiapi.h: No such file or directory
#include <wspiapi.h>
^
compilation terminated.
make[2]: *** [ser-tcp.o] Error 1
I searched this file in my MinGW install but no luck, so I went to
Internet and found something:
https://groups.google.com/forum/#!topic/wx-dev/mquqPOh8fFs
That file doesn't exist on MinGW, but exists on MinGW-w64.
According to the post above, I tried to fix the issue with:
#ifdef __MINGW32__
#include <ws2spi.h>
#else
#include <wspiapi.h>
#endif
But new errors are coming:
CXX ser-tcp.o
ser-tcp.c: In function 'int try_connect(const addrinfo*, unsigned int*)':
ser-tcp.c:171:39: error: invalid use of incomplete type 'const struct
addrinfo'
int sock = gdb_socket_cloexec (ainfo->ai_family, ainfo->ai_socktype,
^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
explicit scoped_free_addrinfo (struct addrinfo *ainfo)
^~~~~~~~
ser-tcp.c:171:57: error: invalid use of incomplete type 'const struct
addrinfo'
int sock = gdb_socket_cloexec (ainfo->ai_family, ainfo->ai_socktype,
^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
explicit scoped_free_addrinfo (struct addrinfo *ainfo)
^~~~~~~~
ser-tcp.c:172:11: error: invalid use of incomplete type 'const struct
addrinfo'
ainfo->ai_protocol);
^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
explicit scoped_free_addrinfo (struct addrinfo *ainfo)
^~~~~~~~
ser-tcp.c:188:27: error: invalid use of incomplete type 'const struct
addrinfo'
if (connect (sock, ainfo->ai_addr, ainfo->ai_addrlen) < 0)
^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
explicit scoped_free_addrinfo (struct addrinfo *ainfo)
^~~~~~~~
ser-tcp.c:188:43: error: invalid use of incomplete type 'const struct
addrinfo'
if (connect (sock, ainfo->ai_addr, ainfo->ai_addrlen) < 0)
^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
explicit scoped_free_addrinfo (struct addrinfo *ainfo)
^~~~~~~~
ser-tcp.c: In function 'int net_open(serial*, const char*)':
ser-tcp.c:283:19: error: aggregate 'addrinfo hint' has incomplete type
and cannot be defined
struct addrinfo hint;
^~~~
ser-tcp.c:300:23: error: 'getaddrinfo' was not declared in this scope
&hint, &ainfo);
^
ser-tcp.c:305:27: error: 'gai_strerror' was not declared in this scope
name, gai_strerror (r));
^
ser-tcp.c:327:68: error: invalid use of incomplete type 'struct addrinfo'
for (struct addrinfo *iter = ainfo; iter != NULL; iter =
iter->ai_next)
^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
explicit scoped_free_addrinfo (struct addrinfo *ainfo)
^~~~~~~~
ser-tcp.c:378:20: error: invalid use of incomplete type 'struct addrinfo'
if (success_ainfo->ai_protocol == IPPROTO_TCP)
^~
In file included from ser-tcp.c:28:0:
./common/netstuff.h:34:41: note: forward declaration of 'struct addrinfo'
explicit scoped_free_addrinfo (struct addrinfo *ainfo)
^~~~~~~~
make[2]: *** [ser-tcp.o] Error 1
So this time, fixing GDB for MinGW is harder than 7.12.1.
Too tired to do that now.
Have a good night,
Mike Laranjeira (SiZiOUS)
Post by Pedro AlvesBut in fact, GDB 7.11.1 is confirmed to work. As this version isn't compiling under MinGW for some reason, I updated to the latest 7.x version, and the only issue I had was this little build problem.
I've not tested GDB now, so I don't know if it's work or not with the Dreamcast.
For the 8.x, I opened a bug about building on MinGW, but seems to be a similar reason.
I think you're confused with GDB's release numbering.
The set of 7.x releases are not all part of a single maintenance "gdb 7"
tree/family. Likewise, set of 8.x releases are not all part of a
single maintenance "gdb 8" tree/family. I.e., 7.12 is not a maintenance
release of 7.11. 7.11 is not a maintenance release of 7.10. etc.
GDB 7.12 was just as much of an increase over 7.11, as 8.0 was over 7.12.
It just happened that when we got all the way up to "12" we though that
that would be a good time to roll over to 8.0, because small numbers are
nice.
Maintenance bugfix releases are instead the z in x.y.z, as in
7.11.1, 7.11.2, etc.
Currently, we're about to release gdb 8.2, so the 8.2.x branch
in git is open for regression bugfixes. Build fixes like yours
would be a good fit too. It's possible to merge fixes to older
branches, but it's not very usual. As we move on to newer
releases, the older branches tend to become unmaintained.
Thanks,
Pedro Alves