Skip to content

Commit 4e3d5d3

Browse files
Merge pull request #981 from cla7aye15I4nd/dev
Fix some error handler in posix syscall
2 parents a6c8d71 + 873544c commit 4e3d5d3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

qiling/hw/gpio/stm32f4xx_gpio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def write(self, offset: int, size: int, value: int):
9898
if new_bit:
9999
self.set_pin(i)
100100
else:
101-
self.reset_pin(i - 16)
101+
self.reset_pin(i)
102102

103103
return
104104

qiling/os/posix/syscall/prctl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def ql_syscall_arch_prctl(ql: Qiling, code: int, addr: int):
2020
}
2121

2222
if code not in handlers:
23-
raise NotImplementedError(f'prctl code {code:#x} not implemented')
24-
25-
handlers[code]()
23+
ql.log.warning(f'prctl code {code:#x} not implemented')
24+
else:
25+
handlers[code]()
2626

2727
return 0
2828

qiling/os/posix/syscall/unistd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def ql_syscall_write(ql: Qiling, fd: int, buf: int, count: int):
266266
except:
267267
regreturn = -1
268268
else:
269-
ql.log.debug(f'write() CONTENT: {data.decode()!r}')
269+
ql.log.debug(f'write() CONTENT: {bytes(data)}')
270270

271271
if hasattr(ql.os.fd[fd], 'write'):
272272
ql.os.fd[fd].write(data)

0 commit comments

Comments
 (0)