[PATCH] Implement IPv6 support for GDB/gdbserver

Sergio Durigan Junior sergiodj@redhat.com
Fri May 25 01:57:00 GMT 2018


On Thursday, May 24 2018, Eli Zaretskii wrote:

>> From: Sergio Durigan Junior <sergiodj@redhat.com>
>> Cc: gdb-patches@sourceware.org,  palves@redhat.com,  jan.kratochvil@redhat.com,  fercerpav@gmail.com,  sekiriki@gmail.com
>> Date: Wed, 23 May 2018 19:40:06 -0400
>> 
>> 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
>
> Then perhaps we shouldn't advertise the bracket-less syntax at all,
> and only say somewhere that it is accepted for backward compatibility?

Well, the bracket-less syntax is still useful for when you want to
provide IPv4 addresses.  For example:

  target remote tcp:192.168.1.1:1234

is still a valid use, and:

  target remote tcp:[192.168.1.1]:1234

doesn't work/make sense.  Therefore, I think it's still important to
mention both syntaxes.

>> Perhaps I shouldn't use @r{[} and @r{]}?
>
> Yes, @r{..} is definitely wrong in that case, you should drop it.

Noted.  I'll remove the @r{}.

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/



More information about the Gdb-patches mailing list