HomePhabricator

Redo of Add terminateCommands to lldb-vscode protocol

Authored by Walter Erquinigo <waltermelon@fb.com> on Mon, Jun 15, 2:08 PM.

Description

Redo of Add terminateCommands to lldb-vscode protocol

Summary:
This redoes https://reviews.llvm.org/D79726 and fixes two things.

  • The logic that determines whether to automatically disconnect during the tear down is not very dumb compared to the original implementation. Each test will determine whether to do that or not.
  • The terminate commands and terminate event were being sent after the disconnect response was sent to the IDE. That was not good, as VSCode stops the debug session as soon as it receives a disconnect response. Now, the terminate event and terminateEvents are being executed before the disconnect response is sent. This ensures that any connection between the IDE and lldb-vscode is alive while the terminate commands are executed. Besides, it also allows displaying the output of the terminate commands on the debug console, as it's still alive.

Reviewers: clayborg, aadsm, kusmour, labath

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D81978

Event Timeline

Walter Erquinigo <waltermelon@fb.com> committed rG74ab1da0285f: Redo of Add terminateCommands to lldb-vscode protocol (authored by Walter Erquinigo <waltermelon@fb.com>).Tue, Jun 23, 12:51 PM