diff options
| author | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2023-12-14 17:03:59 +0100 |
|---|---|---|
| committer | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2023-12-14 17:03:59 +0100 |
| commit | 194f3d6f2ebdc7b0631fdaaeb8451142b052ccb0 (patch) | |
| tree | 20806871433db331bdfed66ddadfadecbea2b7c4 /arch/arch.py | |
| parent | 4a5584d8f69d8ff511285387971d8cbf803f16b7 (diff) | |
| download | focaccia-194f3d6f2ebdc7b0631fdaaeb8451142b052ccb0.tar.gz focaccia-194f3d6f2ebdc7b0631fdaaeb8451142b052ccb0.zip | |
Implement symbolic comparison and match traces via Miasm
Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com> Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
Diffstat (limited to 'arch/arch.py')
| -rw-r--r-- | arch/arch.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arch.py b/arch/arch.py index ba94631..f2be5cb 100644 --- a/arch/arch.py +++ b/arch/arch.py @@ -3,7 +3,7 @@ from typing import Iterable class Arch(): def __init__(self, archname: str, regnames: Iterable[str]): self.archname = archname - self.regnames = set(regnames) + self.regnames = set(name.upper() for name in regnames) def to_regname(self, name: str) -> str | None: """Transform a string into a standard register name. @@ -20,4 +20,7 @@ class Arch(): return None def __eq__(self, other): - return self.regnames == other.regnames + return self.archname == other.archname + + def __repr__(self) -> str: + return self.archname |