Commit b3882148 by Jakub Jelinek Committed by Jakub Jelinek

dwarf2out.c (resolve_addr): For -gdwarf-2 don't optimize…

dwarf2out.c (resolve_addr): For -gdwarf-2 don't optimize DW_AT_data_member_location containing just...

	* dwarf2out.c (resolve_addr): For -gdwarf-2 don't
	optimize DW_AT_data_member_location containing just
	DW_OP_plus_uconst.

From-SVN: r176878
parent 64153cce
2011-07-28 Jakub Jelinek <jakub@redhat.com> 2011-07-28 Jakub Jelinek <jakub@redhat.com>
* dwarf2out.c (resolve_addr): For -gdwarf-2 don't
optimize DW_AT_data_member_location containing just
DW_OP_plus_uconst.
PR debug/49871 PR debug/49871
* dwarf2out.c (size_of_die, value_format, output_die): Use * dwarf2out.c (size_of_die, value_format, output_die): Use
DW_FORM_udata instead of DW_FORM_data[48] for DW_FORM_udata instead of DW_FORM_data[48] for
......
...@@ -21809,13 +21809,26 @@ resolve_addr (dw_die_ref die) ...@@ -21809,13 +21809,26 @@ resolve_addr (dw_die_ref die)
} }
break; break;
case dw_val_class_loc: case dw_val_class_loc:
if (!resolve_addr_in_expr (AT_loc (a))) {
{ dw_loc_descr_ref l = AT_loc (a);
remove_AT (die, a->dw_attr); /* For -gdwarf-2 don't attempt to optimize
ix--; DW_AT_data_member_location containing
} DW_OP_plus_uconst - older consumers might
else rely on it being that op instead of a more complex,
mark_base_types (AT_loc (a)); but shorter, location description. */
if ((dwarf_version > 2
|| a->dw_attr != DW_AT_data_member_location
|| l == NULL
|| l->dw_loc_opc != DW_OP_plus_uconst
|| l->dw_loc_next != NULL)
&& !resolve_addr_in_expr (l))
{
remove_AT (die, a->dw_attr);
ix--;
}
else
mark_base_types (l);
}
break; break;
case dw_val_class_addr: case dw_val_class_addr:
if (a->dw_attr == DW_AT_const_value if (a->dw_attr == DW_AT_const_value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment