comp.lang.ada
 help / color / mirror / Atom feed
* OS2 : emx-gdb for GNAT. Here 's how to  !!
@ 1994-12-21 14:59 Ralph Paul
  0 siblings, 0 replies; only message in thread
From: Ralph Paul @ 1994-12-21 14:59 UTC (permalink / raw)


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 <stdio.h>' to '#include <gn_stdio.h>'
	  - 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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1994-12-21 14:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-12-21 14:59 OS2 : emx-gdb for GNAT. Here 's how to !! Ralph Paul

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