diff --git a/src/fuzz_introspector/frontends/datatypes.py b/src/fuzz_introspector/frontends/datatypes.py index b3c982a1..40fbc395 100644 --- a/src/fuzz_introspector/frontends/datatypes.py +++ b/src/fuzz_introspector/frontends/datatypes.py @@ -186,6 +186,15 @@ def get_cross_references(self, src_func: Any) -> list[Any]: return xrefs + def get_cross_references_by_name(self, function_name) -> list[Any]: + """Get cross reference functions by a target function name.""" + xrefs = [] + for func in self.all_functions: + for callsite in func.base_callsites: + if callsite[0] == function_name: + xrefs.append(func) + return xrefs + def find_function_by_name(self, target_function_name, only_exact_match): """Helper function to find the matching function.""" for function in self.all_functions: