When launched from lldb-platform, lldb-gdbserver's lifetime should be tied to the lldb-platform process. Otherwise the platform can die and leave a lingering lldb-gdbserver process. The existing launch argument LaunchInSeparateProcessGroup is used to denote this as this seems to be exactly what it is intended for.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Looks fine to me. But I'm neither a linux person nor an llgs person, so I'm fine with it as long as Siva and Oleksiy are.
Do we need to call SetLaunchInSeparateProcessGroup(true) here https://github.com/llvm-mirror/lldb/blob/0d9ea6ba74541fe4a73df96122dc7a5913ac91e5/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp#L1918?
No, this is how the server is launched when run from lldb-platform, where we don't want it to run in a separate process group. Note the m_is_platform check here:
https://github.com/llvm-mirror/lldb/blob/0d9ea6ba74541fe4a73df96122dc7a5913ac91e5/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp#L1887
I could call SetLaunchInSeparateProcessGroup(false) to make that explicit.
Do we need to call SetLaunchInSeparateProcessGroup(true) here https://github.com/llvm-mirror/lldb/blob/0d9ea6ba74541fe4a73df96122dc7a5913ac91e5/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp#L1918?
I could call SetLaunchInSeparateProcessGroup(false) to make that explicit.
Yes, I think it makes sense to do - otherwise we may rely on default value of LaunchInSeparateProcessGroup.
Explicitly set LaunchInSeparateProcessGroup to false from GDBRemoteCommunicationServer::Handle_qLaunchGDBServer to make this explicit and not rely on default value.
I don't have commit access so if/when this is good can someone land it for me? Thanks.