The project was most recently described in this email.
Goal
This project aims to fix Fortran variable length arrays handling in gdb. It allows the user to evaluate VLA used in Fortran, C99, and Ada.
Plan
- Changes in dwarf handling
Parse new dwarf attributes DW_AT_allocated, DW_AT_associated, and DW_AT_data_location in dwarf2.c and store them in struct main_type
Update copy_type_recursive to copy the newly added attributed
Dispatch new dwarf expression opcode DW_OP_push_object_address similar to DW_OP_GNU_push_tls_address in dwarf2expr.c
Extend read_array_type to parse attributes DW_AT_allocated, DW_AT_associated, DW_AT_bit_offset, DW_AT_bit_size, DW_AT_byte_size, DW_AT_count, DW_AT_lower_bound, DW_AT_byte_stride, {{{DW_AT_bit_stride, DW_AT_upper_bound, DW_AT_string_length as references and dwarf expressions in addition to constants.
Upstream Strategy
The current strategy is to split the VLA patches in three separated patch series:
- Support C99 VLA (GCC)
- Support C99 VLA (ICC)
- Support Fortran VLA
- Support Fortran variable length strings
As of now clang emits a bad location description for VLA and does to generate upper_bound/count attributes.
Ongoing Development
Current development can be tracked at:
Known implementations
There are at least two VLA implementations known to work with Fortran arrays/characters.