User forums > Help
How to set watches to Hexidecimal?
thela_kid:
Hi, I'm trying to debug my program by looking at the local variables in the watches window, however there doesn't seem to be a way to view these values as HEX or binary. How can I do this?
oBFusCATed:
Unfortunately this is not possible for the locals.
You have to add separate watch variables and then right click -> properties -> hexadecimal.
As far as I can see there is no way to tell gdb to list locals or args in hexadecimal format.
C::B uses 'info locals' and 'info args' commands.
thela_kid:
I see, thank you.
ca1e:
--- Quote from: oBFusCATed on January 24, 2015, 11:06:38 am ---Unfortunately this is not possible for the locals.
You have to add separate watch variables and then right click -> properties -> hexadecimal.
As far as I can see there is no way to tell gdb to list locals or args in hexadecimal format.
C::B uses 'info locals' and 'info args' commands.
--- End quote ---
- i have an array of many variables
- they are memory pointers
- in this case, decimal integers are not useful
- right-clicking every single variable not possible
currently i am using windows calculator to convert from decimal to hex, because it is faster than;
- adding a new watchlist entry for a variable
- then right-clicking it
- then ticking a box in a a popup window
it is now 2019. is it possible with today's technology to display a hex number?
BlueHazzard:
You select your array variable, you rightclick->Add watch
you select the watch in the watches window->right click->properties->Format->hex
Then you select start and count for the amount of array entries you want to watch
now you can view the whole array in hex...
If you are talking about c++ std::array things will get complicated. Then you will have to write some python script for gdb....
Navigation
[0] Message Index
[#] Next page
Go to full version