[Lldb-commits] [lldb] [lldb-dap] Refactor variablesReference storage and scope management. (PR #179262)

Ebuka Ezike via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 3 02:29:16 PST 2026


================
@@ -24,150 +25,16 @@ namespace lldb_dap {
 /// indexed children.
 Expected<VariablesResponseBody>
 VariablesRequestHandler::Run(const VariablesArguments &arguments) const {
-  const uint64_t var_ref = arguments.variablesReference;
-  const uint64_t count = arguments.count;
-  const uint64_t start = arguments.start;
-  const bool hex = arguments.format ? arguments.format->hex : false;
+  const var_ref_t var_ref = arguments.variablesReference;
+  if (var_ref == LLDB_DAP_INVALID_VAR_REF)
+    return llvm::createStringErrorV("Invalid variablesReference: {}", var_ref);
----------------
da-viper wrote:

We currently use the normal stringError when it an error that is not relevant to the user and have no idea about. see
https://github.com/llvm/llvm-project/blob/51217804f26a7ca66093365c4d50e56c7431c0ae/lldb/tools/lldb-dap/SourceBreakpoint.cpp#L91-L98

https://github.com/llvm/llvm-project/pull/179262


More information about the lldb-commits mailing list