Skip to content

Commit 706eebc

Browse files
committed
Fix disasm logging to be on one line again
Remove custom logging prefixes (the logger now handles that)
1 parent 3f66571 commit 706eebc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

qiling/os/utils.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,22 +242,23 @@ def disassembler(self, ql, address, size):
242242
insn = md.disasm(tmp, address)
243243
opsize = int(size)
244244

245-
logging.info( ("[+] 0x%x" % (address)).ljust( (self.ql.archbit // 8) + 15))
245+
log_data = ("0x%x" % (address)).ljust( (self.ql.archbit // 8) + 15)
246246

247247
temp_str = ""
248248
for i in tmp:
249249
temp_str += ("%02x " % i)
250-
logging.info(temp_str.ljust(30))
250+
log_data += temp_str.ljust(30)
251251

252252
for i in insn:
253-
logging.info("%s %s" % (i.mnemonic, i.op_str))
253+
log_data += "%s %s" % (i.mnemonic, i.op_str)
254+
logging.info(log_data)
254255

255256
if self.ql.output == QL_OUTPUT.DUMP:
256257
for reg in self.ql.reg.register_mapping:
257258
if isinstance(reg, str):
258259
REG_NAME = reg
259260
REG_VAL = self.ql.reg.read(reg)
260-
logging.debug("[-] %s\t:\t 0x%x" % (REG_NAME, REG_VAL))
261+
logging.debug("%s\t:\t 0x%x" % (REG_NAME, REG_VAL))
261262

262263
def setup_output(self):
263264
if self.output_ready:

0 commit comments

Comments
 (0)