X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/290e19f26b10dc49485d7d7b06859edff32fd1e1..8e339d5533f8be789f8431fbc00683fe1ff35fd9:/src/mc/mc_process.cpp?ds=inline diff --git a/src/mc/mc_process.cpp b/src/mc/mc_process.cpp index d5234e018c..1a799ae336 100644 --- a/src/mc/mc_process.cpp +++ b/src/mc/mc_process.cpp @@ -4,6 +4,8 @@ /* 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. */ +#define _FILE_OFFSET_BITS 64 + #include #include #include @@ -44,29 +46,31 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_process, mc, // ***** Helper stuff #define SO_RE "\\.so[\\.0-9]*$" -#define VERSION_RE "-[\\.0-9]*$" +#define VERSION_RE "-[\\.0-9-]*$" static const char *const FILTERED_LIBS[] = { - "libstdc++", + "ld", + "libbz2", "libboost_context", + "libc", "libc++", - "libm", + "libcdt", + "libcgraph", + "libdl", + "libdw", + "libelf", "libgcc_s", + "liblua5.1", + "liblzma", + "libm", "libpthread", + "librt", + "libstdc++", "libunwind", "libunwind-x86_64", "libunwind-x86", "libunwind-ptrace", - "libdw", - "libdl", - "librt", - "liblzma", - "libelf", - "libbz2", - "libz", - "libelf", - "libc", - "ld" + "libz" }; static bool MC_is_simgrid_lib(const char* libname) @@ -107,12 +111,12 @@ static char* MC_get_lib_name(const char* pathname, struct s_mc_memory_map_re* re return libname; } -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) { char* buffer = (char*) buf; ssize_t real_count = count; while (count) { - ssize_t res = pread(fd, buffer, count, offset); + ssize_t res = pread(fd, buffer, count, (std::int64_t) offset); if (res > 0) { count -= res; buffer += res; @@ -546,7 +550,7 @@ const void *Process::read_bytes(void* buffer, std::size_t size, return buffer; } } else { - if (pread_whole(this->memory_file, buffer, size, (off_t) address.address()) < 0) + if (pread_whole(this->memory_file, buffer, size, address.address()) < 0) xbt_die("Read from process %lli failed", (long long) this->pid_); return buffer; }