comp.lang.ada
 help / color / mirror / Atom feed
From: James Alan Farrell <anonymous@anonymous.com>
Subject: Re: Strange error in mixed language program (incompatible libraries?)
Date: Tue, 10 Aug 2004 17:36:33 -0400
Date: 2004-08-10T17:36:33-04:00	[thread overview]
Message-ID: <7hfih01clkshqbo2s03ffv1vp5ik0j1i00@4ax.com> (raw)
In-Reply-To: c8qhh0hlvbk7us62bsbs1u2643rfc80m3m@4ax.com

Just some further info:

I tried have tried providing all the .o files from all the children of
ada_interface to gnatbind.  I am still getting the same error.

I also attempted to turn the library into a shared dynamic library,
and I am still getting the same error.  Perhaps I was incorrect when I
said that is working on another program - that other program does not
link the same C files.

Is there anything special I have to do to build the C files I link to
the ada files?


I compiled b~ada_interface with the -g option, then  stepped through
the program with gdb.  I found the crash is occuring at 

      if not E045 then
=>    System.Exception_Table'Elab_Body;
         E045 := True;
      end if;

We looked at what this is doing, and it appears that it registers the
standard Ada errors, but we cannot be sure which particular error is
doing it.  However, at least to me this is not shedding any light.
Why would this crash when C libraries are linked in, but not
otherwise?

thanks,
James


On Tue, 10 Aug 2004 11:31:31 -0400, James Alan Farrell
<anonymous@anonymous.com> wrote:

>Thanx for the help.
>
>I am calling adainit.  I was missing the call to adafinal (my bad) but
>that did not solve the problem (did not expect it too - that comes at
>the end of the program and should not effect the previous execution.)
>
>I have found the following in the make file (set up by someone else
>before I joined the project):
>
>b~ada_interface.o: ada_interface.o 
>	gnatbind -n ada_interface.ali
>	gnatmake -c b~ada_interface.adb
>
>
>Ada_interface has a number of children
>(ie, ada_interface-this.ad[bs] and ada_interface-that.ad[bs])
>
>Do their .ali files need to be explicitly listed in the above bind
>command?
>
>Also, just to make mention of it, another program creates a .so that
>links to this library plus a different C library, and that seems to
>work fine.
>
>James





  reply	other threads:[~2004-08-10 21:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-09 18:37 Strange error in mixed language program (incompatible libraries?) James Alan Farrell
2004-08-10  6:40 ` Simon Wright
2004-08-10  7:04 ` Jerry van Dijk
2004-08-10 13:01   ` Marc A. Criley
2004-08-10 15:31 ` James Alan Farrell
2004-08-10 21:36   ` James Alan Farrell [this message]
2004-08-14 15:29   ` Simon Wright
2004-08-11  8:58 ` Pascal Obry
replies disabled

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