slydiman wrote:

The best solution is simply to remove all code related to gdb port mapping, 
because it does not work at all. Try to run `netstat` and you will be surprised.

1. lldb-server in gdbserver mode completely ignores the port from the url 
`tcp://[hostname]:port`. It binds to port 0 and it is hardcoded.
2. Currently lldb-server in platform mode always runs `lldb-server gdbserver 
tcp://[hostname]:0` because of the bug added 4 years ago and no one noticed 
this issue.

If gdb port parameters specified, now it causes issues like #97537, but a 
random port will be used for connection anyway.

If no gdb port parameters specified, the port map must be empty and must stay 
empty. AllowPort(0) makes the port map not empty and causes an unexpected 
behavior. This patch fixes this issue.

https://github.com/llvm/llvm-project/pull/98833
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to