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

2
  • 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, 2014 at 7:52

1 Answer 1

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).

1
  • Hi, thanks for your answer, I think the link to the whitepaper on the decompiler should be updated :) . Sep 24, 2020 at 1:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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