This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about POSIX libgcj signals / exception handling


Mohan Embar wrote:

One thing that you need to remember if you are using native code is to have GCC generate exception data for all your non-java code so that faults in native code can be gracefully handled.


Can you explain what you mean by this? Doesn't this happen automatically
in C++?


By default g++ does have exception handling enabled. You can turn it off with -fno-exception (sp?).


If you are integrating legacy C or assembly code, you have to arrange it so that the exception tables are generated. Use -fexception -fnon-call-exceptions I think for gcc. For assembly things get much more complicated (look at the libffi source for examples).

David Daney


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]