From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,db735a29a258f826 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.227.230 with SMTP id sd6mr108291pbc.8.1332538647072; Fri, 23 Mar 2012 14:37:27 -0700 (PDT) Path: kz5ni25713pbc.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: Irreflective girl, our Ada Date: Fri, 23 Mar 2012 14:36:04 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8960399.806.1332538564809.JavaMail.geo-discussion-forums@ynjx8> References: <16102793.315.1332456502956.JavaMail.geo-discussion-forums@vbyj18> NNTP-Posting-Host: 24.230.150.102 Mime-Version: 1.0 X-Trace: posting.google.com 1332538646 14665 127.0.0.1 (23 Mar 2012 21:37:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 23 Mar 2012 21:37:26 +0000 (UTC) In-Reply-To: <16102793.315.1332456502956.JavaMail.geo-discussion-forums@vbyj18> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=24.230.150.102; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-03-23T14:36:04-07:00 List-Id: On Thursday, March 22, 2012 5:48:22 PM UTC-5, marius63 wrote: > I am trying to know a subprogram name from its access value. GNAT has part (all?) of the device in place for this. > > GNAT.Traceback.Symbolic.Symbolic_Traceback > ((1 => My_Subprogram'Code_Address)) > > gives the desired name. Note that must be 'Code_Address, not 'Address (this is important). And compile with the -g option, etc. > > But what I have is a pointer to a subprogram (if I had the identifier I would not need this), and alas > > GNAT.Traceback.Symbolic.Symbolic_Traceback > ((1 => My_Subprogram_Ptr.all'Code_Address)) > > does not compile. Is there a way to convert Access to Code_Address (not Address)? Or any other trick to get the name of a subprogram identified solely by its Access value? > > Thanks a lot. Have you tried the Address_to_Access conversions?