Skip to content

Commit

Permalink
remove extra print
Browse files Browse the repository at this point in the history
  • Loading branch information
clearbluejar committed Dec 15, 2023
1 parent 0269420 commit b0c20e0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ghidriff/ghidra_diff_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,22 +344,24 @@ 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
called_funcs.append(f'{f}-{count}')

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:
Expand Down

0 comments on commit b0c20e0

Please sign in to comment.