Igor’s Tip of the Week #165: Defining floating-point data

IDA supports different representations for the instruction operands and data items. However, only the most common of them are listed in the context menu or have hotkeys assigned. Let’s imagine that you’ve discovered an area in a firmware binary which looks like a table of floating-point values:

You can confirm that it looks plausible by switching the representation in the Hex View:

However, in the disassembly it’s just plain hex bytes:

How to make a nice table of floating-point values? You have two options:

  1. make items or arrays of integers (dwords in this case) and then change their representation to floating-point (Edit > Operand type > Number > Floating point):
  2. directly create floating-point data using the Options > Setup data types… dialog (Shortcut Alt–D). You can quickly pick a data item to create by pressing the underlined accelerator key (e.g. F for float or U for double):

    as usual, after creating one item, you can use * to create an array

NB: Tbyte (aka ten-byte) corresponds to the legacy 80-bit extended precision format used in the original 8087 floating point coprocessor and its descendants. It is rarely encountered outside of legacy DOS or Windows software.

See also:

Igor’s tip of the week #46: Disassembly operand representation

Igor’s tip of the week #10: Working with arrays

Igor’s tip of the week #38: Hex view

Article Link: Igor’s Tip of the Week #165: Defining floating-point data – Hex Rays