From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA 1/3] language-specific read_var_value for Ada renamings
Date: Thu, 01 Mar 2012 19:52:00 -0000 [thread overview]
Message-ID: <87vcmodrqr.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1330546034-27156-2-git-send-email-brobecker@adacore.com> (Joel Brobecker's message of "Wed, 29 Feb 2012 12:07:12 -0800")
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> procedure Foo is
Joel> GV : Integer renames Pck.Global_Variable;
Joel> begin
Joel> Increment (GV); -- STOP
Joel> end Foo;
Joel> (1) Variable "GV" does not exist, which is normal, since there is
Joel> "GV" the renaming of another variable;
Joel> (2) But to allow the user access to that renaming the same way
Joel> the code has, the compiler produces an artificial variable
Joel> whose name encodes the renaming:
Joel> gv___XR_pck__global_variable___XE
Joel> For practical reasons, the artificial variable itself is given
Joel> irrelevant types and addresses.
I think the patch is fine, given that we've already gone pretty far down
this road.
I wonder whether it would be possible to deal with the renaming when
reading symbols. If it is possible then I think it would be a better
design -- it would let us pretend that all these magic symbols and
whatnot are really just a facet of debuginfo (which, I think we agree,
they really should have been) -- and it would eliminate a number of
virtual methods throughout the core of gdb. This in turn is a plus
because each virtual method adds to the conceptual load of gdb
maintenance.
Tom
next prev parent reply other threads:[~2012-03-01 19:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-29 20:07 Better support for Ada renamings in "info locals" output Joel Brobecker
2012-02-29 20:07 ` [RFA 1/3] language-specific read_var_value for Ada renamings Joel Brobecker
2012-03-01 19:52 ` Tom Tromey [this message]
2012-03-01 22:58 ` Joel Brobecker
2012-03-02 14:20 ` Tom Tromey
2012-03-02 19:33 ` Joel Brobecker
2012-02-29 20:07 ` [PATCH 3/3] Testcase: "info locals" with " Joel Brobecker
2012-03-02 19:34 ` Joel Brobecker
2012-02-29 20:16 ` [commit/Ada 2/3] processId: Do not modify already encoded IDs Joel Brobecker
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=87vcmodrqr.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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