From 7403286961bb803174c7bd122192310cf8f36343 Mon Sep 17 00:00:00 2001 From: Alexander Wagner Date: Tue, 28 Feb 2023 15:32:42 +0100 Subject: [PATCH] analyze/datastub/printer: Minor restructure --- analysis/datastub/printer.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/analysis/datastub/printer.py b/analysis/datastub/printer.py index 388f9998..94dcf997 100644 --- a/analysis/datastub/printer.py +++ b/analysis/datastub/printer.py @@ -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)