<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/139025>139025</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[lldb] - Send startDebugging request on fork
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jasonwilliams
</td>
</tr>
</table>
<pre>
This is a follow on from both:
- https://github.com/llvm/llvm-project/issues/127952
- https://github.com/vadimcn/codelldb/issues/317
LLDB supports both [follow-fork-mode](https://github.com/llvm/llvm-project/commit/4a2a947317bf702178bf1af34dffd0d280d49970) and the dap-based [startDebuggingRequest](https://github.com/llvm/llvm-project/commit/227b2180eb2be94986d63c75c144f88be13fc52f). However it doesn’t look like a request is sent back to the debug client if a fork or vfork happens. This would allow the client to attach to the child process.
My thinking is, even if following the parent is selected, a startDebugging request would be sent to the client, so a new debug session can be attached to the child process, and the client can debug both processes. This would be a cleaner setup that trying to support multi process debugging.
CC @jimingham @mgorny
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyklM2u6yYQx58Gb0aJMP5k4cU9J426uN20fQE-xjYnGFzAic7bV9hJ2yu1qq7uKiYwf34z82dEjGZyiANp3khzKcSWZh-GDxG9exhrjVhiIb3-HH6fTQQTQcDorfUP8A7G4BeQPs2k-kLolxPMKa0xL9iVsOtk0rzJs_ILYVdr76-f0xr8B6pE2NXEuGEk7Fqyjjfs_0TuQptFOcKuymu0Vst_alRlR2gG-fr18gZxW1cfUtwBgTRvB_dp9OF2WrxG0lwI678bWfllMfmjFkzwuqvKTo4dZWXXy7EUY1XrcdRUs57qmvOOEsZBOA1pRtBiPUkRUWegmERIF5TbNBk3_Yp_bBjTj1Ix1klW9hQlk8hr3re6rVTXqLKux76XWFajathIGD_Dz_6BdwxgEmiP0ZGfGOkp4TyB9f4G1twQBIQDLbc_oksghbpB8kdGmR-UNXnDjLs_wg18gPv-MYt1RRfPsBvo4TerQewGytHPuORBpCTU_FJVs7Ea1uAVxng-uvrLJ6TZuJtxE5hI2DvgHV2-8-hs_j_HriLsLBnWokqo81kB35b7r6QOJIlHaq_7d64cFz0IcPh4JhoxRuMdKOFyzEGN-l-592ufjX8mmsMOod2Vz4P4bXmyLiiLwmGAiGlbIc0iQQqfe47-5W1YNpvMS-UQzrk9C_b-DqSmH2YxbprFkhfL5IP7hEIPleYVFwUOZVe3bcd7VhXzUCNXrZK1LnnTlqLttBjLFhkXnMm2wcIMjLKGNrSndUNZdWasoq1QasRWt6KrSE1xEcaes0HPPkzF_j6HsuKUNYUVEm3cxw1juaz7LmEsT58w7K6W2xRJTa2JKf4tk0yy-5zan31zgRP8hk7_V1vzePLhVmzBDj8wlg7q-8D-DAAA__-BSLfL">