WAROQUIERS Philippe <[email protected]> writes: >> The module doesn't compile on Linux, because GNAT GPL 2014 doesn't >> provide a (static or dynamic) libgnat for the sjlj runtime that is >> compiled with -fPIC. I need -fPIC on all code in order to include it in >> the dynamic library that is the Emacs module. I need the sjlj runtime to >> support raising exceptions in the module; since Emacs is not an Ada >> main, it uses the sjlj exception method. > > I am not sure I understand the context. > 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. > The fact that Emacs is not an Ada main does not forbid to use the > zero-cost exception model inside the Ada module. That's not my experience. I don't have detailed notes on the exact problem; I remember having similar problems with Gtk programs, so maybe I'm remembering the problem wrong, but things Don't Work without sjlj. Maybe the problem is actually that the Ada code (the parser) calls elisp code (the parser actions), and sometimes the elisp code throws signals for errors; those have to propagate back thru the Ada code to the Emacs (elisp) main. I guess I should recompile without sjlj and get a good description of the actual problem. -- -- Stephe _______________________________________________ Emacs-ada-mode mailing list [email protected] http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org
