Skip to content

Commit 6cc7173

Browse files
authored
Merge pull request #1295 from ucgJhe/qdb_with_pe
Qdb with PE
2 parents abc3bf2 + 5f2f105 commit 6cc7173

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

qiling/debugger/qdb/qdb.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,14 @@ def _run(self, address: int = 0, end: int = 0, count: int = 0) -> None:
118118
if getattr(self.ql.arch, 'is_thumb', False):
119119
address |= 1
120120

121-
self.ql.emu_start(begin=address, end=end, count=count)
121+
# assume we're running PE if on Windows
122+
if self.ql.os.type == QL_OS.WINDOWS:
123+
self.ql.count = count
124+
self.ql.entry_point = address
125+
self.ql.os.run()
126+
127+
else:
128+
self.ql.emu_start(begin=address, end=end, count=count)
122129

123130
@contextmanager
124131
def _save(self, reg=True, mem=True, hw=False, fd=False, cpu_context=False, os=False, loader=False):

0 commit comments

Comments
 (0)