aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/lib')
-rw-r--r--gdb/python/lib/gdb/dap/varref.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/python/lib/gdb/dap/varref.py b/gdb/python/lib/gdb/dap/varref.py
index f5ffe34f7f5..e7d114c9d51 100644
--- a/gdb/python/lib/gdb/dap/varref.py
+++ b/gdb/python/lib/gdb/dap/varref.py
@@ -146,10 +146,12 @@ class BaseReference(ABC):
if self._children is None:
self._children = [None] * self.child_count()
for idx in range(start, start + count):
+ # DAP was clarified to say that if too many children are
+ # requested, this is not an error, but instead the result
+ # is just truncated.
+ # https://github.com/microsoft/debug-adapter-protocol/issues/571
if idx >= len(self._children):
- raise DAPException(
- f"requested child {idx} outside range of variable {self._ref}"
- )
+ break
if self._children[idx] is None:
(name, value) = self.fetch_one_child(idx)
name = self._compute_name(name)