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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fb4a35c55bb3cbc5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-27 06:00:42 PST Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!news.sprintlink.net!uunet!gwu.edu!gwu.edu!not-for-mail From: mfeldman@seas.gwu.edu (Michael Feldman) Newsgroups: comp.lang.ada Subject: Re: GNAT for OS/2 and general GNU questions ... Date: 26 Mar 1995 12:03:17 -0500 Organization: George Washington University Message-ID: <3l46ol$909@felix.seas.gwu.edu> References: <3l0eoq$kjb@cville-srv.wam.umd.edu> <3l0grb$8ji@toads.pgh.pa.us> NNTP-Posting-Host: 128.164.9.3 Date: 1995-03-26T12:03:17-05:00 List-Id: In article <3l0grb$8ji@toads.pgh.pa.us>, Tore Joergensen wrote: >Arcadio Alivio Sincero (lotu@wam.umd.edu) wrote: >: Are the Ada95, Fortran, and >: soon-to-be Extended Pascal GNU compilers merely TRANSLATORS to C or >: something? >No. The GNU compiler is some kind of a multilanguage compiler. I'm not >quite sure how it works, but it is not a C translator. The program that invokes GNAT, "gcc" is a "driver" that notices the file extension of the source file and invokes the proper compiler. The current version of gcc recognizes .ads and .adb as Ada file extensions, and - if you have the GNAT components installed - invokes GNAT. As has been explained many times here and elsewhere, The gcc compilers do _not_ produce C, they produce a common intermediate language which is then assembled. GNAT just fits into this system. As it happens, the GNAT _binder_ (Ada-level linker) generates a small C program as a "driver" for your main Ada program. This is done to provide a framework for the elaboration routines that elaborate the packages you've WITH-ed. The C compiler is then called to compile this small driver program (a page or so) and the whole is then linked by the system linker. > >: Also, is there a full screen, source level debugger available for GNAT? >: something like that available for OS/2 only for Ada95? >I've heard about a debugger that thinks it is C code. You can debug, >but you don't get the Ada-code. I've heard they will make an Ada-version >when the compiler is finished. Don't know if it is fullscreen. The "standard" GNU-system debugger, GDB, is a line-oriented debugger. Because names of packages, variables, etc., are somewhat transformed by GNAT, GDB does not (yet) recognize your program variables directly. (As a simple example, your overloaded operators are transformed into identifiers like plus, minus, etc.) On the other hand, it is not too hard to learn the naming scheme, and gdb is usable for anyone willing to take the time. The nice thing (or the aggravating thing, whatever) about the whole GCC system is that its look and feel is pretty platform-independent - it all looks like Unix. So GDB works very much the same on Unix, DOS, OS/2, etc. There is, in fact, an ongoing project to make GDB more Ada-aware. I don't know if it'll be full-screen either. I'm sure Dave Weller and others will respond with other comments about GNAT-OS/2, so I'll let it go with one more comment: it is quite unrealistic to expect everything to be done at once. We all have our wish lists for GNAT, and the GNAT contract calls essentially for developing the compiler, binder, and most of the standard libraries. The rest is, in a very real sense, up to you and me. The source code for the whole GCC system is freely available (indeed, that is the whole idea!), and anyone can add functionality, bindings, GUI's, etc. For instance, NYU's contrib library, pub/gnat/contrib, has a nice, and rapidly maturing, binding to the OS/2 Presentation Manager, so you can write actual OS/2 apps, today. The demos are nice. Bill Yow has done a splendid job so far, as is continuing the work. We are doing some GNAT work at GW too: our first "product" is a Turbo-like editor/IDE for the DOS version; it is in NYU's contrib library, pub/gnat/contrib/gwu/gw-gnat. Our users have commented favorably on the way we've "packaged" GNAT to get away from the command line. This is pretty preliminary; stay tuned for more features. Mike Feldman