Ghidra: Ensure function names are set correctly in all cases
This commit is contained in:
@@ -28,8 +28,9 @@ def DefineCode(code):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def SetFunctionType(addr, sig):
|
def SetFunctionType(addr, sig):
|
||||||
|
MakeFunction(addr)
|
||||||
typeSig = CParserUtils.parseSignature(None, currentProgram, sig)
|
typeSig = CParserUtils.parseSignature(None, currentProgram, sig)
|
||||||
ApplyFunctionSignatureCmd(toAddr(addr), typeSig, SourceType.USER_DEFINED).applyTo(currentProgram)
|
ApplyFunctionSignatureCmd(toAddr(addr), typeSig, SourceType.USER_DEFINED, False, True).applyTo(currentProgram)
|
||||||
|
|
||||||
def SetType(addr, type):
|
def SetType(addr, type):
|
||||||
if type.startswith('struct '):
|
if type.startswith('struct '):
|
||||||
|
|||||||
Reference in New Issue
Block a user