Implement DAP setVariable request
authorTom Tromey <tromey@adacore.com>
Thu, 5 Oct 2023 12:27:50 +0000 (06:27 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 31 Oct 2023 17:50:03 +0000 (11:50 -0600)
commit87e3cc466e8ea352639beb6db40a36e339d608d1
tree8a280e2292065bfd46d3cd2d7ebbd9cf8be3e775
parent8170af78e17e1ec8b14b40d3ff4c979ccccb8f44
Implement DAP setVariable request

This patch implements the DAP setVariable request.

setVariable is a bit odd in that it specifies the variable to modify
by passing in the variable's container and the name of the variable.
This approach can't handle variable shadowing (there are a couple of
open DAP bugs on this topic), so this patch renames duplicates to
avoid the problem.
gdb/python/lib/gdb/dap/evaluate.py
gdb/python/lib/gdb/dap/scopes.py
gdb/python/lib/gdb/dap/varref.py
gdb/testsuite/gdb.dap/assign.c [new file with mode: 0644]
gdb/testsuite/gdb.dap/assign.exp [new file with mode: 0644]
gdb/testsuite/gdb.dap/assign.py [new file with mode: 0644]