This is an archive of the discontinued LLVM Phabricator instance.

[lldb-vsocde] Add a 'continued' event for programmatic continue events.
ClosedPublic

Authored by ashgti on Jul 11 2023, 10:39 AM.

Details

Summary

When the process is contiuned using an lldb command expression the thread state in VS Code is never informed and will be out of sync with the current state of the process. The new event will fire whenever the process is continued and keeps the debugger in sync with the dap client.

Diff Detail

Event Timeline

ashgti created this revision.Jul 11 2023, 10:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2023, 10:39 AM
ashgti requested review of this revision.Jul 11 2023, 10:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2023, 10:39 AM
ashgti updated this revision to Diff 539185.Jul 11 2023, 10:40 AM

Applying clang-format.

wallace accepted this revision.Jul 11 2023, 12:53 PM

thanks!

This revision is now accepted and ready to land.Jul 11 2023, 12:53 PM
dgoldman added inline comments.
lldb/tools/lldb-vscode/lldb-vscode.cpp
286–287

Should we also set g_vsc.focus_tid here if it's invalid?

ashgti updated this revision to Diff 539302.Jul 11 2023, 2:53 PM

Removing the focus_tid invalidation on the continue event, that was incorrectly setting the focus_tid to 0 for all continue events. Instead allow the existing logic in the SendThreadStoppedEvent to infer the correct focus_tid updates
(if needed).

ashgti updated this revision to Diff 539304.Jul 11 2023, 2:57 PM

Applying clang-format.

ashgti marked an inline comment as done.Jul 11 2023, 2:57 PM
ashgti updated this revision to Diff 544017.Jul 25 2023, 9:41 AM

Adding back the 'threadCausedFocus' field, that is used in tests to verify behavior.