Some DAP requests, like "evaluate", support a 'format' parameter of type 'ValueFormat'. This isn't supported in gdb, but maybe could be. This may require an extension to the pretty-printer API.
I suspect all that is needed is to wrap the calls in: with output-radix 16 ...
I have a patch to do this, but I haven't written tests yet. Also, my patch does not handle StackFrameFormat. It's not entirely clear how this is supposed to be done.
https://sourceware.org/pipermail/gdb-patches/2023-July/201107.html
I think I may have accidentally removed the target milestone from the wrong PR (looks like bugzilla is automatically getting me to my next PR as soon as I hit "save", rather than staying on the same PR). Sorry about that! putting it back.
The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e13769988480865662e8347ed9f131ce0b8f5afc commit e13769988480865662e8347ed9f131ce0b8f5afc Author: Tom Tromey <tromey@adacore.com> Date: Tue Jul 25 10:13:52 2023 -0600 Implement ValueFormat for DAP This patch implements ValueFormat for DAP. Currently this only means supporting "hex". Note that StackFrameFormat is defined to have many more options, but none are currently recognized. It isn't entirely clear how these should be handled. I'll file a new gdb bug for this, and perhaps an upstream DAP bug as well. New in v2: - I realized that the "hover" context was broken, and furthermore that we only had tests for "hover" failing, not for it succeeding. This version fixes the oversight and adds a test. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30469
Fixed.