llvm-project/lldb/tools
Walter Erquinigo 34885bffdf [lldb-vscode] Handle request_evaluate's context attribute
Summary:
The request "evaluate" supports a "context" attribute, which is sent by VSCode. The attribute is defined here https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Evaluate

The "clipboard" context is not yet supported by lldb-vscode, so we can forget about it for now. The 'repl' (i.e. Debug Console) and 'watch' (i.e. Watch Expression) contexts must use the expression parser in case the frame's variable path is not enough, as the user expects these expressions to never fail. On the other hand, the 'hover' expression is invoked whenever the user hovers on any keyword on the UI and the user is fine with the expression not being fully resolved, as they know that the 'repl' case is the fallback they can rely on.

Given that the 'hover' expression is invoked many many times without the user noticing it due to it being triggered by the mouse, I'm making it use only the frame's variable path functionality and not the expression parser. This should speed up tremendously the responsiveness of a debug session when the user only sets source breakpoints and inspect local variables, as the entire debug info is not needed to be parsed.

Regarding tests, I've tried to be as comprehensive as possible considering a multi-file project. Fortunately, the results from the "hover" case are enough most of the times.

Differential Revision: https://reviews.llvm.org/D98656
2021-03-15 15:09:23 -07:00
..
argdumper [lldb] Make lldb-argdumper a dependency of liblldb 2020-08-27 09:31:02 -07:00
compact-unwind Add arm64_32 support to lldb, an ILP32 codegen 2019-10-16 19:14:49 +00:00
darwin-debug Embed a zero-length /dev/null in darwin-debug for the special section. 2020-01-22 15:50:33 -08:00
darwin-threads
debugserver [debugserver] Fix more compiler warnings on arm64 2021-03-03 23:12:12 -08:00
driver [lldb] Surpress "ingoring result" warning in reproducer_handler 2020-12-27 13:58:05 +01:00
intel-features [lldb] Get rid of LLDB_LIB_DIR and LLDB_IMPLIB_DIR in dotest 2020-08-28 15:45:54 -07:00
lldb-instr Adapt lldb-instr to d47ee525f9 APi change 2021-01-29 10:58:40 +01:00
lldb-server [lldb] Fix shared library directory computation on windows 2021-02-18 15:37:52 +01:00
lldb-test [lldb] Fix shared library directory computation on windows 2021-02-18 15:37:52 +01:00
lldb-vscode [lldb-vscode] Handle request_evaluate's context attribute 2021-03-15 15:09:23 -07:00
CMakeLists.txt [CMake] Copy over the system debugserver when using LLDB_USE_SYSTEM_DEBUGSERVER 2019-09-24 22:39:04 +00:00