gnat/rtems,gnat3.12p,gcc2.8.1,hello_world_ada
lange92 at 2067.resnet.uni.edu
lange92 at 2067.resnet.uni.edu
Tue Aug 7 02:12:27 UTC 2001
On Mon, 6 Aug 2001, Joel Sherrill wrote:
> lange92 at 2067.resnet.uni.edu wrote:
> >
> > I also have not figured out the use of "-n" and where to put a reference
> > to call "adafinal", as Joel pointed out in a previous message.
>
> You should call it once ada_main returns to do cleanup before exitting
> the application.
A second attempt with lilo and the pc486 bsp (once as ELF, once as COFF)
simply appeared to freeze the computer. This brings up the possibility
that the main procedure in hello.adb is not actually executing at all.
Does the init routine control execution of the ada program?
If it does, I may have found a relevant section in the gnat-3.12p User
Guide. It refers to a package called P, and talks of using the "gcc -c"
option in the surrounding text. From the text (edited for brevity and
readability):
"
__gnat_initialize ();
adainit();
_ada_m ();
adafinal();
__gnat_finalize ();
exit (gnat_exit_status);
The call to __gnat_initialize and the corresponding call at the end of
execution to __gnat_finalize allow any specialized initialization and
finalization code to be hooked in. The default versions of these routines
do nothing.
The call to m is the call to the main program."
Now, I see no obvious connection between the _ada_main that init.c has,
and this mysterious _ada_m that is mentioned in the user guide. Is it
possible that we call the initialization/finalization routines, but
somehow avoid execution of the actual executable code in the ada file?
Thoughts and insight are welcomed in this mental experiment in finding the
cause of the problem here. Thanks again.
DanL
More information about the users
mailing list