diff --git a/qiling/arch/cortex_m_const.py b/qiling/arch/cortex_m_const.py index 8f915163d..7f3d2eb49 100644 --- a/qiling/arch/cortex_m_const.py +++ b/qiling/arch/cortex_m_const.py @@ -31,6 +31,7 @@ "apsr": UC_ARM_REG_APSR, "ipsr": UC_ARM_REG_IPSR, "epsr": UC_ARM_REG_EPSR, + "cpsr": UC_ARM_REG_CPSR, "primask": UC_ARM_REG_PRIMASK, "faultmask": UC_ARM_REG_FAULTMASK, "basepri": UC_ARM_REG_BASEPRI, diff --git a/qiling/debugger/qdb/qdb.py b/qiling/debugger/qdb/qdb.py index 4914af6ed..f466b41ff 100644 --- a/qiling/debugger/qdb/qdb.py +++ b/qiling/debugger/qdb/qdb.py @@ -117,7 +117,14 @@ def _run(self, address: int = 0, end: int = 0, count: int = 0) -> None: if getattr(self.ql.arch, 'is_thumb', False): address |= 1 - self.ql.emu_start(begin=address, end=end, count=count) + # assume we're running PE if on Windows + if self.ql.os.type == QL_OS.WINDOWS: + self.ql.count = count + self.ql.entry_point = address + self.ql.os.run() + + else: + self.ql.emu_start(begin=address, end=end, count=count) def save_reg_dump(func) -> None: """