From owner-freebsd-ppc@freebsd.org Fri Dec 2 10:29:49 2016 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C942C62B59; Fri, 2 Dec 2016 10:29:49 +0000 (UTC) (envelope-from dc552@hermes.cam.ac.uk) Received: from ppsw-41.csi.cam.ac.uk (ppsw-41.csi.cam.ac.uk [131.111.8.141]) by mx1.freebsd.org (Postfix) with ESMTP id E77E61BE5; Fri, 2 Dec 2016 10:29:48 +0000 (UTC) (envelope-from dc552@hermes.cam.ac.uk) X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from host81-157-247-183.range81-157.btcentralplus.com ([81.157.247.183]:54643 helo=[192.168.1.65]) by ppsw-41.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.159]:465) with esmtpsa (PLAIN:dc552) (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1cCl6A-0007EN-Sj (Exim 4.86_36-e07b163) (return-path ); Fri, 02 Dec 2016 10:29:46 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) 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? From: David Chisnall In-Reply-To: Date: Fri, 2 Dec 2016 10:29:46 +0000 Cc: Ed Maste , FreeBSD Toolchain , Dimitry Andric , FreeBSD PowerPC ML Content-Transfer-Encoding: quoted-printable Message-Id: References: <750FCE4D-F25B-46E1-9383-B8A94AAA8792@dsl-only.net> <81CBAB7A-B855-4673-B2E2-7862F441FDDA@dsl-only.net> <68972A8F-C8D4-4FF2-A933-ACCC79C15065@dsl-only.net> <8BA319C6-FAD1-445F-85C1-5086B5AA59A8@dsl-only.net> To: Mark Millard X-Mailer: Apple Mail (2.3124) Sender: "Dr D. Chisnall" X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2016 10:29:49 -0000 On 2 Dec 2016, at 08:12, Mark Millard 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