Skip to content

Commit

Permalink
analyze/datastub/printer: Minor restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
aewag committed Mar 13, 2023
1 parent 63aea5c commit 7403286
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions analysis/datastub/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,15 @@ def doprint(self, text, ip, leak):
self.outstream.write(" " * self.depth)
if len(text) > 0:
self.outstream.write(text + " ")

sym = None
if SymbolInfo.isopen():
sym = SymbolInfo.lookup(ip)
if sym is not None:
self.outstream.write(escape(sym.strat(ip)))
else:
self.outstream.write(hex(ip))
else:
if sym is None:
self.outstream.write(hex(ip))
else:
self.outstream.write(escape(sym.strat(ip)))

self.outstream.write("\n")
if leak is not None:
leak.doprint(self)
Expand Down

0 comments on commit 7403286

Please sign in to comment.