This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [4/4] RFC: dynamic arrays and DW_FORM_exprloc


On Fri, 15 Jul 2011 20:08:51 +0200, Tom Tromey wrote:
> A -gdwarf-4 regression:
> 
> -PASS: gdb.fortran/multi-dim.exp: print valid variable bound array element
> +FAIL: gdb.fortran/multi-dim.exp: print valid variable bound array element
> 
> The bug here is that with DWARF 4, GCC uses DW_FORM_exprloc when
> emitting the bounds of a variably-sized array.  GDB, however, only
> checks for DW_FORM_block1.
> 
> Jan, any comments?
[...]
> --- a/gdb/dwarf2read.c
> +++ b/gdb/dwarf2read.c
> @@ -8623,7 +8623,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
>    attr = dwarf2_attr (die, DW_AT_upper_bound, cu);
>    if (attr)
>      {
> -      if (attr->form == DW_FORM_block1 || is_ref_attr (attr))
> +      if (attr->form == DW_FORM_block1
> +	  || attr->form == DW_FORM_exprloc
> +	  || is_ref_attr (attr))
and
> -  if (attr && attr->form == DW_FORM_block1)
> +  if (attr && (attr->form == DW_FORM_block1
> +	       || attr->form == DW_FORM_exprloc))

archer-jankratochvil-vla handles DW_FORM_exprloc by using attr_form_is_block
here.  But that may be outside of the scope of this patch, this change is OK.


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]