aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-08-15 12:06:31 -0600
committerTom Tromey <tromey@adacore.com>2024-08-16 08:47:00 -0600
commit807f697b176d6c635643118202f36e572872007f (patch)
treec99e5594a410b757943dbebcf58674c3ec6c8bfc /gdb/python
parent798bb5cc53edfa13673038b7d76ff09dadfaacb5 (diff)
downloadbinutils-807f697b176d6c635643118202f36e572872007f.zip
binutils-807f697b176d6c635643118202f36e572872007f.tar.gz
binutils-807f697b176d6c635643118202f36e572872007f.tar.bz2
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 <tdevries@suse.de>
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/lib/gdb/dap/globalvars.py3
1 files changed, 2 insertions, 1 deletions
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