/* 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. */
/* 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. */
-static ssize_t pread_whole(int fd, void *buf, size_t count, off_t offset)
+static ssize_t pread_whole(int fd, void *buf, size_t count, std::uint64_t offset)
- ssize_t res = pread(fd, buffer, count, offset);
+ ssize_t res = pread(fd, buffer, count, (std::int64_t) offset);
MC_find_object_info(this->memory_map_, pathname, is_executable);
this->object_infos.push_back(info);
if (is_executable)
MC_find_object_info(this->memory_map_, pathname, is_executable);
this->object_infos.push_back(info);
if (is_executable)
{
for (auto const& object_info : this->object_infos) {
if (addr.address() >= (std::uint64_t)object_info->start
{
for (auto const& object_info : this->object_infos) {
if (addr.address() >= (std::uint64_t)object_info->start
if (addr.address() >= (std::uint64_t) info->start_exec
&& addr.address() <= (std::uint64_t) info->end_exec) {
return info;
if (addr.address() >= (std::uint64_t) info->start_exec
&& addr.address() <= (std::uint64_t) info->end_exec) {
return info;
if (addr.address() >= (std::uint64_t)info->start_rw
&& addr.address() <= (std::uint64_t)info->end_rw) {
return info;
if (addr.address() >= (std::uint64_t)info->start_rw
&& addr.address() <= (std::uint64_t)info->end_rw) {
return info;
- std::shared_ptr<s_mc_object_info_t> info = this->find_object_info_exec(ip);
- if (!info)
- return nullptr;
- else
- return MC_file_object_info_find_function(info.get(), (void*) ip.address());
+ std::shared_ptr<simgrid::mc::ObjectInformation> info = this->find_object_info_exec(ip);
+ return info ? info->find_function((void*) ip.address()) : nullptr;
{
// First lookup the variable in the executable shared object.
// A global variable used directly by the executable code from a library
// is reinstanciated in the executable memory .data/.bss.
// We need to look up the variable in the execvutable first.
if (this->binary_info) {
{
// First lookup the variable in the executable shared object.
// A global variable used directly by the executable code from a library
// is reinstanciated in the executable memory .data/.bss.
// We need to look up the variable in the execvutable first.
if (this->binary_info) {
- std::shared_ptr<s_mc_object_info_t> const& info = this->binary_info;
- dw_variable_t var = MC_file_object_info_find_variable_by_name(info.get(), name);
+ std::shared_ptr<simgrid::mc::ObjectInformation> const& info = this->binary_info;
+ simgrid::mc::Variable* var = info->find_variable(name);
- for (std::shared_ptr<s_mc_object_info_t> const& info : this->object_infos) {
- dw_variable_t var = MC_file_object_info_find_variable_by_name(info.get(), name);
+ for (std::shared_ptr<simgrid::mc::ObjectInformation> const& info : this->object_infos) {
+ simgrid::mc::Variable* var = info->find_variable(name);
- if (pread_whole(this->memory_file, buffer, size, (off_t) address.address()) < 0)
+ if (pread_whole(this->memory_file, buffer, size, address.address()) < 0)