ghidra icon indicating copy to clipboard operation
ghidra copied to clipboard

Convert literal value in switch case

Open ghidra007 opened this issue 3 years ago • 1 comments

Discussed in https://github.com/NationalSecurityAgency/ghidra/discussions/4337

Originally posted by 0x6D616473616D June 12, 2022 I'm able to convert the literal value in condition from hex value to decimal by right clicking on the literal value and the context menu shows me the various number systems to which I can convert this literal, but when I click on the literal in the switch case, it does not show me such options. Is there any way I can convert it as in the case of condition?

ghidra007 avatar Jul 13 '22 15:07 ghidra007

Currently cannot do this. Creating an issue for prioritization.

ghidra007 avatar Jul 13 '22 16:07 ghidra007

Apart from this, a much more annoying conversion to have to do in your head is for example from a uint8_t (displayed as a character constant) to any sane representation of an integer, or even better an enum

Mis012 avatar Mar 11 '23 13:03 Mis012