llvm-project/lldb
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
..
bindings [lldb] Add AllocateMemory/DeallocateMemory to the SBProcess API 2021-07-16 00:45:22 +02:00
cmake [lldb] Get rid of HAVE_SYS_TYPES_H 2021-08-03 22:14:56 +02:00
docs [trace] Introduce Hierarchical Trace Representation (HTR) and add command for Intel PT trace visualization 2021-07-28 13:56:45 -07:00
examples [lldb/Plugins] Add ScriptedProcess Process Plugin 2021-07-22 14:47:33 +02:00
include/lldb [lldb] Get rid of HAVE_SYS_TYPES_H 2021-08-03 22:14:56 +02:00
packages/Python [LLDB] Change pexpect timeout to 30 to 60 2021-08-02 06:34:11 +05:00
resources [lldb] Remove stale LLDB-Info.plist 2021-01-08 10:12:16 -08:00
scripts Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
source [lldb] Get rid of HAVE_SYS_TYPES_H 2021-08-03 22:14:56 +02:00
test Fix expression evaluation result expansion in lldb-vscode 2021-08-03 15:24:44 -07:00
third_party/Python/module [LLDB] Change pexpect timeout to 30 to 60 2021-08-02 06:34:11 +05:00
tools Fix expression evaluation result expansion in lldb-vscode 2021-08-03 15:24:44 -07:00
unittests [lldb] Correct format of qMemTags type field 2021-07-30 11:06:57 +01:00
utils [lldb] Match test dependencies name to other LLVM projects. 2021-05-21 00:10:27 -07:00
.clang-format
.clang-tidy [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
.gitignore
CMakeLists.txt [LLDB] Don't use the local python to set a default for LLDB_PYTHON_RELATIVE_PATH when cross compiling. 2021-05-11 14:04:41 +03:00
CODE_OWNERS.txt
LICENSE.TXT
use_lldb_suite_root.py