/* 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 <assert.h>
#include <stddef.h>
#include <stdbool.h>
// ***** 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)
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;
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;
}