DWARF-5 Fix DW_FORM_implicit_const
authorJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 24 Aug 2017 14:39:11 +0000 (16:39 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 24 Aug 2017 14:39:11 +0000 (16:39 +0200)
commit663c44ac4d4336e99c282705b1d289b365b273d3
tree9cdf5c905060c3a689afa3904cceac78e84059d9
parent7073b5b9edc9e06974bd733b7e4b3845d6d6f690
DWARF-5 Fix DW_FORM_implicit_const

-gdwarf-4:
ptype logical
type = const char [2]
(gdb) PASS: gdb.base/constvars.exp: ptype logical

-gdwarf-5:
ptype logical
type = const char []
(gdb) FAIL: gdb.base/constvars.exp: ptype logical

 <2><2fc>: Abbrev Number: 1 (DW_TAG_variable)
    <2fd>   DW_AT_name        : (indirect string, offset: 0x2eb): logical
    <301>   DW_AT_decl_file   : 1

   1      DW_TAG_variable    [no children]
    DW_AT_name         DW_FORM_strp
    DW_AT_decl_file    DW_FORM_implicit_const: 1

During symbol reading, invalid attribute class or form for
'DW_FORM_implicit_const' in '(null)'.

gdb/ChangeLog
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.
gdb/ChangeLog
gdb/dwarf2read.c