Remove repr surplus method
This commit is contained in:
@@ -15,9 +15,6 @@ from .types import UcTupledReg, UcReg128
|
||||
|
||||
ARMCPReg = Tuple[int, int, int, int, int, int, int, int]
|
||||
|
||||
def _structure_repr(self):
|
||||
return "%s(%s)" % (self.__class__.__name__, ", ".join("%s=%s" % (k, getattr(self, k)) for (k, _) in self._fields_))
|
||||
|
||||
|
||||
class UcRegCP(UcTupledReg[ARMCPReg]):
|
||||
"""ARM coprocessors registers for instructions MRC, MCR, MRRC, MCRR
|
||||
@@ -38,7 +35,6 @@ class UcRegCP(UcTupledReg[ARMCPReg]):
|
||||
def value(self) -> int:
|
||||
return self.val
|
||||
|
||||
__repr__ = _structure_repr
|
||||
|
||||
class UcAArch32(Uc):
|
||||
"""Unicorn subclass for ARM architecture.
|
||||
|
||||
@@ -15,9 +15,6 @@ uc_hook_h = ctypes.c_size_t
|
||||
|
||||
VT = TypeVar('VT', bound=Tuple[int, ...])
|
||||
|
||||
def _structure_repr(self):
|
||||
return "%s(%s)" % (self.__class__.__name__, ", ".join("%s=%s" % (k, getattr(self, k)) for (k, _) in self._fields_))
|
||||
|
||||
|
||||
class UcReg(ctypes.Structure):
|
||||
"""A base class for composite registers.
|
||||
@@ -41,7 +38,6 @@ class UcReg(ctypes.Structure):
|
||||
|
||||
pass
|
||||
|
||||
_repr_ = _structure_repr
|
||||
|
||||
class UcTupledReg(UcReg, Generic[VT]):
|
||||
"""A base class for registers whose values are represented as a set
|
||||
|
||||
@@ -10,9 +10,6 @@ from .arch.types import uc_err, uc_engine, uc_context, uc_hook_h, UcReg
|
||||
|
||||
# __version__ = f'{uc.UC_VERSION_MAJOR}.{uc.UC_VERSION_MINOR}.{uc.UC_VERSION_PATCH}'
|
||||
|
||||
def _structure_repr(self):
|
||||
return "%s(%s)" % (self.__class__.__name__, ", ".join("%s=%s" % (k, getattr(self, k)) for (k, _) in self._fields_))
|
||||
|
||||
|
||||
class _uc_mem_region(ctypes.Structure):
|
||||
_fields_ = (
|
||||
@@ -25,7 +22,6 @@ class _uc_mem_region(ctypes.Structure):
|
||||
def value(self) -> Tuple[int, int, int]:
|
||||
return tuple(getattr(self, fname) for fname, _ in self._fields_)
|
||||
|
||||
__repr__ = _structure_repr
|
||||
|
||||
class uc_tb(ctypes.Structure):
|
||||
""""TranslationBlock
|
||||
@@ -36,8 +32,6 @@ class uc_tb(ctypes.Structure):
|
||||
('icount', ctypes.c_uint16),
|
||||
('size', ctypes.c_uint16)
|
||||
)
|
||||
|
||||
__repr__ = _structure_repr
|
||||
|
||||
|
||||
def __load_uc_lib() -> ctypes.CDLL:
|
||||
|
||||
Reference in New Issue
Block a user