|
|
@ -26,7 +26,7 @@ class Storage: |
|
|
|
self._standard_storage = Array("Storage", 256, 256) |
|
|
|
self._standard_storage = Array("Storage", 256, 256) |
|
|
|
self._map_storage = {} |
|
|
|
self._map_storage = {} |
|
|
|
|
|
|
|
|
|
|
|
self.print_storage = {} # type: Dict[BitVec, BitVec] |
|
|
|
self.printable_storage = {} # type: Dict[BitVec, BitVec] |
|
|
|
|
|
|
|
|
|
|
|
self.dynld = dynamic_loader |
|
|
|
self.dynld = dynamic_loader |
|
|
|
self.address = address |
|
|
|
self.address = address |
|
|
@ -52,7 +52,7 @@ class Storage: |
|
|
|
), |
|
|
|
), |
|
|
|
256, |
|
|
|
256, |
|
|
|
) |
|
|
|
) |
|
|
|
self.print_storage[item] = storage[item] |
|
|
|
self.printable_storage[item] = storage[item] |
|
|
|
return storage[item] |
|
|
|
return storage[item] |
|
|
|
except ValueError: |
|
|
|
except ValueError: |
|
|
|
pass |
|
|
|
pass |
|
|
@ -87,7 +87,7 @@ class Storage: |
|
|
|
|
|
|
|
|
|
|
|
def __setitem__(self, key, value: Any) -> None: |
|
|
|
def __setitem__(self, key, value: Any) -> None: |
|
|
|
storage = self._get_corresponding_storage(key) |
|
|
|
storage = self._get_corresponding_storage(key) |
|
|
|
self.print_storage[key] = value |
|
|
|
self.printable_storage[key] = value |
|
|
|
storage[key] = value |
|
|
|
storage[key] = value |
|
|
|
|
|
|
|
|
|
|
|
def __deepcopy__(self, memodict={}): |
|
|
|
def __deepcopy__(self, memodict={}): |
|
|
@ -97,12 +97,12 @@ class Storage: |
|
|
|
) |
|
|
|
) |
|
|
|
storage._standard_storage = deepcopy(self._standard_storage) |
|
|
|
storage._standard_storage = deepcopy(self._standard_storage) |
|
|
|
storage._map_storage = deepcopy(self._map_storage) |
|
|
|
storage._map_storage = deepcopy(self._map_storage) |
|
|
|
storage.print_storage = copy(self.print_storage) |
|
|
|
storage.print_storage = copy(self.printable_storage) |
|
|
|
return storage |
|
|
|
return storage |
|
|
|
|
|
|
|
|
|
|
|
def __str__(self) -> str: |
|
|
|
def __str__(self) -> str: |
|
|
|
# TODO: Do something better here |
|
|
|
# TODO: Do something better here |
|
|
|
return str(self.print_storage) |
|
|
|
return str(self.printable_storage) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Account: |
|
|
|
class Account: |
|
|
|