This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [V4 00/21] Fortran dynamic array support
On Thu, 25 Aug 2016 19:06:26 +0200, Jan Kratochvil wrote:
> I have attached a fix.
That fix has a regression for normal (64-bit) inferiors.
I see the source handles negative stide specially. Particularly the comment
here does not explain the code it comments:
/* Adjust the data location with the value of byte stride if set, which
can describe the separation between successive elements along the
dimension. */
if (TYPE_BYTE_STRIDE (range_type) < 0)
value += (TYPE_HIGH_BOUND (range_type) - TYPE_LOW_BOUND (range_type))
* TYPE_BYTE_STRIDE (range_type);
else if (elt_stride < 0)
{
int offs = (elt_offs + 1) * elt_stride;
elt_offs = TYPE_LENGTH (array_type) + offs;
}
But I do not negative stride values described in DWARF-4 anyhow. When it is
used? With this interpretation of stride the gfortran random(?) stride value
for arrays with single row would be really wrong. But I do not see
a definition of negative stride in DWARF.
Thanks,
Jan