Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Dec 2016 10:29:46 +0000
From:      David Chisnall <David.Chisnall@cl.cam.ac.uk>
To:        Mark Millard <markmi@dsl-only.net>
Cc:        Ed Maste <emaste@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, Dimitry Andric <dim@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: WITH_LLVM_LIBUNWIND vs. WITHOUT_LLVM_LIBUNWIND, clang vs. gcc (such as devel/powerpc64-xtoolchain-gcc ): What is intended to be required for C++ exceptions to work?
Message-ID:  <C58B3DFE-C834-48B8-A1D4-9501410F5626@cl.cam.ac.uk>
In-Reply-To: <A44D5301-12A4-46FA-B9A0-A6BC4FF1EB8B@dsl-only.net>
References:  <750FCE4D-F25B-46E1-9383-B8A94AAA8792@dsl-only.net> <CAPyFy2ArXUYsyTC9LY_CqbU3FLVV0TeV%2BSandqd-SpPGMBL6Cg@mail.gmail.com> <81CBAB7A-B855-4673-B2E2-7862F441FDDA@dsl-only.net> <68972A8F-C8D4-4FF2-A933-ACCC79C15065@dsl-only.net> <8BA319C6-FAD1-445F-85C1-5086B5AA59A8@dsl-only.net> <BB2D1D3F-8B3F-4F2F-A431-A65E86C30516@dsl-only.net> <A44D5301-12A4-46FA-B9A0-A6BC4FF1EB8B@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2 Dec 2016, at 08:12, Mark Millard <markmi@dsl-only.net> wrote:
>=20
> [Reminder of my context: these amd64 efforts are really
> trying to make sure that I interpret powerpc family behavior
> correctly for C++ exception handling. Still it may be that
> there are other useful side-effects of my investigations.]

There are two complexities in the unwind implementation: the generic =
unwinder and the language-specific unwinder (the personality function =
and the associated data in the language-specific data area, along with =
how it uses these).  The C++ implementation is probably the most =
complicated of all of these (Ada might be more complex, but let=E2=80=99s =
not go there).  The C unwinder, which just implements =
__attribute__((cleanup)) is very simple in comparison and should give =
you easier code to debug (though you=E2=80=99ll need something higher up =
the stack that actually catches the exception, as the unwinder won=E2=80=99=
t enter a cleanup unless the exception is caught).  The Objective-C =
implementation is somewhere in between the two in terms of complexity.

David




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C58B3DFE-C834-48B8-A1D4-9501410F5626>