8

There are a few places where the decompiler displays a number as a hex literal when it's much clearer as a decimal literal. How do I change this?

hippietrail
  • 515
  • 4
  • 17
0x777C
  • 183
  • 1
  • 7

1 Answers1

3

Right click on the number

Convert -> Unsigned Decimal:

enter image description here

Simeon Pilgrim
  • 942
  • 6
  • 15
  • 5
    This works in the disassembler output window ("Listing") but there's no "Convert" entry for numbers in the decompiler output window ("Decompile"). – piotrek May 02 '19 at 10:41
  • 1
    so true, I missed the "Decompile" word distinction in the question – Simeon Pilgrim May 02 '19 at 21:06
  • interesting also change a number to a const/enum using Equate in the Listing window, it is not respected in the disassembly window. Sounds like a bug report should be opened. – Simeon Pilgrim May 02 '19 at 22:11
  • 1
    Just checked and there's one already open: https://github.com/NationalSecurityAgency/ghidra/issues/21 – piotrek May 03 '19 at 07:42
  • This fixes the decompiler output nonetheless. – 0x777C May 03 '19 at 21:41