[0/3] Return a global scope from DAP scopes request

Message ID 20240516-dap-global-scope-v1-0-07c493009505@adacore.com
Headers
Series Return a global scope from DAP scopes request |

Message

Tom Tromey May 16, 2024, 6:01 p.m. UTC
  A co-worker asked that some global variables (in his case,
specifically package-scoped variables in Ada) be visible in the
response to the DAP "scopes" request.

This series implements this.  I wasn't completely sure what to call
the resulting scope.  I chose "globals" but really the scope here is
"globals local to the frame's CU".

---
Tom Tromey (3):
      Memoize gdb.Block and make them hashable
      Convert DAP disassemble code to use Block hashing
      Return global scope from DAP scopes request

 gdb/NEWS                              |   3 +
 gdb/data-directory/Makefile.in        |   1 +
 gdb/python/lib/gdb/dap/disassemble.py |   7 +-
 gdb/python/lib/gdb/dap/globalvars.py  |  97 +++++++++++++++++++++++
 gdb/python/lib/gdb/dap/scopes.py      |   4 +
 gdb/python/py-block.c                 | 143 +++++++++++++++++++---------------
 gdb/testsuite/gdb.dap/ptrref.exp      |   8 +-
 gdb/testsuite/gdb.dap/rust-slices.exp |   4 +-
 gdb/testsuite/gdb.python/py-block.exp |   4 +
 9 files changed, 199 insertions(+), 72 deletions(-)
---
base-commit: 89457440e4a4b71b1fe60ed3e034c814bf8eb6b7
change-id: 20240516-dap-global-scope-697eb53a080a

Best regards,
  

Comments

Tom Tromey June 4, 2024, 5:14 p.m. UTC | #1
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

Tom> A co-worker asked that some global variables (in his case,
Tom> specifically package-scoped variables in Ada) be visible in the
Tom> response to the DAP "scopes" request.

Tom> This series implements this.  I wasn't completely sure what to call
Tom> the resulting scope.  I chose "globals" but really the scope here is
Tom> "globals local to the frame's CU".

I minorly updated the NEWS change to reflect the gdb 15 release (moved
the text up to the new section).

I'm checking this in now.

Tom