mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
Merge branch 'GP-2308_1633_ghidra1_FunctionDefinitionCallingConventions'
(Closes #4537, Closes #4898, Closes #3723, Closes #3267)
This commit is contained in:
commit
2cdaebf0c3
273 changed files with 8249 additions and 3415 deletions
|
@ -85,9 +85,7 @@ public class FunctionSignatureStringable extends Stringable {
|
|||
this.signatureSource = function.getSignatureSource();
|
||||
this.hasCustomStorage = function.hasCustomVariableStorage();
|
||||
|
||||
GenericCallingConvention guessedCallingConvention =
|
||||
GenericCallingConvention.guessFromName(function.getCallingConventionName());
|
||||
isThisCall = (guessedCallingConvention == GenericCallingConvention.thiscall);
|
||||
isThisCall = CompilerSpec.CALLING_CONVENTION_thiscall.equals(callingConventionName);
|
||||
|
||||
// ignore source from function return which is same as signature source
|
||||
returnInfo = getParameterInfo(function.getReturn(), SourceType.DEFAULT);
|
||||
|
@ -531,7 +529,7 @@ public class FunctionSignatureStringable extends Stringable {
|
|||
if (hasCustomStorage != toFunction.hasCustomVariableStorage()) {
|
||||
// This should only change to use custom storage if same language.
|
||||
boolean sameLanguage =
|
||||
FunctionUtility.isSameLanguage(toFunction.getProgram(), program);
|
||||
FunctionUtility.isSameLanguageAndCompilerSpec(toFunction.getProgram(), program);
|
||||
if (!hasCustomStorage || (hasCustomStorage && sameLanguage)) {
|
||||
useCustomStorage = hasCustomStorage;
|
||||
}
|
||||
|
@ -673,7 +671,7 @@ public class FunctionSignatureStringable extends Stringable {
|
|||
}
|
||||
if (callFixupChoice == ReplaceChoices.REPLACE) {
|
||||
// Check that you have the same cspec before trying to apply call fixup.
|
||||
if (FunctionUtility.isSameLanguage(toFunction.getProgram(), program)) {
|
||||
if (FunctionUtility.isSameLanguageAndCompilerSpec(toFunction.getProgram(), program)) {
|
||||
toFunction.setCallFixup(fromFunctionCallFixup);
|
||||
}
|
||||
}
|
||||
|
@ -692,7 +690,7 @@ public class FunctionSignatureStringable extends Stringable {
|
|||
|
||||
switch (callingConventionChoice) {
|
||||
case SAME_LANGUAGE:
|
||||
if (FunctionUtility.isSameLanguage(program, toProgram)) {
|
||||
if (FunctionUtility.isSameLanguageAndCompilerSpec(program, toProgram)) {
|
||||
return callingConventionName;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue