<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Pavel, <div class=""><br class=""></div><div class="">Thanks for your answer! At least I know it’s not supposed to work as is. </div><div class="">I’ll see if I can do something similar to what you guys did for Android platforms. </div><div class=""><br class=""></div><div class="">Thanks again!</div><div class=""><br class=""></div><div class="">Cheers, </div><div class=""><br class=""></div><div class="">- Adrien Duermael</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 29, 2016, at 5:07 AM, Pavel Labath <<a href="mailto:labath@google.com" class="">labath@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Adrien,<div class=""><br class=""></div><div class="">I think your diagnosis is correct here. LLDB does indeed create an additional connection to the gdb-server instance which is started by the platform instance when you start debugging. In case of android platforms we already include code to forward this port automatically, but there is no such thing for linux -- we just expect the server to be reachable.</div><div class=""><br class=""></div><div class="">Unfortunately, there is no way to control this behavior at the moment. I suppose you could unblock all ports on the container, but make sure that they are only reachable from the host (I know that's not ideal).</div><div class=""><br class=""></div><div class="">cheers,</div><div class="">pl</div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On 22 June 2016 at 19:18, Adrien Duermael via lldb-dev <span dir="ltr" class=""><<a href="mailto:lldb-dev@lists.llvm.org" target="_blank" class="">lldb-dev@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><div style="word-wrap:break-word" class="">Hi, <div class=""><br class=""></div><div class="">I’ve been trying to run<b class=""> lldb-server</b> from within a linux container lately. </div><div class=""><br class=""></div><div class="">When I try to attach from outside the container using <b class="">lldb </b>command, most steps are successful but I can’t launch the process:</div><div class=""><br class=""></div><div class="">platform select remote-linux 👍</div><div class="">platform connect <a class="">connect://IP:PORT</a> 👍</div><div class="">target create main 👍</div><div class="">process launch ❌</div><div class=""><br class=""></div><div class="">My guess is that the container only exposes the control port, the one I’m listening to with <b class="">lldb-server p --listen *:PORT.</b></div><div class="">And it seems that ports are dynamically allocated to then handle process debugging. </div><div class=""><br class=""></div><div class="">I don’t want my container to expose too many ports, as I usually have in fact only one debuggable process running inside.</div><div class="">(I tried, I can launch my process if the container exposes all ports)</div><div class=""><br class=""></div><div class="">Is there a way to set a range for these dynamically allocated ports using <b class="">lldb-server?</b></div><div class=""><br class=""></div><div class="">I can’t find it in the docs, and help command can’t help me either:</div><div class=""><div class=""><b class="">Usage:</b></div><div class=""><b class="">  lldb-server p [--log-file log-file-name] [--log-channels log-channel-list] [--port-file port-file-path] --server --listen port</b></div></div><div class=""><b class=""><br class=""></b></div><div class="">Also, is there an option to use unix sockets instead of ports?</div><div class=""><br class=""></div><div class="">Thanks for your help!</div><div class=""><br class=""></div><div class="">- Adrien Duermael</div></div></div></div><br class="">_______________________________________________<br class="">
lldb-dev mailing list<br class="">
<a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>