I'm relatively new to IDA. Recently I was disassembling an ARM binary that contains some signal processing routines. One of the data tables used by the routine is an array of floats, and one of those floats is -0.0 (encoded as 0x80000000). When I try to get IDA to convert this into a float, it refuses and just yields "DB 0,0,0,0x80".

The problem is that this single "invalid" entry is making it impossible for me to convert the region into an array. Instead I have to split the array into two halves, which is awkward.

Is this a known issue? Can I force an array to be created even if some of the elements are invalid?

  • 1
    You'll probably get a better answer from Igor later, but i'd just convert the bytes to 0x00000000 (press F2 in hex view, edit, then F2 again) to make them valid. May 28 '14 at 19:31
  • Convert it to dq instead problem solved or better Edit-> Operand type -> Number -> Floating point sometimes are just manually need to be fixed.
    – SSpoke
    May 29 '14 at 2:19
  • Also press Alt+D or (Options -> Setup data types...) and check float/double and whatever else you need so you can now do the D key
    – SSpoke
    May 29 '14 at 2:29
  • @SSpoke: I have already checked float there. Conversions using D work for most of the other floats in the array, just not this one.
    – nneonneo
    May 29 '14 at 3:04
  • @SSpoke: DQ is a quadword, right? How does that help me?
    – nneonneo
    Jun 24 '14 at 1:09

Ok, I find an area in a ARM bin, that was

RAM0:100DE337                 DCB    0
RAM0:100DE338                 DCB    0
RAM0:100DE339                 DCB    0
RAM0:100DE33A                 DCB 0x80 ; Ç

selecting Edit | Operand type | Number | Floating point results in:

RAM0:100DE337                 DCB 0, 0, 0, 0x80

Using Alt-D means I can now toggle between byte, word, dword, and above 'float'

having it in above form, then going to Hex View, pressing F2 to edit to all 0x00, F2, and returning to Asm View and 0.0 is shown, then returning to Hex and resetting 0x80 value, results in above float format again.

changing the 0x80 to 0x70 shows 1.5846e29 which matches what an Online Float converter shows for 0x70000000, and on that site 0x80000000 is -0.0 as in original question. Given the value is -0, Guntram's suggest of just turning it to zero makes the most sense to manage the "issue"

Tested with Version 6.6.140605 (32-bit)

  • OK, so this is a workaround. I guess it'll have to do...but it's a bit of a PITA with arrays that have a few "-0" in the middle.
    – nneonneo
    Jun 24 '14 at 1:08
  • Yes, but it would seem worth reporting on the IDA forum is you want a real answer/it fixed. Jun 24 '14 at 2:00
  • You again? Email Ilfak. Or find the bit in IDA that handles this and patch it. Jun 26 '14 at 21:01
  • @offbyseveral is that comment aimed at me or @nneonneo? Jun 26 '14 at 22:12
  • OP, unless different from recent asker of same question and if it's a different person from last time then sorry for the 'you again'. I guess I meant the bug. Sorry I don't have the reference for the previous question. Yes it's a bug, yes it does suck. Luckily it hasn't troubled me directly. There'll probably be a good response if it gets reported. Jun 26 '14 at 22:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.