[Lldb-commits] [lldb] [lldb] Multithreading lldb-server works on Windows now; fixed gdb port mapping (PR #100670)
Dmitry Vasilyev via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 29 06:45:18 PDT 2024
slydiman wrote:
> The way this would work is by letting the platform instance delegate/upgrate/convert the platform connection into a gdbserver one. The way this would work would be something like this:
>
> 1. `lldb-server platform` would advertise (say in `qSupported`) its support for this new mode.
> 2. Before asking the platform to launch a new gdb server, lldb would query this feature. If present, instead of the usual action (`qLaunchGDBServer`), it would create _another_ platform connection, using the same port as the original one. As we're using the same port, we'd go through all the nats just like the original connection.
> 3. On this new connection it would send a new special packet (let's call it `qUpgradeToGdbConnection`)
> 4. `lldb server platform` would launch an gdbserver instance and everything else would proceed as before.
>
> On non-darwin platform (darwin uses `debugserver`) we could optimize to avoid spawning a new process, and just call the relevant gdb-server code directly.
But debugserver on darwin will not support this feauture. It will still require the port map or disabling firewall.
https://github.com/llvm/llvm-project/pull/100670
More information about the lldb-commits
mailing list