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] Replace the override word with MC_OVERRIDE
[simgrid.git]
/
src
/
mc
/
mc_process.h
diff --git
a/src/mc/mc_process.h
b/src/mc/mc_process.h
index
b8408c1
..
00251e4
100644
(file)
--- a/
src/mc/mc_process.h
+++ b/
src/mc/mc_process.h
@@
-69,8
+69,16
@@
public:
// Read memory:
const void* read_bytes(void* buffer, std::size_t size,
remote_ptr<void> address, int process_index = ProcessIndexAny,
// Read memory:
const void* read_bytes(void* buffer, std::size_t size,
remote_ptr<void> address, int process_index = ProcessIndexAny,
- ReadMode mode = Normal) const
override
;
+ ReadMode mode = Normal) const
MC_OVERRIDE
;
void read_variable(const char* name, void* target, size_t size) const;
void read_variable(const char* name, void* target, size_t size) const;
+ template<class T>
+ T read_variable(const char *name) const
+ {
+ static_assert(std::is_trivial<T>::value, "Cannot read a non-trivial type");
+ T res;
+ read_variable(name, &res, sizeof(T));
+ return res;
+ }
char* read_string(remote_ptr<void> address) const;
// Write memory:
char* read_string(remote_ptr<void> address) const;
// Write memory:
@@
-104,13
+112,16
@@
public:
}
void ignore_region(std::uint64_t address, std::size_t size);
}
void ignore_region(std::uint64_t address, std::size_t size);
+ pid_t pid() const { return pid_; }
+
private:
void init_memory_map_info();
void refresh_heap();
void refresh_malloc_info();
private:
void init_memory_map_info();
void refresh_heap();
void refresh_malloc_info();
-p
ublic: // to be private
+p
rivate:
mc_process_flags_t process_flags;
mc_process_flags_t process_flags;
- pid_t pid;
+ pid_t pid_;
+public: // to be private
int socket;
int status;
bool running;
int socket;
int status;
bool running;