[Lldb-commits] [PATCH] D17099: Add reverse-connect functionality to the gdb-remote command

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 12 02:24:09 PST 2016

labath added a comment.

I like this more, but I'd like to take it a bit further. I think we won't have to parse the url string at all (see comments).

I believe the best way to avoid breaking (and being broken by) other changes is to make sure this fits in nicely in the existing architecture. Putting this logic into `ConnectToDebugServer` seems like the logical place.

You can wait with the test until we have settled on the final implementation, but I'd like the test to go in together with the change.

Comment at: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:726
@@ -725,2 +725,3 @@
-    error = ConnectToDebugserver (remote_url);
+    if (strncmp(remote_url, "listen", strlen("listen")) == 0)
+    {
If we can get `ConnectToDebugserver` working with a listen url then we will get rid of this url parsing hack...

Comment at: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:1088
@@ -1069,3 +1087,3 @@
                 if (conn_ap->Connect(connect_url, &error) == eConnectionStatusSuccess)
`ConnectionFileDescriptor::Connect` seems to be able to handle `listen://` urls. What would happen if you just passed the listen url to `ConnectToDebugserver`


More information about the lldb-commits mailing list