Skip to content

Commit

Permalink
Made most debugging output optional. Less noisy output.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosgprado committed Feb 7, 2022
1 parent 903f3f8 commit 50e646c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions FIDL/decompiler_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1543,21 +1543,21 @@ def _get_block_successor(self, block):
try:
succs = list(self.i_cfg.successors(block.index))
if len(succs) > 1:
print("More than one successor!")
print("Check this out")
dprint("More than one successor!")
dprint("Check this out")

if succs:
succ = succs[0]
else:
succ = None
except nx.NetworkXError as e:
print("_get_block_successor: {}".format(e))
dprint("_get_block_successor: {}".format(e))
succ = None

if not succ:
print("Block: {:#08x}".format(block.ea))
print(" succs: {}".format(succs))
print(" No successor! Take a look into this!")
dprint("Block: {:#08x}".format(block.ea))
dprint(" succs: {}".format(succs))
dprint(" No successor! Take a look into this!")

return succ

Expand Down Expand Up @@ -2374,8 +2374,8 @@ def find_all_calls_to_within(f_name, ea=0, c=None):
try:
c = controlFlowinator(ea=ea, fast=False)
except Exception as e:
print("Failed to find_all_calls_to_within {}".format(f_name))
print(e)
dprint("Failed to find_all_calls_to_within {}".format(f_name))
dprint(e)
return []

for co in c.calls:
Expand Down

0 comments on commit 50e646c

Please sign in to comment.