Skip to content

Commit 938710b

Browse files
committed
Fix read and write log output
1 parent 6356fdb commit 938710b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qiling/os/posix/syscall/unistd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def ql_syscall_read(ql: Qiling, fd, buf: int, length: int):
248248
data = ql.os.fd[fd].read(length)
249249
ql.mem.write(buf, data)
250250

251-
ql.log.debug(f'read() CONTENT: {data}')
251+
ql.log.debug(f'read() CONTENT: {repr(data.decode())}')
252252
regreturn = len(data)
253253
except:
254254
regreturn = -EBADF
@@ -263,7 +263,7 @@ def ql_syscall_write(ql: Qiling, fd: int, buf: int, count: int):
263263
data = ql.mem.read(buf, count)
264264

265265
if data:
266-
ql.log.debug(f'write() CONTENT: {data}')
266+
ql.log.debug(f'write() CONTENT: {repr(data.decode())}')
267267

268268
if hasattr(ql.os.fd[fd], 'write'):
269269
ql.os.fd[fd].write(data)

0 commit comments

Comments
 (0)