[v4,0/1] gdb, testsuite: Fix arrays of variable length strings for FORTRAN

Message ID 20230117223430.26151-1-abdul.b.ijaz@intel.com
Headers
Series gdb, testsuite: Fix arrays of variable length strings for FORTRAN |

Message

Ijaz, Abdul B Jan. 17, 2023, 10:34 p.m. UTC
  Hi All,

V4 patch contains the updates based on Andrew recent feedback and
fix tests for updated data type of Fortran string arrays.

@Andrew thanks alot for the detailed feedback.  As per your feedback,
I have highlighed the issue in this patch using your changes and
updated the test to print and check rank value also for vla string
array.  This patch is majorly address string array so as you already
mentioned this patch would resolve issue for TYPE_CODE_STRING dynamic
arrays while for rest it can be fixed later propely.

V3 of this series can be found here:
https://sourceware.org/pipermail/gdb-patches/2022-May/188725.html

Changes since V3:
* Update the code as per Andrew feedback to highlight the issue still
  exist in resolving dynamic arrays.
* Update the test to print and check rank of variable length string.
* Update gdb.fortran/string-types.exp and gdb.opt/fortran-string.exp
  tests to handle updated vla array ptype.

GDB Testsuite is executed using the patch and there is no regression
seen as compare to master on Ubuntu 18.04 machine for
unix/native-gdbserver and native-extended.gdbserver configurations.

Best Regards,
Abdul Basit

Abdul Basit Ijaz (1):
  gdb, testsuite: Fix arrays of variable length strings for FORTRAN

 gdb/c-valprint.c                           |  1 +
 gdb/gdbtypes.c                             | 45 ++++++++++++++--
 gdb/testsuite/gdb.fortran/string-types.exp |  4 +-
 gdb/testsuite/gdb.fortran/vla-array.exp    | 60 ++++++++++++++++++++++
 gdb/testsuite/gdb.fortran/vla-array.f90    | 45 ++++++++++++++++
 gdb/testsuite/gdb.opt/fortran-string.exp   |  2 +-
 6 files changed, 151 insertions(+), 6 deletions(-)
 create mode 100644 gdb/testsuite/gdb.fortran/vla-array.exp
 create mode 100644 gdb/testsuite/gdb.fortran/vla-array.f90