This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] fort_dyn_array: add basic fortran dyn array support
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Keven Boell <keven dot boell at linux dot intel dot com>
- Cc: gdb-patches at sourceware dot org, keven dot boell at intel dot com
- Date: Wed, 21 Oct 2015 15:41:41 -0400
- Subject: Re: [PATCH 1/2] fort_dyn_array: add basic fortran dyn array support
- Authentication-results: sourceware.org; auth=none
- References: <1435754532-17922-1-git-send-email-keven dot boell at intel dot com> <1435754532-17922-2-git-send-email-keven dot boell at intel dot com> <20150721180502 dot GN7406 at adacore dot com> <55C213C7 dot 7070202 at linux dot intel dot com> <20150805202301 dot GB14992 at adacore dot com> <51130 dot 172 dot 28 dot 205 dot 135 dot 1438861308 dot squirrel at linux dot intel dot com> <20150820125159 dot GD4571 at adacore dot com> <5613D0DC dot 3040908 at linux dot intel dot com>
> Thanks for the review and sorry for the long delay. Here is the updated patch.
Not to worry. At this point of the process, the number of changes
that were left to be made before making the patch acceptable were
very small, so it was easy for me to get back into it.
> 2015-03-13 Keven Boell <keven.boell@intel.com>
>
> * dwarf2read.c (set_die_type): Add read of
> DW_AT_allocated and DW_AT_associated.
> * f-typeprint.c: New include of typeprint.h
> (f_print_type): Add check for allocated/associated
> status of type.
> (f_type_print_varspec_suffix): Add check for
> allocated/associated status of type.
> * gdbtypes.c (create_array_type_with_stride):
> Add check for valid data location of type in
> case allocated or associated attributes are set.
> Length of an array should be only calculated if
> allocated or associated is resolved as true.
> (is_dynamic_type_internal): Add check for allocated/
> associated.
> (resolve_dynamic_array): Evaluate allocated/associated
> properties.
> * gdbtypes.h (enum dynamic_prop_node_kind): <DYN_PROP_ALLOCATED>
> <DYN_PROP_ASSOCIATED>: New enums.
> (TYPE_ALLOCATED_PROP, TYPE_ASSOCIATED_PROP): New macros.
> (type_not_allocated): New function.
> (type_not_associated): New function.
> * valarith.c (value_subscripted_rvalue): Add check for
> allocated/associated.
> * valprint.c: New include of typeprint.h.
> (valprint_check_validity): Add check for allocated/associated.
> (value_check_printable): Add check for allocated/
> associated.
> * typeprint.h (val_print_not_allocated): New function.
> (val_print_not_associated): New function.
> * typeprint.c (val_print_not_allocated): New function.
> (val_print_not_associated): New function.
>
> testsuite/gdb.fortran:
>
> * vla-alloc-assoc.exp: New file.
> * vla-datatypes.exp: New file.
> * vla-datatypes.f90: New file.
> * vla-history.exp: New file.
> * vla-ptype-sub.exp: New file.
> * vla-ptype.exp: New file.
> * vla-sizeof.exp: New file.
> * vla-sub.f90: New file.
> * vla-value-sub-arbitrary.exp: New file.
> * vla-value-sub-finish.exp: New file.
> * vla-value-sub.exp: New file.
> * vla-value.exp: New file.
> * vla-ptr-info.exp: New file.
> * vla.f90: New file.
>
> testsuite/gdb.mi:
>
> * mi-vla-fortran.exp: New file.
> * vla.f90: New file.
The patch is approved, and I have now pushed it. Congratulations!
(and thank you for your perseverance :-)).
Small note, on something I noticed only at the very end. For
the ChangeLog entries, and in particular for the testsuite files,
therer is only one ChangeLog file, in gdb/testsuite/ChangeLog.
So, all the entries in the testsuite directory should be together,
and relative to the testsuite, which means the filenames needed
to be prefixed with either gdb.fortran/ or gdb.mi. In other words,
I changed it to the following entry in gdb/testsuite/ChangeLog:
* gdb.fortran/vla-alloc-assoc.exp: New file.
* gdb.fortran/vla-datatypes.exp: New file.
* gdb.fortran/vla-datatypes.f90: New file.
* gdb.fortran/vla-history.exp: New file.
* gdb.fortran/vla-ptype-sub.exp: New file.
* gdb.fortran/vla-ptype.exp: New file.
* gdb.fortran/vla-sizeof.exp: New file.
* gdb.fortran/vla-sub.f90: New file.
* gdb.fortran/vla-value-sub-arbitrary.exp: New file.
* gdb.fortran/vla-value-sub-finish.exp: New file.
* gdb.fortran/vla-value-sub.exp: New file.
* gdb.fortran/vla-value.exp: New file.
* gdb.fortran/vla-ptr-info.exp: New file.
* gdb.mi/mi-vla-fortran.exp: New file.
* gdb.mi/vla.f90: New file.
--
Joel