With ghidra 9.2.1 (2020 dec 15) in a decompiled dll, I can rename a variable with L.

  • Sometimes (can't find a repro), when I rename a second local variable (it does not appear in listing/assembly), the previous rename is cancelled.

  • Sometimes (idem), I can't rename one specific variable at all.

What am I missing ?

  • 3
    I've encountered similar rename issues multiple times since Ghidra was initially released. I haven't been able to track down a root cause or solution, unfortunately. Point being, I don't think you're missing anything; Ghidra just has rename issues sometimes. Maybe related: github.com/NationalSecurityAgency/ghidra/issues/193 Jan 20, 2021 at 6:33

1 Answer 1


I don't have a real answer but a few hints that might help solving the issue at hand:

As already stated in the comments, Ghidra still has a few issues, one example being: https://github.com/NationalSecurityAgency/ghidra/issues/193. So maybe, you should open up another issue on Github using the most recent Ghidra version and a minimum example to reproduce the issue. In my experience, the developers are very helpful and react to every opened issue.

After renaming a variable, Ghidra will re-run the analysis of the currently displayed function. In some phase of this analysis it then seems to decide to get rid of the variable you just renamed. And for some reason it then sometimes decides to introduce a new variable doing the exact same thing your renamed (and now removed) variable did before with a new name. This effectively looks as if the rename was canceled.

In my experience it sometimes help to Commit Local Names and/or Commit Params/Return (select it from the context menu of the Decompiler view). I realize, this is not a satisfying answer because I myself don't know exactly what's going on there, but from a practical perspective this solved the problem for me multiple times, so it might help you as well.

Your Answer

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

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