X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d13b1659a0c2551ee41b287a269e391bb2d7bc8a..13388755930c20f4c3785153b8952cf30c23183a:/src/mc/mc_dwarf_expression.cpp diff --git a/src/mc/mc_dwarf_expression.cpp b/src/mc/mc_dwarf_expression.cpp index 3d2bc3639d..db02993225 100644 --- a/src/mc/mc_dwarf_expression.cpp +++ b/src/mc/mc_dwarf_expression.cpp @@ -13,6 +13,8 @@ #include "mc_object_info.h" #include "mc_private.h" +using simgrid::mc::remote; + extern "C" { static int mc_dwarf_push_value(mc_expression_state_t state, Dwarf_Off value) @@ -228,7 +230,7 @@ int mc_dwarf_execute_expression(size_t n, const Dwarf_Op * ops, if (state->stack_size == MC_EXPRESSION_STACK_SIZE) return MC_EXPRESSION_E_STACK_OVERFLOW; Dwarf_Off addr = (Dwarf_Off) (uintptr_t) - MC_object_base_address(state->object_info) + op->number; + state->object_info->base_address() + op->number; error = mc_dwarf_push_value(state, addr); break; } @@ -404,10 +406,9 @@ int mc_dwarf_execute_expression(size_t n, const Dwarf_Op * ops, uintptr_t address = (uintptr_t) state->stack[state->stack_size - 1]; if (!state->address_space) xbt_die("Missing address space"); - MC_address_space_read( - state->address_space, MC_ADDRESS_SPACE_READ_FLAGS_NONE, - &state->stack[state->stack_size - 1], (const void*) address, - sizeof(uintptr_t), state->process_index); + state->address_space->read_bytes( + &state->stack[state->stack_size - 1], sizeof(uintptr_t), + remote(address), state->process_index); } break; @@ -600,9 +601,7 @@ void mc_dwarf_location_list_init(mc_location_list_t list, mc_object_info_t info, expression->ops = NULL; mc_dwarf_expression_init(expression, len, ops); - void *base = - info-> - flags & MC_OBJECT_INFO_EXECUTABLE ? 0 : MC_object_base_address(info); + void *base = info->base_address(); // If start == 0, this is not a location list: expression->lowpc = start == 0 ? NULL : (char *) base + start; expression->highpc = start == 0 ? NULL : (char *) base + end;