[all-commits] [llvm/llvm-project] 0cc2cd: [lldb-dap] Provide `declarationLocation` for varia...
Adrian Vogelsgesang via All-commits
all-commits at lists.llvm.org
Mon Sep 16 17:19:14 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0cc2cd781594aec741f7262df7a48d73a7d09a18
https://github.com/llvm/llvm-project/commit/0cc2cd781594aec741f7262df7a48d73a7d09a18
Author: Adrian Vogelsgesang <avogelsgesang at salesforce.com>
Date: 2024-09-17 (Tue, 17 Sep 2024)
Changed paths:
M lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
A lldb/test/API/tools/lldb-dap/locations/Makefile
A lldb/test/API/tools/lldb-dap/locations/TestDAP_locations.py
A lldb/test/API/tools/lldb-dap/locations/main.c
M lldb/tools/lldb-dap/DAP.cpp
M lldb/tools/lldb-dap/DAP.h
M lldb/tools/lldb-dap/JSONUtils.cpp
M lldb/tools/lldb-dap/JSONUtils.h
M lldb/tools/lldb-dap/lldb-dap.cpp
Log Message:
-----------
[lldb-dap] Provide `declarationLocation` for variables (#102928)
This commit implements support for the "declaration location" recently
added by microsoft/debug-adapter-protocol#494 to the debug adapter
protocol.
For the `declarationLocationReference` we need a variable ID similar to
the `variablesReference`. I decided to simply reuse the
`variablesReference` here and renamed `Variables::expandable_variables`
and friends accordingly. Given that almost all variables have a
declaration location, we now assign those variable ids to all variables.
While `declarationLocationReference` effectively supersedes
`$__lldb_extensions.declaration`, I did not remove this extension, yet,
since I assume that there are some closed-source extensions which rely
on it.
I tested this against VS-Code Insiders. However, VS-Code Insiders
currently only supports `valueLoctionReference` and not
`declarationLocationReference`, yet. Locally, I hence published the
declaration locations as value locations, and VS Code Insiders navigated
to the expected places. Looking forward to proper VS Code support for
`declarationLocationReference`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list