diff options
| author | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2025-10-02 15:36:27 +0000 |
|---|---|---|
| committer | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2025-10-07 11:11:59 +0000 |
| commit | b75e57d22f11615cca76ade019306f224bbb91fa (patch) | |
| tree | ba1591ce276dba3bf7f8329fd29be590579ffdd4 | |
| parent | c8f9fbecad8094a4cd996f11eb366c1cb356b52f (diff) | |
| download | focaccia-b75e57d22f11615cca76ade019306f224bbb91fa.tar.gz focaccia-b75e57d22f11615cca76ade019306f224bbb91fa.zip | |
Properly support TPIDR register
| -rw-r--r-- | src/focaccia/arch/aarch64.py | 3 | ||||
| -rw-r--r-- | src/focaccia/symbolic.py | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/focaccia/arch/aarch64.py b/src/focaccia/arch/aarch64.py index 5a3ff3e..1067495 100644 --- a/src/focaccia/arch/aarch64.py +++ b/src/focaccia/arch/aarch64.py @@ -90,6 +90,8 @@ registers = [ ('F', 6, 7), ('M', 0, 4), ), + + _Reg(('TPIDR', 0, 64)), ] # Names of registers in the architecture @@ -128,6 +130,7 @@ regname_aliases = { 'Q29': 'V29', 'Q30': 'V30', 'Q31': 'V31', + 'TPIDR_EL0': 'TPIDR', } def decompose_cpsr(cpsr: int) -> dict[str, int]: diff --git a/src/focaccia/symbolic.py b/src/focaccia/symbolic.py index 321b39d..6510de5 100644 --- a/src/focaccia/symbolic.py +++ b/src/focaccia/symbolic.py @@ -594,14 +594,12 @@ class _LLDBConcreteState(ReadableProgramState): def read_register(self, reg: str) -> int: regname = self.arch.to_regname(reg) - if regname is None and reg != "DCZID_EL0" and reg != "TPIDR_EL0": + if regname is None and reg != "DCZID_EL0": raise RegisterAccessError(reg, f'Not a register name: {reg}') try: if reg == "DCZID_EL0": return 4 - if reg == "TPIDR_EL0": - return 0x4206c8 return self._target.read_register(regname) except ConcreteRegisterError: raise RegisterAccessError(regname, '') |