This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Implement IPv6 support for GDB/gdbserver
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org, palves at redhat dot com, jan dot kratochvil at redhat dot com, fercerpav at gmail dot com, sekiriki at gmail dot com
- Date: Wed, 23 May 2018 19:40:06 -0400
- Subject: Re: [PATCH] Implement IPv6 support for GDB/gdbserver
- References: <20180523185719.22832-1-sergiodj@redhat.com> <8336yich5s.fsf@gnu.org>
On Wednesday, May 23 2018, Eli Zaretskii wrote:
>> From: Sergio Durigan Junior <sergiodj@redhat.com>
>> Cc: Pedro Alves <palves@redhat.com>,
>> Eli Zaretskii <eliz@gnu.org>,
>> Jan Kratochvil <jan.kratochvil@redhat.com>,
>> Paul Fertser <fercerpav@gmail.com>,
>> Tsutomu Seki <sekiriki@gmail.com>,
>> Sergio Durigan Junior <sergiodj@redhat.com>
>> Date: Wed, 23 May 2018 14:57:19 -0400
>>
>> gdb/ChangeLog:
>> yyyy-mm-dd Sergio Durigan Junior <sergiodj@redhat.com>
>> Jan Kratochvil <jan.kratochvil@redhat.com>
>> Paul Fertser <fercerpav@gmail.com>
>> Tsutomu Seki <sekiriki@gmail.com>
>>
>> * Makefile.in (COMMON_SFILES): Add 'common/netstuff.c'.
>> (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
>> * NEWS (Changes since GDB 8.1): Mention IPv6 support.
>> * common/netstuff.c: New file.
>> * common/netstuff.h: New file.
>> * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
>> (net_open): Handle IPv6-style hostnames; implement support for
>> IPv6 connections.
>>
>> gdb/gdbserver/ChangeLog:
>> yyyy-mm-dd Sergio Durigan Junior <sergiodj@redhat.com>
>> Jan Kratochvil <jan.kratochvil@redhat.com>
>> Paul Fertser <fercerpav@gmail.com>
>> Tsutomu Seki <sekiriki@gmail.com>
>>
>> * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
>> (OBS): Add 'common/netstuff.o'.
>> * gdbreplay.c: Include 'wspiapi.h'.
>> (remote_open): Implement support for IPv6
>> connections.
>> * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
>> and 'wspiapi.h'.
>> (handle_accept_event): Accept connections from IPv6 sources.
>> (remote_prepare): Handle IPv6-style hostnames; implement
>> support for IPv6 connections.
>> (remote_open): Implement support for printing connections from
>> IPv6 sources.
>>
>> gdb/testsuite/ChangeLog:
>> yyyy-mm-dd Sergio Durigan Junior <sergiodj@redhat.com>
>> Jan Kratochvil <jan.kratochvil@redhat.com>
>> Paul Fertser <fercerpav@gmail.com>
>> Tsutomu Seki <sekiriki@gmail.com>
>>
>> * README (Testsuite Parameters): Mention new 'GDB_TEST_IPV6'
>> parameter.
>> * boards/gdbserver-base.exp (get_comm_port_localhost_ipv6):
>> New procedure.
>> * boards/native-extended-gdbserver.exp: Detect 'GDB_TEST_IPV6'
>> and change board info accordingly.
>> * boards/native-gdbserver.exp: Likewise.
>> * gdb.server/run-without-local-binary.exp: Improve regexp used
>> for detecting when a remote debugging connection succeeds.
>>
>> gdb/doc/ChangeLog:
>> yyyy-mm-dd Sergio Durigan Junior <sergiodj@redhat.com>
>> Jan Kratochvil <jan.kratochvil@redhat.com>
>> Paul Fertser <fercerpav@gmail.com>
>> Tsutomu Seki <sekiriki@gmail.com>
>>
>> * gdb.texinfo (Remote Connection Commands): Add explanation
>> about new IPv6 support. Add new connection prefixes.
>
> The documentation parts are approved, with a couple of minor comments:
Thanks for the review, Eli.
>> @item target remote @code{@var{host}:@var{port}}
>> +@itemx target remote @code{@var{@r{[}host@r{]}}:@var{port}}
>
> Isn't having 2 lines here redundant? If the HOST part is optional,
> the second line already covers the first, right?
>
> Similarly with other forms of this command.
Hm, I think you have misunderstood what the square brackets mean, which
tells me that there must be a better way to write this...
The square brackets in this case don't mean that the HOST is optional.
Rather, they *enclose* the hostname. As explained in the text above
this, IPv6 introduced a new way to specify URLs: by enclosing them in
square brackets. This is because the IPv6 separator (':') is the same
as the resource (port) separator, which can cause confusion. Therefore,
an IPv6 URL can have the form:
[::1]:1234
That's what I tried to convey with the additional @itemx. Perhaps I
shouldn't use @r{[} and @r{]}? Not sure if there's a better way to do
that.
>> @item target remote @code{udp:@var{host}:@var{port}}
>> +@itemx target remote @code{udp:@var{host}:@var{port}}
>
> And here these two lines are exactly identical, right?
Indeed. Removed.
>> +To connect to port 2828 on a terminal server whose address is
>> +@code{2001::f8ff::67cf}, you can either use the square bracket syntax:
>> +
>> +@smallexample
>> +target remote [2001::f8ff::67cf]:2828
>> +@end smallexample
>> +
>> +Or explicitly specify the @acronym{IPv6} protocol:
>
> The last sentence is actually a continuation of the one before the
> example. So it should start with a lower-case letter, and please
> insert a @noindent (on its own line) before that, to prevent Texnfo
> processors from indenting that line.
Ah, OK. Fixed.
Thanks,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/