[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GNAT/RTEMS exception hamdling continued ...
- Date: Thu, 11 Feb 1999 20:29:30 +0100
- From: jgais at ce.chalmers.se (Jiri Gaisler)
- Subject: GNAT/RTEMS exception hamdling continued ...
I had a few request from people that were interested in the patch
to catch machine error exceptions in gnat-3.11p/rtems. I realised
the my solution was only valid for my own target (sparc/erc32),
so a better fix is needed.
In gnat, machine errors exception handling is installed by
by __gnat_install_handler() defined in a-init.c. There is
one definition per supported OS. The exception handling
consists of two parts - installing trap handlers to catch
unexpected traps and calling __gnat_raise (exception) with
the corresponding Ada exception type. Obviously, the first
step of installing the exception handlers is bsp and architecture
dependent and should not be visible in a-init.c. I suggest
therefore that each bsp includes a special ada support
module that will contain a function to install the trap
handlers and any other Ada support that might be needed
in the future. I will make a first implementation of this
scheme for the erc32 bsp and forward it to Joel for comments.
The change in a-init.c will then be keept to a minimum,
basically just letting __gnat_install_handler()
make a call to something like 'rtems_gnat_install_handler()'.
Jiri.