[lldb-dev] Remote debugging - unix socket and/or specific port

Adrien Duermael via lldb-dev lldb-dev at lists.llvm.org
Wed Jun 22 11:18:15 PDT 2016


I’ve been trying to run lldb-server from within a linux container lately. 

When I try to attach from outside the container using lldb command, most steps are successful but I can’t launch the process:

platform select remote-linux 👍
platform connect connect://IP:PORT <connect://IP:PORT> 👍
target create main 👍
process launch ❌

My guess is that the container only exposes the control port, the one I’m listening to with lldb-server p --listen *:PORT.
And it seems that ports are dynamically allocated to then handle process debugging. 

I don’t want my container to expose too many ports, as I usually have in fact only one debuggable process running inside.
(I tried, I can launch my process if the container exposes all ports)

Is there a way to set a range for these dynamically allocated ports using lldb-server?

I can’t find it in the docs, and help command can’t help me either:
  lldb-server p [--log-file log-file-name] [--log-channels log-channel-list] [--port-file port-file-path] --server --listen port

Also, is there an option to use unix sockets instead of ports?

Thanks for your help!

- Adrien Duermael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160622/09f69f68/attachment.html>

More information about the lldb-dev mailing list