From owner-freebsd-arm@FreeBSD.ORG Sun Jan 18 22:00:53 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90EF8D40 for ; Sun, 18 Jan 2015 22:00:53 +0000 (UTC) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27461369 for ; Sun, 18 Jan 2015 22:00:51 +0000 (UTC) Received: from [192.168.225.11] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id t0IM0glf061445; Sun, 18 Jan 2015 23:00:48 +0100 (CET) (envelope-from andreast-list@fgznet.ch) Message-ID: <54BC2D0A.6080509@fgznet.ch> Date: Sun, 18 Jan 2015 23:00:42 +0100 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Daisuke Aoyama , freebsd-arm@freebsd.org Subject: Re: C++ exception of RPi References: <8938766D727E4CD587AB34DB32A67916@ad.peach.ne.jp> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 22:00:53 -0000 On 18.01.15 17:08, Daisuke Aoyama wrote: > I've written example of C++ exception since just boot up r276981. > Try to compile by "clang++ sample.cc". > If your /lib/libcxxrt.so.1 is not affected, you can get a result like this: > > # ./a.out > catch: 10 > > Otherwise, > > # ./a.out > pid 653 (a.out), uid 0: exited on signal 6 (core dumped) > Abort trap (core dumped) > > sample.cc: > ---------------------------------------------------------------------- > #include > using namespace std; > > int main() > { > try{ > throw 10; > } catch (int e) { > cout << "catch: " << e << endl; > } > } > ---------------------------------------------------------------------- > > Regards, > For the record: andreast@wandquad:~ % clang++ -o sample sample.cc andreast@wandquad:~ % ./sample Bus error (core dumped) andreast@wandquad:~ % g++49 -o sample sample.cc andreast@wandquad:~ % ./sample catch: 10 --- FreeBSD 11.0-CURRENT #32: Sun Jan 18 21:36:10 CET 2015 andreast@t510.andreast.nets:/usr/obj/arm.armv6hf/usr/src/sys/WANDQUAD arm FreeBSD clang version 3.5.1 (tags/RELEASE_351/final 225668) 20150115 --- And g++49 is from ports. Andreas