+2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ PR symtab/22003
+ * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
+ (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
+ (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
+
2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2read.c (build_type_psymtabs_reader): New prototype.
break;
case DW_FORM_sdata:
+ case DW_FORM_implicit_const:
*value = DW_SND (attr);
break;
fprintf_unfiltered (f,
"unexpected attribute form: DW_FORM_indirect");
break;
+ case DW_FORM_implicit_const:
+ fprintf_unfiltered (f, "constant: %s",
+ plongest (DW_SND (&die->attrs[i])));
+ break;
default:
fprintf_unfiltered (f, "unsupported attribute form: %d.",
die->attrs[i].form);
static LONGEST
dwarf2_get_attr_constant_value (const struct attribute *attr, int default_value)
{
- if (attr->form == DW_FORM_sdata)
+ if (attr->form == DW_FORM_sdata || attr->form == DW_FORM_implicit_const)
return DW_SND (attr);
else if (attr->form == DW_FORM_udata
|| attr->form == DW_FORM_data1
break;
case DW_FORM_sdata:
+ case DW_FORM_implicit_const:
type = die_type (die, cu);
result = write_constant_as_bytes (obstack, byte_order,
type, DW_SND (attr), len);
}
break;
+ case DW_FORM_implicit_const:
+ break;
+
default:
{
complain:
case DW_FORM_data2:
case DW_FORM_data4:
case DW_FORM_data8:
+ case DW_FORM_implicit_const:
return 1;
default:
return 0;