================ @@ -161,20 +161,22 @@ static void EventThreadFunction(DAP &dap) { case lldb::eStateSuspended: break; case lldb::eStateStopped: - // We launch and attach in synchronous mode then the first stop - // event will not be delivered. If we use "launchCommands" during a - // launch or "attachCommands" during an attach we might some process - // stop events which we do not want to send an event for. We will - // manually send a stopped event in request_configurationDone(...) - // so don't send any before then. - if (dap.configuration_done_sent) { - // Only report a stopped event if the process was not - // automatically restarted. - if (!lldb::SBProcess::GetRestartedFromEvent(event)) { - SendStdOutStdErr(dap, process); + { + std::unique_lock<std::mutex> lock(dap.ignore_stop_mutex); + if (dap.ignore_next_stop) { + DAP_LOG(dap.log, "Ignoring process stop event"); ---------------- JDevlieghere wrote:
I think that's a good point, and using launch commands, that't entirely out of our control. You could write a sequence of commands that stop the process an arbitrary number of time. This realization is what made me go with the current approach of doing all the launching and attaching in synchronous mode, because we'll never be able to account for this. https://github.com/llvm/llvm-project/pull/138219 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits