A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[mc] Remove useless cast
[simgrid.git]
/
src
/
mc
/
mc_process.cpp
diff --git
a/src/mc/mc_process.cpp
b/src/mc/mc_process.cpp
index
d5234e0
..
1a799ae
100644
(file)
--- 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. */
/* 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>
#include <assert.h>
#include <stddef.h>
#include <stdbool.h>
@@
-44,29
+46,31
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_process, mc,
// ***** Helper stuff
#define SO_RE "\\.so[\\.0-9]*$"
// ***** Helper stuff
#define SO_RE "\\.so[\\.0-9]*$"
-#define VERSION_RE "-[\\.0-9]*$"
+#define VERSION_RE "-[\\.0-9
-
]*$"
static const char *const FILTERED_LIBS[] = {
static const char *const FILTERED_LIBS[] = {
- "libstdc++",
+ "ld",
+ "libbz2",
"libboost_context",
"libboost_context",
+ "libc",
"libc++",
"libc++",
- "libm",
+ "libcdt",
+ "libcgraph",
+ "libdl",
+ "libdw",
+ "libelf",
"libgcc_s",
"libgcc_s",
+ "liblua5.1",
+ "liblzma",
+ "libm",
"libpthread",
"libpthread",
+ "librt",
+ "libstdc++",
"libunwind",
"libunwind-x86_64",
"libunwind-x86",
"libunwind-ptrace",
"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)
};
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;
}
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) {
{
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;
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 {
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;
}
xbt_die("Read from process %lli failed", (long long) this->pid_);
return buffer;
}