Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [4/4] RFC: dynamic arrays and DW_FORM_exprloc
Date: Fri, 15 Jul 2011 18:28:00 -0000	[thread overview]
Message-ID: <20110715181512.GA20327@host1.jankratochvil.net> (raw)
In-Reply-To: <m3livzbemk.fsf@fleche.redhat.com>

On Fri, 15 Jul 2011 20:08:51 +0200, Tom Tromey wrote:
> A -gdwarf-4 regression:
> 
> -PASS: gdb.fortran/multi-dim.exp: print valid variable bound array element
> +FAIL: gdb.fortran/multi-dim.exp: print valid variable bound array element
> 
> The bug here is that with DWARF 4, GCC uses DW_FORM_exprloc when
> emitting the bounds of a variably-sized array.  GDB, however, only
> checks for DW_FORM_block1.
> 
> Jan, any comments?
[...]
> --- a/gdb/dwarf2read.c
> +++ b/gdb/dwarf2read.c
> @@ -8623,7 +8623,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
>    attr = dwarf2_attr (die, DW_AT_upper_bound, cu);
>    if (attr)
>      {
> -      if (attr->form == DW_FORM_block1 || is_ref_attr (attr))
> +      if (attr->form == DW_FORM_block1
> +	  || attr->form == DW_FORM_exprloc
> +	  || is_ref_attr (attr))
and
> -  if (attr && attr->form == DW_FORM_block1)
> +  if (attr && (attr->form == DW_FORM_block1
> +	       || attr->form == DW_FORM_exprloc))

archer-jankratochvil-vla handles DW_FORM_exprloc by using attr_form_is_block
here.  But that may be outside of the scope of this patch, this change is OK.


Thanks,
Jan


  reply	other threads:[~2011-07-15 18:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-15 18:25 Tom Tromey
2011-07-15 18:28 ` Jan Kratochvil [this message]
2011-07-15 20:58   ` Tom Tromey
2011-07-18 15:46     ` Tom Tromey

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=20110715181512.GA20327@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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