diff --git a/ghidriff/ghidra_diff_engine.py b/ghidriff/ghidra_diff_engine.py index 11a81c1..1a78dc8 100644 --- a/ghidriff/ghidra_diff_engine.py +++ b/ghidriff/ghidra_diff_engine.py @@ -344,13 +344,13 @@ def enhance_sym(self, sym: 'ghidra.program.model.symbol.Symbol', thread_id: int MAX_FUNC_REFS = 2000 for f in func.getCalledFunctions(monitor): - print(len(f.symbol.references)) count = 0 - if len(f.symbol.references) > MAX_FUNC_REFS: - self.logger.debug(f'Skipping {func} count calling, too many refs') + ref_count = len(f.symbol.references) + + if ref_count > MAX_FUNC_REFS: + self.logger.debug(f'Skipping {func} count calling, too many refs: {ref_count}') called_funcs.append(f'{f}') else: - for ref in f.symbol.references: if func.getBody().contains(ref.fromAddress, ref.fromAddress): count += 1 @@ -358,8 +358,10 @@ def enhance_sym(self, sym: 'ghidra.program.model.symbol.Symbol', thread_id: int for f in func.getCallingFunctions(monitor): count = 0 - if len(f.symbol.references) > MAX_FUNC_REFS: - self.logger.debug(f'Skipping {func} count calling, too many refs') + ref_count = len(f.symbol.references) + + if ref_count > MAX_FUNC_REFS: + self.logger.debug(f'Skipping {func} count calling, too many refs: {ref_count}') calling_funcs.append(f'{f}') else: for ref in func.symbol.references: