Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@codesourcery.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org,  Jakub Jelinek <jakub@redhat.com>
Subject: Re: [00/11] Fortran dynamic arrays support
Date: Fri, 16 Nov 2007 17:46:00 -0000	[thread overview]
Message-ID: <m31waqgk33.fsf@codesourcery.com> (raw)
In-Reply-To: <20071116032002.GA9885@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Fri, 16 Nov 2007 04:20:02 +0100")


Hi, Jan.  I would be a natural reviewer for this, but I'll be on
vacation next week (it's the U.S. Thanksgiving holiday), so I, at
least, won't be able to review this promptly.

Jan Kratochvil <jan.kratochvil at redhat.com> writes:
> currently GDB cannot display allocated or associated (dynamic) Fortran arrays.
> Support for the DWARF annotation of these is still not commited in GCC SVN.
> GCC Bug:
> 	http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22244
> Latest GCC 4.3 patch:
> 	http://people.redhat.com/jkratoch/rh364001/gcc22244-Z40d-jakub.patch
> Prebuilt Fortran testcase:
> 	http://people.redhat.com/jkratoch/rh364001/testcase-a5-jakub.tar.gz
> Jakub's mail (old):
> 	http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00612.html
>
> This patchset should also enable proper handling of C VLAs (Variable Length
> Arrays) but GCC-4.x does not emit any DWARF and the GCC-3.4 DWARF was IMO wrong
> for them.
>
> These GDB features are missing and get implemented by the patchset:
> * Dynamic array bounds.
> * DW_AT_*stride.
> * DW_AT_data_location.
> * DW_FORM_block* for DW_AT_lower_bound, DW_AT_upper_bound, DW_AT_*stride.
>
> Most of the support was intentionally limited only for the Fortran arrays where
> it is currently only produced by GCC.
>
> Patchset has incremental dependencies.  All stages are buildable but only the
> full patchset has been regression tested by the testsuite.
>
> Current output is:
> 	(gdb) ptype varx
> 	type = real*4 (0:-1,0:-1,0:-1)
> 	(gdb) p varx
> 	$1 = ()
> Patched output is:
> 	(gdb) ptype varx
> 	type = real*4 (6,5:15,17:28)
> 	(gdb) p varx
> 	$1 = (( ( 7, 6, 6, 6, 6, 6) ( 6, 6, 6, 6, 6, 6) ( 6, [cut ...]
>
> There is a design problem that GDB deals with the TYPE already without any
> relation to the original variable.  I tried to patch there a general
> TYPE->VARIABLE binding first but it is too intrusive for GDB as it makes the
> same abstract TYPE and VARIABLE-bound TYPE two different objects.  Current
> patchset provides another function parameter in the codepaths requiring it.
>
> Another design problem is that TYPE_LENGTH (and other macros) defined as
> `type->length' need to behave dynamically now (calculate DWARF expressions) but
> the same macro is currently used everywhere both as the setter (lval) and the
> getter.  Currently the getter call is replaced on (few) places where it was
> required for the Fortran arrays.
>
> I can expand there some of the compatibility wrapping functions if it gets
> otherwise accepted.
>
> This GCC Fortran <-> GDB patches were not tested against any 3rd part DWARF
> producers/consumers (which exist?).
>
>
> Regards,
> Jan


  reply	other threads:[~2007-11-16 17:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-16  3:20 Jan Kratochvil
2007-11-16 17:46 ` Jim Blandy [this message]
2007-11-16 17:55 ` Carlos Eduardo Seo
2007-11-16 19:45   ` Jan Kratochvil
2007-11-19 14:41     ` Carlos Eduardo Seo
     [not found]       ` <20071123015957.GA3202@host0.dyn.jankratochvil.net>
     [not found]         ` <20071123021120.GA11797@host0.dyn.jankratochvil.net>
     [not found]           ` <20071123163125.GA23275@host0.dyn.jankratochvil.net>
     [not found]             ` <4747086C.3070100@linux.vnet.ibm.com>
2007-11-23 17:21               ` [patch] XLF Fortran: Remove an inappropriate complaint [Re: XLF Fortran arrays test] Jan Kratochvil
2007-11-25 14:56                 ` Daniel Jacobowitz
2007-11-25 22:11                   ` Jan Kratochvil
2007-11-25 22:14                     ` Daniel Jacobowitz
2007-11-26  7:20                       ` [patch] XLF Fortran: Remove an inappropriate complaint Jan Kratochvil
2007-11-26 13:26                         ` Daniel Jacobowitz
2007-11-26 22:07                           ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m31waqgk33.fsf@codesourcery.com \
    --to=jimb@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jakub@redhat.com \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox