Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jan 2015 23:00:42 +0100
From:      Andreas Tobler <andreast-list@fgznet.ch>
To:        Daisuke Aoyama <aoyama@peach.ne.jp>, freebsd-arm@freebsd.org
Subject:   Re: C++ exception of RPi
Message-ID:  <54BC2D0A.6080509@fgznet.ch>
In-Reply-To: <B2EE65BDDC8E4D059172C2E23AB9E147@ad.peach.ne.jp>
References:  <8938766D727E4CD587AB34DB32A67916@ad.peach.ne.jp> <B2EE65BDDC8E4D059172C2E23AB9E147@ad.peach.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <iostream>
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54BC2D0A.6080509>