From b0c20e0f93eca153aeba7bb8267e8be36711b81d Mon Sep 17 00:00:00 2001 From: clearbluejar <3752074+clearbluejar@users.noreply.github.com> Date: Fri, 15 Dec 2023 21:26:28 +0000 Subject: [PATCH] remove extra print --- ghidriff/ghidra_diff_engine.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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: