Fixup method name in decompiler & function window #6761
Replies: 3 comments 5 replies
-
It sounds like you are running into an issue where you have set the label at the function's entry point to be the demangled name ( There is no feature in Ghidra that will attempt to consolidate multiple labels at an address with each other or with the function signature. If you have the same pattern repeated in your program, then you should be able to write a script to detect this condition and make any fixes you need, for example, to change the function signature to match the demangled name, if that is preferred. |
Beta Was this translation helpful? Give feedback.
-
Well, this signature used in |
Beta Was this translation helpful? Give feedback.
-
No way I know of. Ghidra currently enforces, at the function's entry point, that the primary label matches the function signature's name. |
Beta Was this translation helpful? Give feedback.
-
Both name and signature defined by user's script. For example, demangled name is
Core::Main::Init()
and signature isvoid Main_Init()
. Because there's can be more than oneInit
, signature contains class name (Main
).Name set using
DemanglerCmd
,createLabel
as fallback and signature withApplyFunctionSignatureCmd
.In decompiler it looks like
Core::Main::Main_Init
, instead of expectedCore::Main::Init
.In functions window ghidra shows signature (
Main_Init
) inName
field (howewer, if I manually remove this column and selectFunction Name
below, it will show demangled name as in decompiler).So, my question is can ghidra automatically detect and remove duplicates in name, like
Core::Main::Main_Init
->Core::Main::Init
. If no, is there script example to do it?Beta Was this translation helpful? Give feedback.
All reactions