This is the mail archive of the archer@sourceware.org mailing list for the Archer 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: C++ Exceptions Status


Ian Lance Taylor wrote:
Phil Muldoon <pmuldoon@redhat.com> writes:

The issue that I am currently wrestling with is how specific is this
unwind and exception work to C++? Are Java and Python exceptions
handled in the same way? And how can we avoid language specific
semantics in very general commands like "next"? Can we?

The system you described is specific to systems that follow the
Itanium C++ ABI (http://www.codesourcery.com/public/cxx-abi/). gcc
follows that ABI on most systems, not just Itanium systems.

Yep totally, I should have pointed that out. Thanks for doing that, and posting the link. I also found the unwinding description in this document:


http://www.x86-64.org/documentation/abi.pdf

very lucid too.

On some systems gcc uses an exception handling system based on setjmp
and longjmp. This will be used if you configure gcc with
--enable-sjlj-exceptions. That is the default on HP/UX 10 and for
older ARM targets.

The existing "next" code should hopefully catch that via its existing longjmp/setjmp logic. But yeah, there is a lot of sjlj specifics defines throughout the code. Point well taken. Step two is to look at how C++ exceptions work here - when I can acquire a suitable target.


When compiling with gcc to native code, Java exceptions are handled
the same way as C++ exceptions.  When compiling to Java bytecode,
exceptions are presumably handled within the JVM.  Most JVMs have
various debugging hooks, but I don't know much about it.

Python is not normally compiled to native code, and exceptions are
handled within the Python interpreter. I don't know much about that
either.

Did not know either of these facts, thanks for adding. My main concern is any solution that is proposed for C++ works in harmony with as many platforms and language exception handling methods as possible. Beyond that, I'm still investigating how to actual effect a change in "next" so it works with C++ exceptions ;)


Thanks,

Phil


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