Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Use mc_snapshot_read in dwarf expression evaluation (compatibility with per...
authorGabriel Corona <gabriel.corona@loria.fr>
Tue, 17 Jun 2014 10:56:32 +0000 (12:56 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Tue, 17 Jun 2014 10:56:32 +0000 (12:56 +0200)
src/mc/mc_dwarf_expression.c

index 67b437a..b1f0ac5 100644 (file)
@@ -381,9 +381,9 @@ int mc_dwarf_execute_expression(size_t n, const Dwarf_Op * ops,
       {
         // Computed address:
         uintptr_t address = (uintptr_t) state->stack[state->stack_size - 1];
-        uintptr_t *p =
-            (uintptr_t *) mc_translate_address(address, state->snapshot);
-        state->stack[state->stack_size - 1] = *p;
+        uintptr_t temp;
+        uintptr_t* res = (uintptr_t*) mc_snapshot_read((void*) address, state->snapshot, &temp, sizeof(uintptr_t));
+        state->stack[state->stack_size - 1] = *res;
       }
       break;