On 01/05/2010 06:53 AM, Oman Nadeem wrote: > > ---------------------------------------- >> Date: Fri, 1 Jan 2010 16:28:27 +0000 >> From: aph@xxxxxxxxxx >> On 01/01/2010 02:43 PM, Oman Nadeem wrote: >> >>> I am having a problem with exception handling for C++ on GNU PPC >>> Tools (MPC8xx platform). >>> >>> When I call "throw" from "try" block in my test application to raise >>> an exception the control goes in the following way and traps into >>> "abort" on returning NULL from _Unwind_Find_FDE function. >>> >>> __cxa_throw >>> __Unwind_RaiseException >>> uw_init_context_1 >>> uw_frame_state_for >>> Unwind_Find_FDE ("seen_objects" and "unseen_objects" are NULL so return NULL) >>> Am I missing any switch or initialization related to c++/exception >>> handling? >> >> No, this is one of the things that should "just work". As long as >> you're compling with g++, the right libraries and compile options will >> be selected by default. It may be that you have an incompatible set >> of libraries installed, or that your compiler is broken. > > Thank for prompt reply. > > Is Unwind approach for exception handling is target specific? Somewhat, yes. > If yes then which switches are required to build tools libraries and > which libraries are required for unwinding support on PPC32? It depends. Usually, everything you need will be in libgcc, but it sometimes is shared with glibc. > Currently I am linking with libstdc++.a, libgcc.a, libc.a. And can > I use setjump/longjump approach for exception handling? If yes then > which defines are required to build tools libraries for this > approach? I don't know if sj/lj works on your target. Why all this is broken for you depends on: * Your target OS. * How you built gcc. * Your target binutils In general this does work on PPC. Andrew.