-/* Copyright (c) 2014-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2014-2022. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <cstddef> /* std::size_t */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_snapshot, mc, "Taking and restoring snapshots");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/************************************* Take Snapshot ************************************/
/****************************************************************************************/
if (not valid_variable(¤t_variable, scope, (void*)stack_frame->ip))
continue;
+ if (not current_variable.type) {
+ XBT_VERB("Ignore local variable without type: '%s' [%s]", current_variable.name.c_str(),
+ stack_frame->frame->name.c_str());
+ continue;
+ }
+
s_local_variable_t new_var;
new_var.subprogram = stack_frame->frame;
new_var.ip = stack_frame->ip;
remote(ignored_data.start));
}
-Snapshot::Snapshot(int num_state, RemoteProcess* process) : AddressSpace(process), num_state_(num_state)
+Snapshot::Snapshot(long num_state, RemoteProcess* process) : AddressSpace(process), num_state_(num_state)
{
- XBT_DEBUG("Taking snapshot %i", num_state);
-
- for (auto const& p : process->actors())
- enabled_processes_.insert(p.copy.get_buffer()->get_pid());
+ XBT_DEBUG("Taking snapshot %ld", num_state);
snapshot_handle_ignore(this);
void Snapshot::restore(RemoteProcess* process) const
{
- XBT_DEBUG("Restore snapshot %i", num_state_);
+ XBT_DEBUG("Restore snapshot %ld", num_state_);
// Restore regions
for (std::unique_ptr<Region> const& region : snapshot_regions_) {
process->clear_cache();
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc