diff options
author | Tom Tromey <tromey@adacore.com> | 2024-08-15 12:06:31 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-08-16 08:47:00 -0600 |
commit | 807f697b176d6c635643118202f36e572872007f (patch) | |
tree | c99e5594a410b757943dbebcf58674c3ec6c8bfc /gdb/python | |
parent | 798bb5cc53edfa13673038b7d76ff09dadfaacb5 (diff) | |
download | binutils-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.py | 3 |
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 |