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,4a2c924a54babc2a,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-21 09:51:00 PST Path: nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!news.sprintlink.net!EU.net!Germany.EU.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. Here 's how to !! Date: 21 Dec 1994 14:59:30 GMT Organization: Comp.Center (RUS), U of Stuttgart, FRG Message-ID: <3d9fsi$hqs@info4.rus.uni-stuttgart.de> NNTP-Posting-Host: ifr19.luftfahrt.uni-stuttgart.de Keywords: gnat,os2,gdb Date: 1994-12-21T14:59:30+00:00 List-Id: The subject line says it all. 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 ( 'Is there life on this planet Jim ? ' (;-) ) gdb seems to work o.k. I have to mention one side effect : Normally gdb can't recognize the correct Ada object structure ( see demo2 ) but with the C++ inheriting example it can !!! 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 ' - compile the c-files : 'gcc -c -O2 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 -g -gnatg -gnata' - save 'make_runtime.cmd' - 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 !!! Don't worry about the assembler complaining about unkown commands . The reason is just empty assembler code ! - del gnat1.exe - move gnat1_old.exe gnat1.exe 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 !) 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. I will try to desposit such a package somewhere. Maybe it can be included in the 'cs.nye.edu' server, otherwise i will try to post somewhere else. Also i would to hear from anybody who is willing to rebuild gnat completey based on the emx package. My computer at home has not enough RAM ( only 8 meg. ). This is only of very low-key interest since GNAT works fine anyway. Ralph Paul --------------------------------------------------- E-Mail : ralph@ifr.luftfahrt.uni-stuttgart.de or 'ralph.paul@studbox.uni-stuttgart.de' --------------------------------------------------- University of Stuttgart Inst. of Flight Mechanics and Control Forststrasse 86 70176 Stuttgart, Germany