From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id D02B3398300D for ; Sat, 19 Sep 2020 10:02:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D02B3398300D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=eliz@gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]:42281) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJZhl-000786-1F; Sat, 19 Sep 2020 06:02:53 -0400 Received: from [176.228.60.248] (port=4320 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kJZhi-00062I-UG; Sat, 19 Sep 2020 06:02:51 -0400 Date: Sat, 19 Sep 2020 13:03:06 +0300 Message-Id: <83o8m22ied.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: (message from Andrew Burgess on Sat, 19 Sep 2020 10:48:01 +0100) Subject: Re: [PATCHv3 2/2] gdb/fortran: Add support for Fortran array slices at the GDB prompt References: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Sep 2020 10:02:56 -0000 > From: Andrew Burgess > Date: Sat, 19 Sep 2020 10:48:01 +0100 > > gdb/ChangeLog: > > * Makefile.in (HFILES_NO_SRCDIR): Add f-array-walker.h. > * NEWS: Mention new options. > * expprint.c (dump_subexp_body_standard): Print RANGE_HAS_STRIDE. > * expression.h (enum range_type): Add RANGE_HAS_STRIDE. > * f-array-walker.h: New file. > * f-exp.y (arglist): Allow for a series of subranges. > (subrange): Add cases for subranges with strides. > * f-lang.c: Include 'gdbcmd.h' and 'f-array-walker.h'. > (repack_array_slices): New static global. > (show_repack_array_slices): New function. > (fortran_array_slicing_debug): New static global. > (show_fortran_array_slicing_debug): New function. > (value_f90_subarray): Delete. > (skip_undetermined_arglist): Delete. > (class fortran_array_repacker_base_impl): New class. > (class fortran_lazy_array_repacker_impl): New class. > (class fortran_array_repacker_impl): New class. > (fortran_value_subarray): Complete rewrite. > (set_fortran_list): New static global. > (show_fortran_list): Likewise. > (_initialize_f_language): Register new commands. > (fortran_adjust_dynamic_array_base_address_hack): New function. > * f-lang.h (fortran_adjust_dynamic_array_base_address_hack): > Declare. > * f-valprint.c: Include 'f-array-walker.h'. > (class fortran_array_printer_impl): New class. > (f77_print_array_1): Delete. > (f77_print_array): Delete. > (fortran_print_array): New. > (f_value_print_inner): Update to call fortran_print_array. > * gdbtypes.c: Include 'f-lang.h'. > (resolve_dynamic_type_internal): Call > fortran_adjust_dynamic_array_base_address_hack. > * parse.c (operator_length_standard): Handle RANGE_HAS_STRIDE. > > gdb/testsuite/ChangeLog: > > * gdb.fortran/array-slices-bad.exp: New file. > * gdb.fortran/array-slices-bad.f90: New file. > * gdb.fortran/array-slices-sub-slices.exp: New file. > * gdb.fortran/array-slices-sub-slices.f90: New file. > * gdb.fortran/array-slices.exp: Rewrite tests. > * gdb.fortran/array-slices.f90: Rewrite tests. > * gdb.fortran/vla-sizeof.exp: Correct expected results. > > gdb/doc/ChangeLog: > > * gdb.texinfo (Debugging Output): Document 'set/show debug > fotran-array-slicing'. > (Special Fortran Commands): Document 'set/show fortran > repack-array-slices'. Thanks, the documentation parts are approved, but please add the missing commas in sentences like this one: > +When taking a slice from an array a Fortran compiler can choose to ^ There. > +When this setting is on then @value{GDBN} will also repack array ^ And there. (There are a few more sentences like these two, where a comma is missing after a "When SOMETHING" construct.)