This is an archive of the discontinued LLVM Phabricator instance.

[lldb-vscode] Fix focus thread when previous thread exits
ClosedPublic

Authored by ted on Sep 10 2021, 2:48 PM.

Details

Summary

The thread that Visual Studio Code displays on a stop is called the focus thread. When the previous focus thread exits and we stop in a new thread, lldb-vscode does not tell vscode to set the new thread as the focus thread, so it selects the first thread in the thread list.

This patch changes lldb-vscode to tell vscode that the new thread is the focus thread. It also includes a test that verifies the DAP stop message for this case contains the correct values.

Diff Detail

Event Timeline

ted created this revision.Sep 10 2021, 2:48 PM
ted requested review of this revision.Sep 10 2021, 2:48 PM
clayborg accepted this revision.Sep 13 2021, 12:40 PM

Looks good!

This revision is now accepted and ready to land.Sep 13 2021, 12:40 PM
wallace accepted this revision.Sep 13 2021, 1:41 PM

nice!

This revision was landed with ongoing or failed builds.Sep 15 2021, 4:09 PM
This revision was automatically updated to reflect the committed changes.