#include "src/internal_config.h"
#include "src/mc/mc_private.hpp"
#include "src/smpi/include/private.hpp"
#include "src/internal_config.h"
#include "src/mc/mc_private.hpp"
#include "src/smpi/include/private.hpp"
/** \brief Fills the position of the segments (executable, read-only, read/write).
* */
// TODO, use the ELF segment information for more robustness
/** \brief Fills the position of the segments (executable, read-only, read/write).
* */
// TODO, use the ELF segment information for more robustness
std::vector<simgrid::xbt::VmMap> const& maps,
simgrid::mc::ObjectInformation* result)
{
std::vector<simgrid::xbt::VmMap> const& maps,
simgrid::mc::ObjectInformation* result)
{
for (size_t i = 0; i < maps.size(); ++i) {
simgrid::xbt::VmMap const& reg = maps[i];
if (maps[i].pathname.empty())
continue;
for (size_t i = 0; i < maps.size(); ++i) {
simgrid::xbt::VmMap const& reg = maps[i];
if (maps[i].pathname.empty())
continue;
- char* map_basename = xbt_basename(maps[i].pathname.c_str());
- if (strcmp(name, map_basename) != 0) {
- free(map_basename);
+ std::string map_basename = simgrid::xbt::Path(maps[i].pathname).getBasename();
+ if (map_basename != name)
result->end = result->end_exec;
xbt_assert(result->start_exec || result->start_rw || result->start_ro);
result->end = result->end_exec;
xbt_assert(result->start_exec || result->start_rw || result->start_ro);
// If dot_output enabled, do not handle the corresponding file
if (dot_output != nullptr) {
// If dot_output enabled, do not handle the corresponding file
if (dot_output != nullptr) {
- char* link_basename = xbt_basename(link);
- if (strcmp(link_basename, _sg_mc_dot_output_file) == 0) {
- free(link_basename);
+ std::string link_basename = simgrid::xbt::Path(link).getBasename();
+ if (link_basename == _sg_mc_dot_output_file)