> > Do you mean that you need to raise exceptions in the Ada Emacs module,
> > and have somewhere a piece of Emacs C code (or even maybe lisp code?)
> > that need to handle such exceptions ?
>
> No, there's a top level exception handler at the Ada/C interface.
>
> But without --RTS=sjlj, any Ada exception generates SEGV at the point
> the exception is raised.
There is no problem to have a main program calling an Ada shared lib.

Find attached a tz2 tar compressed file which contains the sources
and a compile_me script to build 2 main executables in C:

c_main  : this one contains calls to adainit + a call to an Ada procedure
exported to C. This procedure handles all exceptions and calls another Ada 
procedure
that raises an exception.

dl_open_main: this one does not contain any references to an Ada call.
However, it dynamically loads the Ada shared lib,
acquires the needed symbols, and then do the same sequence
as c_main.

So, in summary:
c_main shows that a main C program can call Ada, compiled with zero cost 
exception.

dl_open_main shows that a main C program can dynamically load a "plugin" written
in Ada, using zero cost exception. The main C program has then no direct 
dependencies
to gnat. In other words, this simulates Emacs (a C program) that loads a plugin.

Philippe

____

This message and any files transmitted with it are legally privileged and 
intended for the sole use of the individual(s) or entity to whom they are 
addressed. If you are not the intended recipient, please notify the sender by 
reply and delete the message and any attachments from your system. Any 
unauthorised use or disclosure of the content of this message is strictly 
prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on 
the part of EUROCONTROL, unless it is confirmed by appropriately signed hard 
copy.

Any views expressed in this message are those of the sender.

Attachment: adashlib.tz2
Description: adashlib.tz2

_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org

Reply via email to