From 807f697b176d6c635643118202f36e572872007f Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 15 Aug 2024 12:06:31 -0600 Subject: Fix DAP failure when fetching global variables The relatively new "globals" scope code in DAP has a fairly obvious bug -- the fetch_one_child method should return a tuple with two elements, but instead just returns the variable's value. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32029 Reviewed-By: Tom de Vries --- gdb/python/lib/gdb/dap/globalvars.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/python') diff --git a/gdb/python/lib/gdb/dap/globalvars.py b/gdb/python/lib/gdb/dap/globalvars.py index 149c9a8..38bdc5c 100644 --- a/gdb/python/lib/gdb/dap/globalvars.py +++ b/gdb/python/lib/gdb/dap/globalvars.py @@ -60,7 +60,8 @@ class _Globals(BaseReference): @in_gdb_thread def fetch_one_child(self, idx): - return self.var_list[idx].value() + sym = self.var_list[idx] + return (sym.name, sym.value()) @in_gdb_thread -- cgit v1.1