Handle pointers and references correctly in DAP
authorTom Tromey <tromey@adacore.com>
Tue, 5 Sep 2023 15:13:14 +0000 (09:13 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 19 Sep 2023 19:28:42 +0000 (13:28 -0600)
commita56e5dce69bfad45ee6977a916ccea283e087e8b
treeb148946dc952568db690c2ed14569d70efd8545c
parent76fc0f62138e0fa1ec1feeefed7e603d52e83af7
Handle pointers and references correctly in DAP

A user pointed out that the current DAP variable code does not let the
client deference a pointer.  Oops!

Fixing this oversight is simple enough -- adding a new no-op
pretty-printer for pointers and references is quite simple.

However, doing this naive caused a regession in scopes.exp, which
expected there to be no children of a 'const char *' variable.  This
problem was fixed by the preceding patches in the series, which ensure
that a C type of this kind is recognized as a string.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30821
gdb/python/lib/gdb/printing.py
gdb/testsuite/gdb.dap/ptrref.cc [new file with mode: 0644]
gdb/testsuite/gdb.dap/ptrref.exp [new file with mode: 0644]