-/* Copyright (c) 2014-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2014-2023. 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 "src/mc/mc_private.hpp"
#include "xbt/file.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/* For an executable object, addresses are virtual address (there is no offset) i.e.
* \f$\text{virtual address} = \{dwarf address}\f$
for (size_t i = 0; i < maps.size(); ++i) {
simgrid::xbt::VmMap const& reg = maps[i];
- if (maps[i].pathname.empty())
- continue;
- std::string map_basename = simgrid::xbt::Path(maps[i].pathname).get_base_name();
- if (map_basename != name)
+ if (reg.pathname.empty() || name != simgrid::xbt::Path(reg.pathname).get_base_name())
continue;
// This is the non-GNU_RELRO-part of the data segment:
xbt_assert(result->start_exec || result->start_rw || result->start_ro);
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc