binutils-gdb/gdb/testsuite/gdb.fortran
Alok Kumar Sharma e409c542cc Fixed gdb to print arrays with very high indexes
In the function f77_print_array_1, the variable 'i' which holds the
index is of datatype 'int', while bounds are of datatype LONGEST. Due to
size of int being smaller than LONGEST, the variable 'i' stores
incorrect values for high indexes (higher than max limit of int).  Due
to this issue in sources, two abnormal behaviors are seen while printing
arrays with high indexes (please check array-bounds-high.f90) For high
indexes with negative sign, gdb prints empty array even if the array has
elements.

    (gdb) p arr
    $1 = ()

For high indexes with positive sign, gdb crashes.  We have now changed
the datatype of 'i' to LONGEST which is same as datatype of bounds.

gdb/ChangeLog:

	* f-valprint.c (f77_print_array_1): Changed datatype of index
	variable to LONGEST from int to enable it to contain bound
	values correctly.

gdb/testsuite/ChangeLog:

	* gdb.fortran/array-bounds-high.exp: New file.
	* gdb.fortran/array-bounds-high.f90: New file.

Change-Id: Ie2dce9380a249e634e2684b9c90f225e104369b7
2020-02-03 20:24:34 -05:00
..
array-bounds-high.exp Fixed gdb to print arrays with very high indexes 2020-02-03 20:24:34 -05:00
array-bounds-high.f90 Fixed gdb to print arrays with very high indexes 2020-02-03 20:24:34 -05:00
array-bounds.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
array-bounds.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
array-element.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
array-element.f Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
array-slices.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
array-slices.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
block-data.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
block-data.f Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
charset.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
charset.f90
common-block.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
common-block.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
complex.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
complex.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
derived-type-function.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
derived-type-function.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
derived-type-striding.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
derived-type-striding.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
derived-type.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
derived-type.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
dot-ops.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
exprs.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
function-calls.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
function-calls.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
info-modules.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
info-types-2.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
info-types.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
info-types.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
intrinsics.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
intrinsics.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
library-module-lib.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
library-module-main.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
library-module.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
logical.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
logical.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
max-depth.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
max-depth.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
module.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
module.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
multi-dim.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
multi-dim.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
nested-funcs-2.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
nested-funcs-2.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
nested-funcs.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
nested-funcs.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
pointers.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
print-formatted.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
print-formatted.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
print_type.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
printing-types.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
printing-types.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
ptr-indentation.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
ptr-indentation.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
ptype-on-functions.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
ptype-on-functions.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
short-circuit-argument-list.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
short-circuit-argument-list.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
subarray.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
subarray.f Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
type-kinds.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
type.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
types.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-alloc-assoc.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-datatypes.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-datatypes.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-history.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-ptr-info.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-ptype-sub.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-ptype.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-sizeof.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-sub.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-type.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-type.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-value-sub-arbitrary.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-value-sub-finish.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-value-sub.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla-value.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
vla.f90 Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
whatis_type.exp Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00