<div dir="ltr">> <span style="font-size:13px">Isn't that related to why the above case 1 is failing?</span><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">Related in that they're both using a passed hostname for making/allowing a connection but different in that they are different spots in the code.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 7, 2015 at 5:45 PM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On Jan 7, 2015, at 4:47 PM, Vince Harron <<a href="mailto:vharron@google.com">vharron@google.com</a>> wrote:<br>
><br>
> Hi all,<br>
><br>
> I'm having a couple of problems with remote debugging.<br>
><br>
> 1) lldb unable to connect to lldb-gdbserver<br>
> when lldb connects to platform, platform sends back a hostname that is supposed to be used for connection to lldb-gdbserver. Unfortunately, for my VM targets without DNS entries, the hostnames they return are useless. A much better strategy is to re-use the hostname in the platform connect url to connect to the lldb-gdbserver.<br>
<br>
</span>That could easily work. We also could provide a lldb-platform argument that says what hostname to connect back to instead of itself, but that is more work and probably not needed. I can't think of any reason we would not just be able to use the hostname used to connect to the platform...<br>
<span class=""><br>
><br>
> 2) lldb-gdbserver refuses connection from lldb. Similarly, qLaunchGDBServer includes a host name that lldb-gdbserver is allowed to accept connections from. If, for whatever reason, my source host doesn't have a DNS entry, this will fail.<br>
<br>
</span>Isn't that related to why the above case 1 is failing? What value is the platform sending back to LLDB in the above case?<br>
<span class="">><br>
> Also, if I platform connect to localhost, lldb-gdbserver will see the remote ip address as 127.0.0.1 which will not to match the DNS lookup of my hostname. A much better strategy is to just allow connections from the IP address that lldb-platform is currently communicating with.<br>
<br>
</span>that is fine.<br>
<span class=""><br>
><br>
> I think these changes will work with all existing use cases and add many more use cases without compromising security.<br>
<br>
</span>That sounds good.<br>
<span class="">><br>
> I'm working on these changes now. I'm going to add the ability for a connection object to return either a remote hostname or a SocketAddress.<br>
><br>
> Questions/concerns?<br>
<br>
</span>There is so much spoofing that goes on when running things remotely and with virtual machines that this needs to be as powerful as we can make it. Feel free propose fixes and we can look at what you come up with. I will need to test with iOS when you have changes so I can make sure nothing breaks on our side. Let me know when you have something and I will test it.<br>
<span class="HOEnZb"><font color="#888888"><br>
Greg<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><br><table cellspacing="0" cellpadding="0" style="font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Vince Harron |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Technical Lead Manager |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:vharron@google.com" target="_blank">vharron@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 858-442-0868</td></tr></tbody></table><br></div></div>
</div>