Scan functions for variables with the "in_" prefix and add them to parameters if found #8703
Replies: 7 comments
-
|
You can edit the function signature and fix it manually (according to the calling convention), e.g.:
|
Beta Was this translation helpful? Give feedback.
-
|
but i want to automate that process |
Beta Was this translation helpful? Give feedback.
-
|
Ghidra follows calling conventions for function arguments, the in_XXX means whatever code is using a different calling convention than is the default and it is your job to add the new calling convention to the project. You can manually edit it like gemesa suggested, or you can create a new calling convention spec file and import it to Ghidra. |
Beta Was this translation helpful? Give feedback.
-
|
this means that code using that function can't be recompiled, and i call them "invisible parameters" |
Beta Was this translation helpful? Give feedback.
-
|
What do you mean? By fixing the function signature (and defining the necessary types, e.g. replacing |
Beta Was this translation helpful? Give feedback.
-
|
compilers think that "in_" variables are uninitialized variables instead of parameters |
Beta Was this translation helpful? Give feedback.
-
|
That's because Ghidra follows the calling convention applied to a function, and it doesn't know about the particular convention your binary is using. You can easily add a new compiler convention that supports your binary, and no fixes to Ghidra are necessary. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The decompiler can miss input registers, e.g. "in_x8" in arm64 (mobile game smash hit)
Beta Was this translation helpful? Give feedback.
All reactions