]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Do not allow DAP clients to dereference "void *"
authorTom Tromey <tromey@adacore.com>
Tue, 29 Jul 2025 13:48:21 +0000 (07:48 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 11 Aug 2025 13:39:10 +0000 (07:39 -0600)
commitddd2795c52228cbbdf11aa95e11b68647b10df88
tree830a5899a4f514f4de280f65b56b41faecd968b0
parent3c64cee8151d925ac3c438026074a2a1491e275f
Do not allow DAP clients to dereference "void *"

While investigating a different bug, I noticed that the DAP code would
report a "void *"-typed register as having children -- however,
requesting the children of this register would fail.

The issue here is that a plain "void *" can't be dereferenced.  This
patch changes the default visualizer to treat a "void *" as a scalar.

This adds a new test; but also arranges to examine all the returned
registers -- this was the first thing I attempted and it seemed
reasonable to have a test that double-checks that all the registers
really can be dereferenced as appropriate.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33228
gdb/python/lib/gdb/printing.py
gdb/testsuite/gdb.dap/scopes.c
gdb/testsuite/gdb.dap/scopes.exp