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] Handle DW_AT_start_scope (for constants)
[simgrid.git]
/
src
/
mc
/
mc_checkpoint.c
diff --git
a/src/mc/mc_checkpoint.c
b/src/mc/mc_checkpoint.c
index
9a923b2
..
604572b
100644
(file)
--- a/
src/mc/mc_checkpoint.c
+++ b/
src/mc/mc_checkpoint.c
@@
-236,6
+236,14
@@
void MC_find_object_address(memory_map_t maps, mc_object_info_t result) {
/************************************* Take Snapshot ************************************/
/****************************************************************************************/
/************************************* Take Snapshot ************************************/
/****************************************************************************************/
+static bool mc_valid_variable(dw_variable_t var, dw_frame_t frame, const void* ip) {
+ // The variable is not yet valid:
+ if((const void*)((const char*) frame->low_pc + var->start_scope) > ip)
+ return false;
+ else
+ return true;
+}
+
static xbt_dynar_t MC_get_local_variables_values(xbt_dynar_t stack_frames){
unsigned cursor1 = 0;
static xbt_dynar_t MC_get_local_variables_values(xbt_dynar_t stack_frames){
unsigned cursor1 = 0;
@@
-248,6
+256,9
@@
static xbt_dynar_t MC_get_local_variables_values(xbt_dynar_t stack_frames){
dw_variable_t current_variable;
xbt_dynar_foreach(stack_frame->frame->variables, cursor2, current_variable){
dw_variable_t current_variable;
xbt_dynar_foreach(stack_frame->frame->variables, cursor2, current_variable){
+ if(!mc_valid_variable(current_variable, stack_frame->frame, (void*) stack_frame->ip))
+ continue;
+
int region_type;
if((long)stack_frame->ip > (long)mc_libsimgrid_info->start_exec)
region_type = 1;
int region_type;
if((long)stack_frame->ip > (long)mc_libsimgrid_info->start_exec)
region_type = 1;