Question about POSIX libgcj signals / exception handling

David Daney ddaney@avtrex.com
Sat Mar 11 17:41:00 GMT 2006


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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /