This is an archive of the discontinued LLVM Phabricator instance.

Update DebugServer to support IPv6 over TCP
ClosedPublic

Authored by beanz on Apr 7 2017, 11:58 AM.

Details

Summary

This patch adds IPv6 support to debugserver. It follows a similar pattern to the changes proposed for LLDB/Host except that the listen implementation is only with kqueue(2) because debugserver is only supported on Darwin.

Diff Detail

Repository
rL LLVM

Event Timeline

beanz created this revision.Apr 7 2017, 11:58 AM
beanz updated this revision to Diff 94555.Apr 7 2017, 12:23 PM

Fixing a small bug parsing the command line arguments for IPv6 addresses.

Adding Greg to the reviewers.

clayborg accepted this revision.Apr 12 2017, 2:36 PM

Looks fine as long as all of the old modes work. :

  • "*:1234" that will accept a connection from any host on port 1234
  • "foo.bar.com:1234" only accept connections from "foo.bar.com" on port 1234
  • "localhost:1234" where make sure not to lookup "localhost" since people have been known to edit some config file and this no longer works, we currently just substitute "127.0.0.1" IPv4, and now we should or "::1" for IPv6
  • can't remember what used to happen when you only specify a port number, but that shouldn't change either

Can you ensure you tests catch these things? Any change here can affect many users, so we should be careful here to not regress.

This revision is now accepted and ready to land.Apr 12 2017, 2:36 PM

when users edit some config file they can have "localhost" map to some other port... Can't remember the unix file for this.

This revision was automatically updated to reflect the committed changes.