]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Emit DAPException when too many variable children are reqeusted
authorTom Tromey <tromey@adacore.com>
Wed, 30 Jul 2025 14:30:49 +0000 (08:30 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 11 Aug 2025 13:39:10 +0000 (07:39 -0600)
commit9ef3249a00f50ee00e3973e5901cd2936abc79b3
tree60c3bdc16947c5634ac312a69c3b051e0b8985b0
parentddd2795c52228cbbdf11aa95e11b68647b10df88
Emit DAPException when too many variable children are reqeusted

PR dap/33228 points out a failure that occurs when the DAP client
requests more children of a variable than actually exist.  Currently,
gdb throws a somewhat confusing exception.  This patch changes this
code to throw a DAPException instead, resulting in a more ordinary and
readable failure.

The spec seems to be silent on what to do in this case.  I chose an
exception on the theory that it's easier to be strict now and lift the
restriction later (if needed) than vice versa.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33228
gdb/python/lib/gdb/dap/varref.py
gdb/testsuite/gdb.dap/scopes.exp