[Lldb-commits] [lldb] lldb-dap: Stop using replicated variable ids (PR #124232)

Anthony Eid via lldb-commits lldb-commits at lists.llvm.org
Sun Dec 7 13:49:20 PST 2025


================
@@ -62,7 +97,11 @@ struct Variables {
   /// These are the variables evaluated from debug console REPL.
   llvm::DenseMap<int64_t, lldb::SBValue> m_referencedpermanent_variables;
 
-  int64_t m_next_temporary_var_ref{VARREF_FIRST_VAR_IDX};
+  /// Key = frame_id
+  /// Value = (locals, globals Registers) scopes
+  std::map<uint32_t,
----------------
Anthony-Eid wrote:

Sorry it took me so long to get back to this. I just fixed this by using the stack frame id field from the DAP representation. 

https://github.com/Anthony-Eid/llvm-project/blob/c4155cc279323f5014dba9e4495ec4bef71e0a31/lldb/tools/lldb-dap/Handler/ScopesRequestHandler.cpp#L39-L40

Please let me know if there's something I'm missing with this solution

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


More information about the lldb-commits mailing list