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: gdb can't print array element for fortran


> 2010-03-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 	    Chandru <chandru@in.ibm.com>
> 
> 	* dwarf2read.c (read_subrange_type): Set TYPE_HIGH_BOUND_UNDEFINED.
> 	* valarith.c (value_subscripted_rvalue): Suppress error if
> 	TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.

This seems like a reasonable workaround, especially since we already
have some special handling of attr->form == DW_FORM_block1 for range
types.  So I guess we never have block2/block4 or even block attributes
for the upper bound in practice?

Just one request:

>    range_type = create_range_type (NULL, base_type, low, high);
>  
> +  if (attr && attr->form == DW_FORM_block1)
> +    TYPE_HIGH_BOUND_UNDEFINED (range_type) = 1;

Can you add a quick comment, with a FIXME to show that this is temporary?
There's already some useful comments just slightly earlier in the code,
perhaps we just ought to refer to that, somehow.

Pre-approved with the addition of the comment.

-- 
Joel


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