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 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits