Implement DAP "hover" context
authorTom Tromey <tromey@adacore.com>
Thu, 1 Jun 2023 17:54:17 +0000 (11:54 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 22 Jun 2023 15:46:24 +0000 (09:46 -0600)
commitd8a001f57016eff05977e9699c7aabdf4302c71b
tree8f52cf811c7b40b9168be6bd7f51e9dfa9e418fc
parent0aafd5d038581b1eaf7f37b185f9d2c9be47386d
Implement DAP "hover" context

A DAP client can request that an expression be evaluated in "hover"
context, meaning that it should not cause side effects.  In gdb, this
can be implemented by temporarily setting a few "may-" parameters to
"off".

In order to make this work, I had to also change "may-write-registers"
so that it can be changed while the program is running.  I don't think
there was any reason for this prohibition in the first place.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30476
gdb/python/lib/gdb/dap/evaluate.py
gdb/target.c
gdb/testsuite/gdb.dap/hover.c [new file with mode: 0644]
gdb/testsuite/gdb.dap/hover.exp [new file with mode: 0644]