From 5f2f1059d3542af2684188fd511659543f240961 Mon Sep 17 00:00:00 2001 From: ucgJhe Date: Tue, 20 Dec 2022 14:37:49 +0800 Subject: [PATCH] fix #1228 --- qiling/debugger/qdb/qdb.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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: """