feat: Ignore __$ReturnUdt in template functions

This commit is contained in:
jonschz 2024-06-16 12:23:06 +02:00
parent 3737b2df8b
commit 3be0665136

View File

@ -168,11 +168,16 @@ def _parameter_lists_match(self, ghidra_params: "list[Parameter]") -> bool:
if stack_match is None: if stack_match is None:
logger.debug("Not found on stack: %s", ghidra_arg) logger.debug("Not found on stack: %s", ghidra_arg)
return False return False
# "__formal" is the placeholder for arguments without a name
if ( if stack_match.name.startswith("__formal"):
stack_match.name != ghidra_arg.getName() # "__formal" is the placeholder for arguments without a name
and not stack_match.name.startswith("__formal") continue
):
if stack_match.name == "__$ReturnUdt":
# These appear in templates and cannot be set automatically, as they are a NOTYPE
continue
if stack_match.name != ghidra_arg.getName():
logger.debug( logger.debug(
"Argument name mismatch: expected %s, found %s", "Argument name mismatch: expected %s, found %s",
stack_match.name, stack_match.name,