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: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Paul Fertser <fercerpav at gmail dot com>
- Cc: gdb-patches at sourceware dot org, Kai Tietz <ktietz at redhat dot com>
- Date: Sun, 9 Feb 2014 09:30:56 +0100
- 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>
On Sat, 08 Feb 2014 17:53:55 +0100, Paul Fertser wrote:
> This patch implements target host lookup the modern way,
> see ``man 3 getaddrinfo'' for details; as a result, both IPv4 and IPv6
> are transparently supported.
Such patch is pending around since ~2006
https://bugzilla.redhat.com/show_bug.cgi?id=198365#c1
and currently a different patch is on
jankratochvil/ipv6
git://sourceware.org/git/archer.git
It should also implement IPv6 in gdbserver (which you may not need).
The problem is that MinGW (=MS-Windows) port does not have getaddrinfo, there
are multiple way how to deal with it, the most clean should be via extending
gdb/gnulib/ :
------------------------------------------------------------------------------
I was trying to fix it myself but I found out one needs to know mingw/cygwin
more than I do. More the chat below, about current GDB #ifdefs for MS-Windows
vs. probably the preferred way of using gdb/gnulib/ . For IPv6 mingw build
I found I need to add these modules to gdb/gnulib/update-gnulib.sh :
IMPORTED_GNULIB_MODULES="$IMPORTED_GNULIB_MODULES getaddrinfo inet_pton accept"
IMPORTED_GNULIB_MODULES="$IMPORTED_GNULIB_MODULES bind getsockname listen recv"
IMPORTED_GNULIB_MODULES="$IMPORTED_GNULIB_MODULES send setsockopt socket close"
IMPORTED_GNULIB_MODULES="$IMPORTED_GNULIB_MODULES sys_select select getsockopt"
IMPORTED_GNULIB_MODULES="$IMPORTED_GNULIB_MODULES gettimeofday connect"
(the initial few modules are required by the IPv6 patch, all the remaining
ones came in as some dependencies IIRC)
But then mingw build fails. I tried to fix it in archer/jankratochvil/ipv6
( git://sourceware.org/git/archer.git ) but I got lost in what is the right way
so I guess you should do it from scratch on your own. I tried it more
a quick&dirty way but it probably needs a more clean thorough rework IMO.
------------------------------------------------------------------------------
So due to buggy MinGW normal OSes still can't use IPv6 after 7 years while IPv4
even no longer exists on some networks.
Jan