|
3 | 3 | # Cross Platform and Multi Architecture Advanced Binary Emulation Framework |
4 | 4 | # |
5 | 5 |
|
6 | | -from configparser import ConfigParser |
7 | 6 | import os, pickle |
8 | 7 |
|
9 | 8 | # See https://stackoverflow.com/questions/39740632/python-type-hinting-without-cyclic-imports |
10 | 9 | from typing import AnyStr, List, Mapping, MutableMapping, Sequence, Union |
11 | 10 | from typing import TYPE_CHECKING |
12 | | - |
13 | | -from unicorn.unicorn import Uc |
| 11 | +from configparser import ConfigParser |
14 | 12 |
|
15 | 13 | if TYPE_CHECKING: |
| 14 | + from unicorn.unicorn import Uc |
16 | 15 | from logging import Logger |
17 | 16 | from .arch.arch import QlArch |
18 | 17 | from .os.os import QlOs |
@@ -142,14 +141,14 @@ def __init__( |
142 | 141 |
|
143 | 142 | # arch should have been determined by now; fail if not |
144 | 143 | if type(archtype) is not QL_ARCH: |
145 | | - raise QlErrorArch(f'Uknown or unsupported architecture: "{archtype}"') |
| 144 | + raise QlErrorArch(f'Unknown or unsupported architecture: "{archtype}"') |
146 | 145 |
|
147 | 146 | # os should have been determined by now; fail if not |
148 | 147 | if type(ostype) is not QL_OS: |
149 | 148 | raise QlErrorOsType(f'Unknown or unsupported operating system: "{ostype}"') |
150 | 149 |
|
151 | 150 | # if endianess is still undetermined, set it to little-endian. |
152 | | - # this setting is ignored for architectures with predfined endianess |
| 151 | + # this setting is ignored for architectures with predefined endianess |
153 | 152 | if endian is None: |
154 | 153 | endian = QL_ENDIAN.EL |
155 | 154 |
|
@@ -193,7 +192,8 @@ def __init__( |
193 | 192 |
|
194 | 193 | # Run the loader |
195 | 194 | self.loader.run() |
196 | | - self._init_stop_guard() |
| 195 | + |
| 196 | + self._init_stop_guard() |
197 | 197 |
|
198 | 198 | ##################### |
199 | 199 | # Qiling Components # |
@@ -373,8 +373,8 @@ def verbose(self) -> QL_VERBOSE: |
373 | 373 | Values: |
374 | 374 | `QL_VERBOSE.DISABLED`: turn off logging |
375 | 375 | `QL_VERBOSE.OFF` : mask off anything below warnings, errors and critical severity |
376 | | - `QL_VERBOSE.DEFAULT` : info logging level: default verbosity |
377 | | - `QL_VERBOSE.DEBUG` : debug logging level: higher verbosity |
| 376 | + `QL_VERBOSE.DEFAULT` : info logging level; default verbosity |
| 377 | + `QL_VERBOSE.DEBUG` : debug logging level; higher verbosity |
378 | 378 | `QL_VERBOSE.DISASM` : debug verbosity along with disassembly trace (slow!) |
379 | 379 | `QL_VERBOSE.DUMP` : disassembly trace along with cpu context dump |
380 | 380 | """ |
@@ -465,15 +465,15 @@ def filter(self, regex: Optional[str]): |
465 | 465 | self._log_filter.update_filter(regex) |
466 | 466 |
|
467 | 467 | @property |
468 | | - def uc(self) -> Uc: |
| 468 | + def uc(self) -> 'Uc': |
469 | 469 | """ Raw uc instance. |
470 | 470 |
|
471 | | - Type: Ucgit |
| 471 | + Type: Uc |
472 | 472 | """ |
473 | 473 | return self._uc |
474 | 474 |
|
475 | 475 | @uc.setter |
476 | | - def uc(self, u): |
| 476 | + def uc(self, u: 'Uc'): |
477 | 477 | self._uc = u |
478 | 478 |
|
479 | 479 | @property |
|
0 commit comments