mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
GP-5248 fix calling convention checking and handling
This commit is contained in:
parent
0d3451c0c0
commit
05506d5210
2 changed files with 4 additions and 2 deletions
|
@ -189,7 +189,8 @@ public class FunctionDefinitionDataType extends GenericDataType implements Funct
|
||||||
|
|
||||||
if (GenericCallingConvention
|
if (GenericCallingConvention
|
||||||
.getGenericCallingConvention(conventionName) == GenericCallingConvention.unknown &&
|
.getGenericCallingConvention(conventionName) == GenericCallingConvention.unknown &&
|
||||||
(dataMgr == null || !dataMgr.getKnownCallingConventionNames().contains(name))) {
|
(dataMgr == null ||
|
||||||
|
!dataMgr.getKnownCallingConventionNames().contains(conventionName))) {
|
||||||
throw new InvalidInputException("Unknown calling convention name: " + conventionName);
|
throw new InvalidInputException("Unknown calling convention name: " + conventionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -703,7 +703,8 @@ public class HighFunctionDBUtil {
|
||||||
throws InvalidInputException {
|
throws InvalidInputException {
|
||||||
|
|
||||||
ParameterDefinition[] params = sig.getArguments();
|
ParameterDefinition[] params = sig.getArguments();
|
||||||
FunctionDefinitionDataType fsig = new FunctionDefinitionDataType("tmpname"); // Empty datatype, will get renamed later
|
FunctionDefinitionDataType fsig =
|
||||||
|
new FunctionDefinitionDataType("tmpname", function.getProgram().getDataTypeManager()); // Empty datatype, will get renamed later
|
||||||
fsig.setCallingConvention(sig.getCallingConventionName());
|
fsig.setCallingConvention(sig.getCallingConventionName());
|
||||||
fsig.setArguments(params);
|
fsig.setArguments(params);
|
||||||
fsig.setReturnType(sig.getReturnType());
|
fsig.setReturnType(sig.getReturnType());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue