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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.DFxaDADwSkn+6wW9Ah21PA.user.gioia.aioe.org!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Intermediate Representation Date: Wed, 01 Apr 2020 16:53:08 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <33f4a7cb-4baa-41fd-b0d5-27501b4fab5a@googlegroups.com> NNTP-Posting-Host: DFxaDADwSkn+6wW9Ah21PA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) Cancel-Lock: sha1:nmF9aT3ugXAUvTzZ2FKCU+LZUBY= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:58272 Date: 2020-04-01T16:53:08+01:00 List-Id: foo wong writes: > I have been using GnuCOBOL extensively since 2013. One thing that I > love about it is that it compiles to intermediate C. > > If you write a program, you can compile it to this, run ctags on the > runtime and the intermediate C and then hop around jumping from the C > function calls generated into the runtime to see how they are actually > implemented. > > I would like to do the same with Ada. Is there a way? Using readelf, I > was able to get some clues and looking at the .ali files I had a few > more clues but so far it does not seem to be the same thing. Try compiling with -gnatG; I found this very helpful when developing Cortex GNAT RTS. You have to keep your wits about you! Look at [1], from section Tasking. This was with GCC 4.9.1 for a restricted runtime: the details, particularly task creation, vary a bit between compiler releases. [1] https://forward-in-code.blogspot.com/2015/06/building-runtime-system-for-arm-eabi.html