GNOME Bugzilla – Bug 580316
Change the output format of the variables shown in the variables tab
Last modified: 2020-03-10 11:55:42 UTC
It would be very nice to be able to change the output formats (http://sourceware.org/gdb/current/onlinedocs/gdb_10.html#SEC70) of the variables shown in the variables tab. Currently, if you right-click in any variable, a menu appears showing only one option: "dereference the pointer". Another option could be "Output formats" which could show a submenu with the following options: * Hexadecimal * Signed decimal * Unsigned decimal * Float * Character * String From all those options you could select one (the current format should be shown checked) that will change the format used to display the variable.
Indeed. I have started a branch to work on this. You can browse its content at http://git.gnome.org/browse/nemiver/log/?h=better-variable-format I will probably be working on adding suport for GDB pretty printers in that branch too. This would help close the enhancement request #447906 I will use this bug to track the progress of this meta feature. Thank you for reporting this.
Any news on this? The branch doesn't seem to have been touched for a couple of years? In any case I'd dearly love to be able to show a char[] as a string (or even a short * as a string in some of the code I work with...) or an integer in hex.
Sigh, I guess I got sidetracked by the GDB pretty printers work that happened in that branch, and that landed in master a couple of years ago. I then forgot about the format stuff. But I really do want to have this feature. I'll try to get back to it soon. Thank you for pinging me on this.
Closing all open Nemiver tasks as this project does not seem to be maintained anymore. Please see https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/235#note_732192 for further information. Thanks!