labath 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.
I think it should already [support that](https://github.com/llvm/llvm-project/blob/97c62b8f7501d1c6c2f507b075fbe45a31d2b9dc/lldb/tools/debugserver/source/debugserver.cpp#L1297). If it doesn't, and it comes down to this, I volunteer to help you with making sure that works. 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