Subject: Fwd: g++ throw/catch on 164LX
To: None <port-alpha@NetBSD.org>
From: Johan Hattne <johan.hattne@embl-hamburg.de>
List: port-alpha
Date: 04/26/2006 15:46:22
On 25 Apr 2006, at 17:46, Nick Hudson wrote:

> On Tuesday 25 April 2006 16:40, you wrote:
>> Dear List;
>>
>> I think I've looked through the obvious sources of information but
>> haven't been able to figure this one out yet.  On my 164LX I cannot 
>> use
>> exceptions in g++ without dumping core.
>>
>> zsh> g++ -Wall -g -o throw throw.cpp && ./throw
>
> Can you share throw.cpp?

Ooops!  Sorry about that...

   #include <iostream>
   int
   main(int argc, char** argv)
   {
     try {
       std::cout << "Throwing" << std::endl;
       throw int(42);
     } catch (...) {
       std::cout << "Cought" << std::endl;
     }
     return 0;
   }

>> Using g++ 3.3.5 from ports, I get segmentation violation instead of
>> abort, with 3.4.6 I again have SIGABRT.  Static linking makes the
>> unaligned accesses go away but not the abort.  Kernel and userland 
>> were
>> built from stable sources updated from CVS around april 11.
>
> What does stock netbsd-3 gcc (3.3.3) give you?

The gdb stuff posted earlier was with stock gcc (unaligned access and 
then SIGABRT).

// Johan