Handle the static link in FrameDecorator
authorTom Tromey <tromey@adacore.com>
Mon, 30 Oct 2023 16:52:20 +0000 (10:52 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 14 Nov 2023 15:44:31 +0000 (08:44 -0700)
commitebea770b19c09489fe5e2cb5c1fd568f0f21e17e
treeb66148ba32d50120a59dc533676609fa2b53c15f
parente9dacb1d6caa5770d3e1722adc0ec74ff13a7a89
Handle the static link in FrameDecorator

A co-worker requested that the DAP scope for a nested function's frame
also show the variables from outer frames.  DAP doesn't directly
support this notion, so this patch arranges to put these variables
into the inner frames "Locals" scope.

I chose to do this only for DAP.  For CLI and MI, gdb currently does
not do this, so this preserves the behavior.

Note that an earlier patch (see commit 4a1311ba) removed some code
that seemed to do something similar.  However, that code did not
actually work.
gdb/python/lib/gdb/FrameDecorator.py
gdb/testsuite/gdb.dap/ada-nested.exp [new file with mode: 0644]
gdb/testsuite/gdb.dap/ada-nested/prog.adb [new file with mode: 0644]