Skip to content

Commit ab539e3

Browse files
committed
Remove QL_ARCH_HARDWARE to pass all tests
1 parent 91bacae commit ab539e3

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

qiling/core.py

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from .os.memory import QlMemoryManager
1919
from .loader.loader import QlLoader
2020

21-
from .const import QL_ARCH_ENDIAN, QL_ENDIAN, QL_OS, QL_VERBOSE, QL_ARCH_NONEOS, QL_ARCH_HARDWARE
21+
from .const import QL_ARCH_ENDIAN, QL_ENDIAN, QL_OS, QL_VERBOSE, QL_ARCH_NONEOS
2222
from .exception import QlErrorFileNotFound, QlErrorArch, QlErrorOsType, QlErrorOutput
2323
from .utils import *
2424
from .core_struct import QlCoreStructs
@@ -220,25 +220,23 @@ def __init__(
220220
self.arch.utils.setup_output()
221221

222222
if (self.archtype not in QL_ARCH_NONEOS):
223-
if (self.archtype not in QL_ARCH_HARDWARE):
224-
self._os = os_setup(self.archtype, self.ostype, self)
223+
self._os = os_setup(self.archtype, self.ostype, self)
225224

226-
if stdin is not None:
227-
self._os.stdin = stdin
225+
if stdin is not None:
226+
self._os.stdin = stdin
228227

229-
if stdout is not None:
230-
self._os.stdout = stdout
228+
if stdout is not None:
229+
self._os.stdout = stdout
231230

232-
if stderr is not None:
233-
self._os.stderr = stderr
231+
if stderr is not None:
232+
self._os.stderr = stderr
234233

235234
# Run the loader
236235
self.loader.run()
237236

238237
if (self.archtype not in QL_ARCH_NONEOS):
239-
if (self.archtype not in QL_ARCH_HARDWARE):
240-
# Add extra guard options when configured to do so
241-
self._init_stop_guard()
238+
# Add extra guard options when configured to do so
239+
self._init_stop_guard()
242240

243241
#####################
244242
# Qiling Components #
@@ -701,9 +699,6 @@ def run(self, begin=None, end=None, timeout=0, count=0, code = None):
701699
else:
702700
return self.arch.run(code)
703701

704-
if self.archtype in QL_ARCH_HARDWARE:
705-
return self.arch.run(count=count)
706-
707702
self.write_exit_trap()
708703

709704
# init debugger

qiling/core_hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from .core_hooks_types import Hook, HookAddr, HookIntr, HookRet
1515
from .utils import catch_KeyboardInterrupt
16-
from .const import QL_HOOK_BLOCK, QL_ARCH_NONEOS, QL_ARCH_HARDWARE
16+
from .const import QL_HOOK_BLOCK, QL_ARCH_NONEOS
1717
from .exception import QlErrorCoreHook
1818

1919

0 commit comments

Comments
 (0)