Skip to content

Commit 275db02

Browse files
committed
Reuse code in SendTerminatedEvent()
1 parent c35a97f commit 275db02

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lldb/tools/lldb-dap/EventHelper.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,7 @@ llvm::Error SendThreadStoppedEvent(DAP &dap, bool on_entry) {
231231
// Send a "terminated" event to indicate the process is done being
232232
// debugged.
233233
void SendTerminatedEvent(DAP &dap) {
234-
// Prevent races if the process exits while we're being asked to disconnect.
235-
llvm::call_once(dap.terminated_event_flag, [&] {
236-
dap.RunTerminateCommands();
237-
// Send a "terminated" event
238-
llvm::json::Object event(CreateTerminatedEventObject(dap.target));
239-
dap.SendJSON(llvm::json::Value(std::move(event)));
240-
});
234+
dap.SendTerminatedEvent();
241235
}
242236

243237
// Grab any STDOUT and STDERR from the process and send it up to VS Code

0 commit comments

Comments
 (0)