comp.lang.ada
 help / color / mirror / Atom feed
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: GNAT for OS/2 and general GNU questions ...
Date: 26 Mar 1995 12:03:17 -0500
Date: 1995-03-26T12:03:17-05:00	[thread overview]
Message-ID: <3l46ol$909@felix.seas.gwu.edu> (raw)
In-Reply-To: 3l0grb$8ji@toads.pgh.pa.us

In article <3l0grb$8ji@toads.pgh.pa.us>,
Tore Joergensen <tore@lis.pitt.edu> wrote:
>Arcadio Alivio Sincero (lotu@wam.umd.edu) wrote:
>: <deleted>  Are the Ada95, Fortran, and 
>: soon-to-be Extended Pascal GNU compilers merely TRANSLATORS to C or 
>: something? <deleted> 
>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?  
>: <deleted> 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



  reply	other threads:[~1995-03-26 17:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-25  6:55 GNAT for OS/2 and general GNU questions Arcadio Alivio Sincero
1995-03-25  7:30 ` Tore Joergensen
1995-03-26 17:03   ` Michael Feldman [this message]
1995-03-25 19:09 ` Chris O'Regan
1995-03-25 22:09   ` Richard Kenner
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox