From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30098 invoked by alias); 1 Mar 2012 19:52:19 -0000 Received: (qmail 30079 invoked by uid 22791); 1 Mar 2012 19:52:16 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Mar 2012 19:51:55 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q21Jpghg007869 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Mar 2012 14:51:42 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q21JpeXr006543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 1 Mar 2012 14:51:41 -0500 From: Tom Tromey To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA 1/3] language-specific read_var_value for Ada renamings References: <1330546034-27156-1-git-send-email-brobecker@adacore.com> <1330546034-27156-2-git-send-email-brobecker@adacore.com> Date: Thu, 01 Mar 2012 19:52:00 -0000 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") Message-ID: <87vcmodrqr.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00039.txt.bz2 >>>>> "Joel" == Joel Brobecker 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