From: Gabriel Corona Date: Thu, 6 Mar 2014 12:25:38 +0000 (+0100) Subject: [mc] Fix bug when trying to handle DW_OP_regN in MC_dwarf_resolve_location X-Git-Tag: v3_11~199^2~2^2~19^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d317aaf1effb4c9cea4701cf83e0946fd0828b89?hp=7ef55d47978f2f2ef20bd27c85881faa99147034 [mc] Fix bug when trying to handle DW_OP_regN in MC_dwarf_resolve_location MC_dwarf_resolve_location is supposed to return the *address* of a given variable. However, the DW_OP_regN returned the value of the register and not an address address of a variable with its content. It should be possible to get such an addresse (the registers are saved on the stack) but the feature does not seem to be implemented in libunwind. --- diff --git a/src/mc/mc_dwarf.c b/src/mc/mc_dwarf.c index 618ed29097..4f86800751 100644 --- a/src/mc/mc_dwarf.c +++ b/src/mc/mc_dwarf.c @@ -468,9 +468,6 @@ Dwarf_Off MC_dwarf_resolve_location(unw_cursor_t* c, dw_location_t location, voi } dw_location_t location_entry = xbt_dynar_get_as(location->location.compose, 0, dw_location_t); switch (location_entry->type){ - case e_dw_register: - unw_get_reg(c, location_entry->location.reg, &res); - return res; case e_dw_bregister_op: unw_get_reg(c, location_entry->location.breg_op.reg, &res); return (Dwarf_Off) ((long)res + location_entry->location.breg_op.offset);