lldb-platform --listen

IIUC, lldb-platform’s --listen parameter works like this

lldb-platform --listen :

Usually, host:port notation indicates a host:port pair on the same interface. Mixing local and remote like this is very strange to me.

I would prefer something more like

lldb-platform --listen --allow

if they want host/ip restrictions

I can make these changes if everyone agrees.

I personally would rather not change this, everything else (lldb-gdbserver, debugserver, the GDB version of gdbserver) already accepts arguments or options as host:port.

I would be interested in hearing everyone's opinion on the matter to make sure I am not alone.

Greg

I can see both sides. On the one hand, it is pretty unusual. On the other hand, the change will probably have a large impact. I guess if someone is willing to put in the work to fix the issue and all associated fallout then why not? But there may also be external users of LLDB whom this will break.

Also worth pointing out that we use connection strings in other places. ConnectionFileDescriptor comes to mind. Would need to audit those as well to make sure they are fixed.

If the change is going to be purely cosmetic, the risk / impact might not be worth the benefit, and it may just be better to add documentation about how the connection string works to the “lldb-platform --help” and “help platform connect”.

But I could at least conceive of ways which it could be useful. For example, one potential benefit of Vince’s approach is that you could set it up to listen for a connection from a set of IP addresses by specifying a list of remote hosts to --allow.