- switch(current_variable->address.location->type){
- case e_dw_compose:
- if(xbt_dynar_length(current_variable->address.location->location.compose) > 1){
- /* TODO : location list with optimizations enabled */
- }else{
- location_entry = xbt_dynar_get_as(current_variable->address.location->location.compose, 0, dw_location_t);
-
- switch(location_entry->type){
- case e_dw_register:
- unw_get_reg(&c, location_entry->location.reg, &res);
- value = (long)res;
- break;
- case e_dw_bregister_op:
- unw_get_reg(&c, location_entry->location.breg_op.reg, &res);
- value = (long)res + location_entry->location.breg_op.offset;
- break;
- case e_dw_fbregister_op:
- if(frame_pointer_address != NULL)
- value = (long)((char *)frame_pointer_address + location_entry->location.fbreg_op);
- else
- value = 0;
- break;
- default:
- value = 0; /* FIXME : implement other cases (with optimizations enabled)*/
- break;
- }
-
- if(value)
- new_var->address = (void *)value;
- else
- new_var->address = NULL;
- }
- break;
- default :
- break;
- }
+ new_var->address = MC_dwarf_resolve_location(&c, current_variable->address.location, frame_pointer_address);