This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add IPv6 support for remote TCP connections
- From: Paul Fertser <fercerpav at gmail dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Eli Zaretskii <eliz at gnu dot org>, gdb-patches at sourceware dot org, ktietz at redhat dot com
- Date: Sun, 9 Feb 2014 21:08:21 +0400
- Subject: Re: [PATCH] Add IPv6 support for remote TCP connections
- Authentication-results: sourceware.org; auth=none
- References: <1391878435-19340-1-git-send-email-fercerpav at gmail dot com> <20140209083056 dot GA32481 at host2 dot jankratochvil dot net> <20140209095308 dot GH2320 at home dot lan> <20140209130501 dot GA15183 at host2 dot jankratochvil dot net> <83k3d4utwr dot fsf at gnu dot org> <20140209164748 dot GA25629 at host2 dot jankratochvil dot net>
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