Add DAP scope cache
authorTom Tromey <tromey@adacore.com>
Wed, 27 Sep 2023 17:48:24 +0000 (11:48 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 16 Oct 2023 14:40:18 +0000 (08:40 -0600)
commited5504c7b6f53ee3343ddd44ad2c8d28b00f7641
treebb61e2286de3dcadae023e31693e2ba8347117b3
parent1d45d90934b10862c00a22bcf4075815a785001b
Add DAP scope cache

Andry Ogorodnik, a co-worker, noticed that multiple "scopes" requests
with the same frame would yield different variableReference values in
the response.

This patch adds a regression test for this, and adds a scope cache in
scopes.py, ensuring that multiple identical requests will get the same
response.

Tested-By: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
gdb/python/lib/gdb/dap/scopes.py
gdb/testsuite/gdb.dap/scopes.exp