User Manual

(the manual describes the build 181105)

Hex-Rays interactive operation: Set call type

In some cases, especially for indirect calls, the decompiler cannot correctly detect call arguments. The 'Set call type' command sets the type of the function call at the current item without changing the prototype of the called function itself. So there is a difference bewteen 'Set call type' and Set type commands. Let us assume that there is a call

        v1 = off_5C6E4(a1); 

and that the decompiler erroneously detected one argument whereas four arguments actually are present. If the user sets the new call type as

        int (*)(int, int, int, int)

then the call will be transformed into

        v1 = ((int (__cdecl *)(int, int, int, int))off_5C6E4)(a1, a2, a3, a4);

and the type of off_5C6E4 will remain unchanged. Note that in this case the user can revert the call to the previous state using the Force call type command.

The Set type command will have a different effect:

        v1 = off_5C6E4(a1, a2, a3, a4);

It sets the new type for off_5C6E4 that will cause changes to all places where off_5C6E4 is called, including the current call.

NOTE: Behind the scenes the 'Set call type' command, like Force call type, copies the entered type to the operand of the call instruction. Actually it is a shortcut to Edit, Operand type, Set operand type in the disassembly view while staying on the call instruction.

See also: interactive operation