* OS2 : emx-gdb for GNAT !! How to get.. ( corrected post )
@ 1994-12-22 11:04 Ralph Paul
0 siblings, 0 replies; only message in thread
From: Ralph Paul @ 1994-12-22 11:04 UTC (permalink / raw)
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 <stdio.h>' to '#include <gn_stdio.h>'
@ - edit \emx\gnatlib\a-exec.c and delete the
@ line #include <config.h>
@
@ - 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1994-12-22 11:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-12-22 11:04 OS2 : emx-gdb for GNAT !! How to get.. ( corrected post ) Ralph Paul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox