10

Could you explain to me the information provided after the @ symbol in Hex-Rays decompilation ? For examples @1 and @5 in the following output:

struct WSAData wsadata; // [sp+0h] [bp-1A0h]@1
int v6; // [sp+198h] [bp-8h]@5
int v7; // [sp+19Ch] [bp-4h]@5

Hexrays Decompilation: Variable Declarations

perror
  • 19,083
  • 29
  • 87
  • 150
  • http://stackoverflow.com/questions/14728764/ida-pro-hex-rays-function-reconstruction-variables-eax34-etc – SSpoke Apr 22 '14 at 06:01
  • Like I said in the linked question, it seems to indicate the number of the basic block where this variable is first referenced. (To see basic blocks, switch to disassembly graph mode.) – DCoder Apr 22 '14 at 07:52

1 Answers1

8

The numbers denote the basic block number in the microcode where the variable was first used. Microcode basic blocks do not necessarily match the basics block in the disassembly, because during optimization steps the microcode basic blocks may be split, merged, added, or removed.

You can see some samples of microcode in Ilfak's whitepaper on the decompiler or in some of the old blog posts: 1 2 (block number is the first number on the line).

Igor Skochinsky
  • 36,553
  • 7
  • 65
  • 115