Skip to content

Commit

Permalink
GUI: Identify events in traces and fix issue with printing of zero va…
Browse files Browse the repository at this point in the history
…lue call arguments.
  • Loading branch information
jim-carciofini committed Nov 19, 2024
1 parent b545f7d commit 6e2c329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pate_binja/pate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ def pprint_memory_ops(memory_op: dict, pre: str = '', out: IO = sys.stdout, prun
if memory_op.get('mem_op'):
pprint_mem_op(memory_op['mem_op'], pre, out, prune_zero)
elif memory_op.get('external_call'):
out.write(f'{pre}{memory_op["external_call"]}({",".join(map(pretty_call_arg, memory_op["args"]))})\n')
out.write(f'{pre}Event {memory_op["external_call"]}({",".join(map(pretty_call_arg, memory_op["args"]))})\n')
else:
out.write(f'{pre}Unknown mem op: {memory_op}')

Expand All @@ -1485,7 +1485,7 @@ def pprint_mem_op(mem_op: dict, pre: str = '', out: IO = sys.stdout, prune_zero:


def pretty_call_arg(arg):
if isinstance(arg, dict) and arg.get('data_expr'):
if isinstance(arg, dict) and 'data_expr' in arg:
return str(arg['data_expr'])
else:
return str(arg)
Expand Down

0 comments on commit 6e2c329

Please sign in to comment.