Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324// snapshot.cpp — RamSnapshot: a plain, target-independent RAM image.
#include "core/internal.hpp"#include "core/target.hpp"
#include <cstdint>#include <span>#include <string>#include <vector>
namespace mf {
RamSnapshot::RamSnapshot(uint32_t base, std::span<const std::byte> bytes) : base_(base), data_(bytes.begin(), bytes.end()) {}
RamSnapshot RamSnapshot::from_file(const std::string &path) { return RamSnapshot(0, detail::read_file(path, 0));}
void RamSnapshot::to_file(const std::string &path) const { detail::write_file(path, data_);}
} // namespace mf