diff --git a/qiling/hw/gpio/stm32f4xx_gpio.py b/qiling/hw/gpio/stm32f4xx_gpio.py index f93e75bb..dca8d2d4 100644 --- a/qiling/hw/gpio/stm32f4xx_gpio.py +++ b/qiling/hw/gpio/stm32f4xx_gpio.py @@ -98,7 +98,7 @@ class STM32F4xxGpio(QlPeripheral, GpioHooks): if new_bit: self.set_pin(i) else: - self.reset_pin(i - 16) + self.reset_pin(i) return diff --git a/qiling/os/posix/syscall/prctl.py b/qiling/os/posix/syscall/prctl.py index fabaa3bb..3652c2bd 100644 --- a/qiling/os/posix/syscall/prctl.py +++ b/qiling/os/posix/syscall/prctl.py @@ -20,9 +20,9 @@ def ql_syscall_arch_prctl(ql: Qiling, code: int, addr: int): } if code not in handlers: - raise NotImplementedError(f'prctl code {code:#x} not implemented') - - handlers[code]() + ql.log.warning(f'prctl code {code:#x} not implemented') + else: + handlers[code]() return 0 diff --git a/qiling/os/posix/syscall/unistd.py b/qiling/os/posix/syscall/unistd.py index 682108bf..0f8a1f7c 100644 --- a/qiling/os/posix/syscall/unistd.py +++ b/qiling/os/posix/syscall/unistd.py @@ -266,7 +266,7 @@ def ql_syscall_write(ql: Qiling, fd: int, buf: int, count: int): except: regreturn = -1 else: - ql.log.debug(f'write() CONTENT: {data.decode()!r}') + ql.log.debug(f'write() CONTENT: {bytes(data)}') if hasattr(ql.os.fd[fd], 'write'): ql.os.fd[fd].write(data)