PATCH: Start Fortran support for variable objects.

Wu Zhou woodzltc@cn.ibm.com
Wed Jul 6 08:31:00 GMT 2005


On Sun, 3 Jul 2005, Daniel Jacobowitz wrote:

> On Fri, Jul 01, 2005 at 04:32:54PM +1200, Nick Roberts wrote:
> > So I should have done:
> > 
> > (top-gdb) p TYPE_LOW_BOUND(var->type->main_type->fields->type)
> > $1 = 1
> > (top-gdb) p TYPE_HIGH_BOUND(var->type->main_type->fields->type)
> > $2 = 4
> 
> Right - specifically, TYPE_LOW_BOUND (TYPE_INDEX_TYPE (var->type))
> is supposed to be the lower bound for an array.  Tricky.  It comes from
> read_subrange_type in dwarf2read.c for dwarf2.

Yes, it is tricky to me too.  Maybe it is better to change TYPE_INDEX_TYPE 
to TYPE_RANGE_TYPE.  This seems more obvious IMO.
 
- Wu Zhou



More information about the Gdb-patches mailing list