From b4350c9c25e6b9138ca0328c75265a7d8cf5eeb2 Mon Sep 17 00:00:00 2001 From: Rosalie Date: Thu, 24 Oct 2024 20:11:12 +0200 Subject: [PATCH] SDKtoGhidra: support Ghidra 10.3 (#51) --- SDKtoGhidra/GhidraScript/ImportSporeSDK.java | 25 +------------------- 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/SDKtoGhidra/GhidraScript/ImportSporeSDK.java b/SDKtoGhidra/GhidraScript/ImportSporeSDK.java index 20f8d2ad..d0e507d5 100644 --- a/SDKtoGhidra/GhidraScript/ImportSporeSDK.java +++ b/SDKtoGhidra/GhidraScript/ImportSporeSDK.java @@ -575,30 +575,7 @@ private static void removeCodeSymbol(SymbolTable symbolTable, Address address, S } private static String getCallingConvention(Function function, FunctionSignature signature, CompilerSpec compilerSpec) { - boolean preserveCallingConvention = false; - PrototypeModel preferredModel = null; - if (signature.getGenericCallingConvention() != GenericCallingConvention.unknown) { - preferredModel = compilerSpec.matchConvention(signature.getGenericCallingConvention()); - } - - PrototypeModel convention = function.getCallingConvention(); - if (convention == null || !preserveCallingConvention) { - convention = preferredModel; -// NOTE: This has been disable since it can cause imported signature information to be -// ignored and overwritten by subsequent analysis -// if (convention == null && compilerSpec.getCallingConventions().length > 1) { -// // use default source for signature if convention is really unknown so that we -// // know dynamic storage assignment is unreliable -// source = SourceType.DEFAULT; -// } - } - - // Calling convention is permitted to change - String conventionName = function.getCallingConventionName(); - if (!preserveCallingConvention && convention != null) { - conventionName = convention.getName(); - } - return conventionName; + return function.getCallingConventionName(); }