[Lldb-commits] [lldb] [lldb] Removed gdbserver ports map from lldb-server (PR #104238)

Dmitry Vasilyev via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 13 11:03:36 PDT 2024


slydiman wrote:

> I do want it. I don't think it's necessary to transfer the type of the socket, as that can be determined by inspecting the socket FD (getsockopt(SO_DOMAIN/SO_PROTOCOL)).

Oh, I expected this. We can determine non-tcp by missing or 0 gdb port. But it is impossible to separare ProtocolUnixDomain and ProtocolUnixAbstract. The difference is only the implementation of Socket::GetNameOffset().
getsockopt(SO_DOMAIN/SO_PROTOCOL) will not help.
We can provide `--listen same_host_port ` to the child process additionally to `--child-platform-fd X`  and move the parsing of the listen parameter to the beginning to get the correct protocol.
I will make the second commit with the version where I will mux functions platform_tcp() and platform_named() back together, complicated and hard as possible.

https://github.com/llvm/llvm-project/pull/104238


More information about the lldb-commits mailing list