[PATCH] Add IPv6 support for remote TCP connections

Paul Fertser fercerpav@gmail.com
Sun Feb 9 17:08:00 GMT 2014


On Sun, Feb 09, 2014 at 05:47:48PM +0100, Jan Kratochvil wrote:
> On Sun, 09 Feb 2014 17:34:28 +0100, Eli Zaretskii wrote:
> > Did you include ws2tcpip.h?  That's the header where getaddrinfo and
> > all that is needed to use it are declared, per the MSDN documentation:
> > 
> >   http://msdn.microsoft.com/en-us/library/windows/desktop/ms738520%28v=vs.85%29.aspx
> 
> The patch with <ws2tcpip.h> really builds OK on Fedora mingw64.

I'm testing exactly that right atm and came to the same conclusion.

> I did not expect the function may be missing just due to a non-standard header
> file.

But gnulib docs say "This function is missing on some platforms: HP-UX
11.11, IRIX 6.5, OSF/1 5.1, Solaris 7, Cygwin 1.5.x, mingw, MSVC 9,
Interix 3.5, BeOS", is it really ok this way?

> OK, we can now go with the patch and merge in gdbserver bits from my patch.

I tested my patch against OpenOCD locally and it seems to behave as
expected, but I admit that's not a really thorough testing.

Another point: configure.ac should probably check for getaddrinfo in
"nsl" and "socket" as Solaris docs say both libs are required for it.

Regarding gdbserver mods, I didn't test it at all but from a cursory
look at the source code it feels like the user can't specify if an
ipv4 or ipv6 socket should be used? And that only a single socket is
bound, so if ipv6 is available, it'll bind to ipv6 and if the
particular system doesn't map ipv4 address space to ipv6 (such as
OpenBSD) then it wouldn't be possible to make gdbserver accessible on
legacy ipv4 at all? Sorry if I'm missing something obvious here, just
wanted to make sure it's all covered.

Do you want me to send any updates to this patch or will you handle it
yourself now?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav@gmail.com



More information about the Gdb-patches mailing list