gdb/fotran: add support for the 'shape' keyword
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 26 Feb 2021 11:14:24 +0000 (11:14 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 9 Mar 2021 09:51:23 +0000 (09:51 +0000)
commiteef32f59988bb0e4514d5395093c9e6d8d073ebb
treedf32c5ce71179b0e9d405c10b6c0704443ee1cb1
parent7ba155b37073a3512c85f1d7f12dbaed9a6db3e2
gdb/fotran: add support for the 'shape' keyword

Add support for the SHAPE keyword to GDB's Fortran expression parser.

gdb/ChangeLog:

* f-exp.h (eval_op_f_array_shape): Declare.
(fortran_array_shape_operation): New type.
* f-exp.y (exp): Handle UNOP_FORTRAN_SHAPE after parsing
UNOP_INTRINSIC.
(f77_keywords): Add "shape" keyword.
* f-lang.c (fortran_array_shape): New function.
(eval_op_f_array_shape): New function.
* std-operator.def (UNOP_FORTRAN_SHAPE): New operator.

gdb/testsuite/ChangeLog:

* gdb.fortran/shape.exp: New file.
* gdb.fortran/shape.f90: New file.
gdb/ChangeLog
gdb/f-exp.h
gdb/f-exp.y
gdb/f-lang.c
gdb/std-operator.def
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/shape.exp [new file with mode: 0644]
gdb/testsuite/gdb.fortran/shape.f90 [new file with mode: 0644]