This is the mail archive of the
mailing list for the Archer project.
Re: C++ Exceptions Status
- From: Ian Lance Taylor <iant at google dot com>
- To: Phil Muldoon <pmuldoon at redhat dot com>
- Cc: Project Archer <archer at sourceware dot org>
- Date: Wed, 06 Aug 2008 07:01:17 -0700
- Subject: Re: C++ Exceptions Status
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta;t=1218031288; bh=iqsJ3tq1K1pgNDfccJ3RXFkRDRE=;h=DomainKey-Signature:To:Cc:Subject:References:From:Date: In-Reply-To:Message-ID:User-Agent:MIME-Version:Content-Type; b=Xa4EygUxG0r4L7CILQkAp7H+qeUHIZJP5wxQE2c7xl0DC0hc/uFzPTkn9hwRi8Ee4E79YXhCII33+mUNaa00dg==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns;h=to:cc:subject:references:from:date:in-reply-to:message-id:user-agent:mime-version:content-type;b=K6rT3BktUjCMDruS8CBuF9uQtTekcC9nfAyOkqgfmwgZ2hE4PJth2zNCGhpQX8z2zCWFMnr0jdMVnylCGAMc5g==
- References: <48999B3C.email@example.com>
Phil Muldoon <firstname.lastname@example.org> 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.
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.
Microsoft Windows uses a different system which gcc does not currently
support, known as SEH.
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