llvm-project/lldb/test/API/tools/lldb-vscode
Jeffrey Tan b9139acb85 Fix expression evaluation result expansion in lldb-vscode
VScode now sends a "scopes" DAP request immediately after any expression evaluation.
This scopes request would clear and invalidate any non-scoped expandable variables in g_vsc.variables, causing later "variables" request to return empty result.
The symptom is that any expandable variables in VScode watch window/debug console UI to return empty content.

This diff fixes this issue by only clearing the expandable variables at process continue time. To achieve this, we have to repopulate all scoped variables
during context switch for each "scopes" request without clearing global expandable variables.
So the PR puts the scoped variables into its own locals/globals/registers; and all expandable variables into separate "expandableVariables" list.
Also, instead of using the variable index for "variableReference", it generates a new variableReference id each time as the key of "expandableVariables".

As a further new feature, this PR adds a new "expandablePermanentVariables" which has the lifetime of debug session. Any expandable variables from debug console
are added into this list. This enables users to snapshot expanable old variable in debug console and compare with new variables if desire.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D105166
2021-08-03 15:24:44 -07:00
..
attach [lldb-vscode] Add postRunCommands 2021-04-21 13:51:30 -07:00
breakpoint [source maps] fix source mapping when there are multiple matching rules 2021-07-23 17:53:12 -07:00
breakpoint-events Revert "[lldb-vscode] Emit the breakpoint changed event on location resolved" 2021-02-21 13:08:06 -08:00
completions [lldb] Fix TestVSCode_completions for clang 159a9f7 2020-03-26 10:24:33 +01:00
console [lldb-vscode] redirect stderr/stdout to the IDE's console 2021-04-21 14:48:48 -07:00
coreFile [lldb-vscode] Add an option for loading core files 2020-04-28 13:03:02 -07:00
disconnect Revert "[LLDB] Skip TestVSCode_disconnect.test_launch arm/linux" 2021-03-31 15:22:49 +05:00
evaluate [lldb] Fix gnu_libstdcpp's update methods 2021-05-26 14:52:38 -07:00
launch [NFC][lldb-vscode] Fix launch test 2021-07-07 10:01:19 -07:00
module [lldb] [test] Update XFAILs for FreeBSD/aarch64 2021-03-10 18:36:19 +01:00
runInTerminal Fix runInTerminal failures on Windows 2021-01-27 13:17:23 -08:00
stackTrace [lldb] NFC: Fix trivial typo in comments, documents, and messages 2020-04-07 01:06:16 +09:00
step [lldb] NFC: Fix trivial typo in comments, documents, and messages 2020-04-07 01:06:16 +09:00
variables Fix expression evaluation result expansion in lldb-vscode 2021-08-03 15:24:44 -07:00
categories [lldb] [test] Rename '.categories' to 'categories' 2020-11-10 12:02:38 +01:00