snapshot method
override
Captures detached state without allocating hardware signals.
Implementation
@override
MemoryStorageImage snapshot() {
final target = storage;
final symbolic = target is SymbolicMemoryStorage
? target as SymbolicMemoryStorage
: null;
final writes = symbolic?.uncertainWrites ?? const [];
return MemoryStorageImage.wide(
{
for (final address in storage.addresses)
address.toBigInt(): storage.getData(address) ??
(throw StateError('Storage enumerated an absent address.')),
},
uncertainWrites: writes,
symbolicAddressMappingId:
writes.isEmpty ? null : symbolic!.symbolicAddressMappingId,
);
}