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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fedc2c9dbc43a8bc,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-22 03:04:31 PST Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!udel!news.mathworks.com!solaris.cc.vt.edu!swiss.ans.net!news.dfn.de!gina.zfn.uni-bremen.de!marvin.pc-labor.uni-bremen.de!news.uni-stuttgart.de!news From: ralph@ifr19.luftfahrt.uni-stuttgart.de (Ralph Paul) Newsgroups: comp.lang.ada Subject: OS2 : emx-gdb for GNAT !! How to get.. ( corrected post ) Date: 22 Dec 1994 11:04:31 GMT Organization: Comp.Center (RUS), U of Stuttgart, FRG Message-ID: <3dbmfv$15nc@info4.rus.uni-stuttgart.de> NNTP-Posting-Host: ifr16.luftfahrt.uni-stuttgart.de Date: 1994-12-22T11:04:31+00:00 List-Id: First of all, I would like to apologize for the mistakes included in the last post, but I do all my OS/2 gnat work at home and the time I had available wasn t much. Corrections are indicated with a @ in the first column I have successfully compiled all the examples ( including the c++ example ) but there still might be some problems in there. I m able to make the 'Ada' examples with no problem at all, but with the C++ to Ada example I had to do linking myself ( no big deal - just little bit annoying, that's all ) It looks as if gnatbl isn't able to handle very long command lines, because it adds some wild looking characters to the name of the output file ( maybe because of the C++ code ? (;-) ) gdb works o.k, also I have to mention one side effect : Normally gdb can't recognize the correct Ada object structure ( see demo2.exe ) but with the C++ inheriting example it can !!! @ if you like to get binary ready to run package look at the end of @ this post Now follows a short ' HOW TO ' summary : ---------------------------------------- o install emx09.a including emxfix01 o install the normal gnat of OS/2. You need to install version 2.00 as well as the file gnat1.exe from the 1.83 version ( Due to a 2.00 problem handling generics ) o move the 'Ada' stuff to the emx directorys : - the gnat* files from \bin to \emx\bin - the dirs. \examples, \gnatlib to \emx o get and install the gnat source files gnat-2.00-src.zip - unzip , ... o now you have to recreate the GNAT runtime libs : 1. The C part: -------------- - copy \emx\include\stdio.h to \emx\include\gn_stdio.h - edit gn_stdio.h and erase the 'static __inline' in front of putchar and getchar - move the files : io-aux.c a-cio.c get_errno.c a-argv.c a-exec.c a-exec.h a-time.c a-exit.c a-raise.c to \emx\gnatlib - cd \emx\gnatlib - edit \emx\gnatlib\io-aux.c and change the '#include ' to '#include ' @ - edit \emx\gnatlib\a-exec.c and delete the @ line #include @ @ - compile the c-files : @ 'gcc -c -O2 -DOS2 io-aux.c a-cio.c get_errno.c @ a-argv.c a-exec.c a-exec.h a-time.c a-exit.c a-raise.c' - create a lib file: 'ar rc ..\lib\gnat.a *.o' ( I'm assuming no other object files in this dir. ! ) 2. The Ada Part : ----------------- - view 'makefile.os2' and search for 'ADA_INCLUDE_SRCS' - create a new file : 'make_runtime.cmd' - copy the text listed underneath 'ADA_INCLUDE_SRCS' : ada.ads ... unchdeal.ads into the file 'make_runtime.cmd' - insert at the beginning of each line @ 'gcc -c -O2 -gnatg -gnata' - save 'make_runtime.cmd' @ disregard the following part !!! @ - move gnat1.exe to gnat1_old.exe @ - now copy the gnat1.exe file from the 1.83 distribtion to @ \emx\bin and run @ 'makeruntime.cmd' @ @ !! It is important to use the old gnat1.exe because @ of bug in generics @ in the 2.00 version !!! @ - del gnat1.exe @ - move gnat1_old.exe gnat1.exe @ the new part replacing it : @ - please use gnat1.exe from the 2.00 distribtion to compile the @ runtime files.The 2.00 version will not compile the file @ s-explli.ads, as it fails in s-expgen.adb. If you want to @ compile this file you have to use gnat1.exe from the 1.83 @ distr. For all the other files use the 2.00 distrb. @ @ Don't worry about the assembler complaining about unkown @ commands . The reasonis just empty assembler code ! Because @ the.adb file is compiled afterwards the object file will be @ o.k. . 3. The gnat Tools Part ----------------------- - get yourself a binary editor - use it on 'gnatbl.exe' and 'gnatbind.exe' to search for an ascii string 'obj' and replace it with 'o ' (spaces do matter here !) Finally all you have to do is set the GNAT env. variables ( see gnatinfo.txt), adapt the makefiles ( change .obj to .o ) and then start compiling all your programs with '-g' : ==> emx-gdb is now usable with OS/2 gnat If anybody is interested in getting a ready to run emx_gnat package, please send me mail. @ Last night I made such a package. I will try to deposit at @ ftp.uni-stuttgart.de://pub/progamming/Ada . It is called @ gnatemx1.zip and gnatemx2.zip . The package will install on top of @ normal emx09a installtion. It includes bin\gnat*, \examples, \gnatlib. @ The examples makefile is adapted and worked fine for me. @ ( execpt for the C++ example ) Ralph Paul --------------------------------------------------- E-Mail : ralph@ifr.luftfahrt.uni-stuttgart.de ralph.paul@studbox.uni-stuttgart.de --------------------------------------------------- University of Stuttgart Inst. of Flight Mechanics and Control Forststrasse 86 70176 Stuttgart, Germany