Skip to content

Commit

Permalink
SDKtoGhidra: support Ghidra 10.3 (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 authored Oct 24, 2024
1 parent 3f4eeb1 commit b4350c9
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions SDKtoGhidra/GhidraScript/ImportSporeSDK.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}


Expand Down

0 comments on commit b4350c9

Please sign in to comment.