================
@@ -62,7 +95,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 = dap_frame_id (encodes both thread index ID and frame ID)
+ /// Value = (locals, globals, registers) scopes
+ std::map<uint64_t,
+ std::tuple<lldb::SBValueList, lldb::SBValueList, lldb::SBValueList>>
----------------
Anthony-Eid wrote:
Done, I also made a helper function to get a scope based on the `eScopeKind`
enum
```c++
/// Returns a pointer to the scope corresponding to the given kind.
lldb::SBValueList *GetScope(eScopeKind kind) {
switch (kind) {
case eScopeKind::Locals:
return &locals;
case eScopeKind::Globals:
return &globals;
case eScopeKind::Registers:
return ®isters;
}
return nullptr;
}
};
```
Should I do anything special for the case where a `nullptr` is returned? That
variant shouldn't be possible so I'm tempted to panic instead of returning.
This would catch any lldb-dap bugs where the program state is somehow invalid
here, but I'm not sure if `lldb-dap` is ok with having panic like this (even if
it should never happen).
https://github.com/llvm/llvm-project/pull/124232
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits