mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-01-09 14:08:03 -05:00
GP-5216 Correct BSim signature apply bug
This commit is contained in:
@@ -381,16 +381,17 @@ public class FunctionUtility {
|
||||
return sourceConv;
|
||||
}
|
||||
boolean applyConventionName = sameLanguageAndCompilerSpec;
|
||||
if (applyConventionName) {
|
||||
String callingConvention = sourceFunction.getCallingConventionName();
|
||||
if (applyConventionName &&
|
||||
!CompilerSpec.CALLING_CONVENTION_default.equals(callingConvention)) {
|
||||
DataTypeManager dtMgr = destinationFunction.getProgram().getDataTypeManager();
|
||||
String name = destinationFunction.getCallingConventionName();
|
||||
if (GenericCallingConvention
|
||||
.getGenericCallingConvention(name) == GenericCallingConvention.unknown &&
|
||||
!dtMgr.getKnownCallingConventionNames().contains(name)) {
|
||||
if (GenericCallingConvention.getGenericCallingConvention(
|
||||
callingConvention) == GenericCallingConvention.unknown &&
|
||||
!dtMgr.getKnownCallingConventionNames().contains(callingConvention)) {
|
||||
applyConventionName = false;
|
||||
}
|
||||
}
|
||||
return applyConventionName ? sourceFunction.getCallingConventionName()
|
||||
return applyConventionName ? callingConvention
|
||||
: destinationFunction.getCallingConventionName();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user