Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [3/3] RFC - optional patch to restore DW_AT_data_member_location
Date: Tue, 21 Aug 2012 22:12:00 -0000	[thread overview]
Message-ID: <CADPb22R-+rTSRBH6HvVaGbeTkSt=4CJ3pUwO+zb726x4Jg+N+A@mail.gmail.com> (raw)
In-Reply-To: <87628cfbg2.fsf@fleche.redhat.com>

On Tue, Aug 21, 2012 at 9:37 AM, Tom Tromey <tromey@redhat.com> wrote:
> This patch reimplements DW_AT_data_member_location for variables
> appearing in a Fortran common block.
>
> This attribute is not specified by DWARF.  It is apparently an old
> approach used by gfortran prior to 2008; at least it appeared in
>
>     http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23057
>
> This patch is based on the idea that such attributes are relatively
> rare.  So, rather than implement complicated support for them, gdb just
> rewrites them into an ordinary location expression that uses the common
> block's location as a subroutine.
>
> I've included a new test case, which I made by editing the assembly
> output of gfortran by hand.
>
> Built and regtested on x86-64 Fedora 16.
>
> I consider this patch optional, because I think it is too much
> complicated code in support of a marginal and obsolete feature.
> However, I wrote it in case someone thinks that supporting 4 year old
> versions of gfortran is important.
>
> Tom
>
>         * dwarf2read.c (mark_common_block_symbol_computed): New function.
>         (read_common_block): Handle child DIEs with
>         DW_AT_data_member_location.
>         (new_symbol_full): Add special case for common blocks.
>
>         * gdb.dwarf2/dw2-common-block.S: New file.
>         * gdb.dwarf2/dw2-common-block.exp: New file.

I'm all for holding off until someone presents a *compelling* use case.


  reply	other threads:[~2012-08-21 22:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21 18:22 Tom Tromey
2012-08-21 22:12 ` Doug Evans [this message]
2012-08-24 16:53   ` Jan Kratochvil
2012-09-02 15:04     ` Joel Brobecker
2012-09-11 20:42       ` Tom Tromey
2012-08-26  8:12 ` Jan Kratochvil
2012-09-11 20:56   ` Tom Tromey
2012-09-12 13:25     ` Jan Kratochvil
2012-09-12 14:26       ` Tom Tromey
2012-09-12 14:36         ` Tom Tromey
2012-09-12 14:39 ` Tom Tromey
2012-09-26 19:11   ` 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='CADPb22R-+rTSRBH6HvVaGbeTkSt=4CJ3pUwO+zb726x4Jg+N+A@mail.gmail.com' \
    --to=dje@google.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