M68k C++ Exceptions working!

Joel Sherrill joel.sherrill at OARcorp.com
Wed Jan 12 14:21:21 UTC 2000


Charles-Antoine Gauthier wrote:
> 
> Now all we need to figure out is whether exception handling is
> multithread safe and for which configurations, if any. I don't quite
> know what needs to be done to test this. A simple test would be to force
> a context switch from the exception handler to another higher priority
> thread that throws an exception, but that may not prove that the __throw
> functions and its friends are multithread safe.
> 
> Any suggestions?

How about asking on the gcc mailing list what exactly is being protected
by the mutex? :)

If we need it (which we likely will), then I recommend adding extern's
to
gcc for simple routines that exist in RTEMS like
gcc_plusplus_mutex_create,
etc.  We do not want gcc to include rtems.h.
 
> Joel Sherrill wrote:
> >
> > Congratulations!!!
> >
> > Eric Norum wrote:
> > >
> > > I don't exactly know what I did differently, but:
> >
> > When linkcmds get involved, this is how I feel too.
> >
> > If you could figure out what needs to change, I will be
> > happy to propagate the changes into other linkcmds. :)
> >
> > I PROCLAIM THAT THE M68k is NOW ELF!!!!
> >
> > > ======================================================
> > > GLOBAL: Hey I'm in base class constructor number 1 for 0x18f54.
> > > GLOBAL: Hey I'm in base class constructor number 2 for 0x18f60.
> > > GLOBAL: Hey I'm in derived class constructor number 3 for 0x18f60.
> > >
> > > *** CONSTRUCTOR/DESTRUCTOR TEST ***
> > > LOCAL: Hey I'm in base class constructor number 4 for 0x52d84.
> > > LOCAL: Hey I'm in base class constructor number 5 for 0x52d78.
> > > LOCAL: Hey I'm in base class constructor number 6 for 0x52d6c.
> > > LOCAL: Hey I'm in base class constructor number 7 for 0x52d60.
> > > LOCAL: Hey I'm in derived class constructor number 8 for 0x52d60.
> > > IO Stream not tested
> > > LOCAL: Hey I'm in derived class destructor number 8 for 0x52d60.
> > > Derived class - Instantiation order 8
> > > LOCAL: Hey I'm in base class destructor number 7 for 0x52d60.
> > > Instantiation order 8
> > > LOCAL: Hey I'm in base class destructor number 6 for 0x52d6c.
> > > Instantiation order 6
> > > LOCAL: Hey I'm in base class destructor number 5 for 0x52d78.
> > > Instantiation order 5
> > > LOCAL: Hey I'm in base class destructor number 4 for 0x52d84.
> > > Instantiation order 5
> > > *** END OF CONSTRUCTOR/DESTRUCTOR TEST ***
> > >
> > > *** TESTING C++ EXCEPTIONS ***
> > >
> > > foo_function() catch block called:
> > >    < foo_function() throw this exception  >
> > > Success catching a char * exception
> > > foo_function() re-throwing execption...
> > > throw an instance based exception
> > > RtemsException
> > > raised=File:../../../../../../../rtems-current/c/src/tests/samples/cdtest/main.cc,
> > > Line:200, Error=55
> > > Success catching RtemsException...
> > > RtemsException --->
> > > File:../../../../../../../rtems-current/c/src/tests/samples/cdtest/main.cc,
> > > Line:200, Error=55
> > > Exceptions are working properly.
> > > Global Dtors should be called after this line....
> > > GLOBAL: Hey I'm in derived class destructor number 3 for 0x18f60.
> > > Derived class - Instantiation order 3
> > > GLOBAL: Hey I'm in base class destructor number 2 for 0x18f60.
> > > Instantiation order 3
> > > GLOBAL: Hey I'm in base class destructor number 1 for 0x18f54.
> > > Instantiation order 1
> > > =====================================================================
> > >
> > > So it looks like it's all working properly -- at least as far as I can
> > > tell.
> > > Thanks very much for all your patient assistance with this.
> > >
> > > --
> > > Eric Norum                                 eric at cls.usask.ca
> > > Canadian Light Source                      Phone: (306) 966-6308
> > > University of Saskatchewan                 FAX:   (306) 966-6058
> > > Saskatoon, Canada.
> >
> > --
> > Joel Sherrill, Ph.D.             Director of Research & Development
> > joel at OARcorp.com                 On-Line Applications Research
> > Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> >    Support Available             (256) 722-9985
> 
> --
> Charles-Antoine Gauthier
> Institute for Information Technology  Institut de technologie de l'information
> National Research Council of Canada   Conseil national de recherches du Canada

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list