[ECOS] C++ Exception Handling under eCos

Rosimildo daSilva rosimildo@hotmail.com
Thu Mar 15 09:23:00 GMT 2001


>From: "Gunnar Kunz" <gunnar.kunz@ascom.ch>
>To: <ecos-discuss@sources.redhat.com>
>Subject: [ECOS] C++ Exception Handling under eCos
>Date: Thu, 15 Mar 2001 16:37:14 +0100
>
>Hi!
>
>Can anybody tell me wether C++ exception handling is supported under eCos,
>or not?
>In case it is supported, what do I have to do to make it work properly?
>

No, it is not supported.

To make it to work, it requires some work at GCC level. Basically,
to make exceptions *thread-safe*, you would need to make some changes
to GCC. You have to provide some functions that goes to libgcc2.a.
They are basically provided a global mutex that gets created, and something 
similar to a POSIX key, so each thread get its own context to store the info 
for each exception. I have
done the work on this area for RTEMS. It is not a picnic in
the park. :-)

Also, a few extras sections to the linker scripts might be necessary.
I have not looked too close to the eCos scripts.

So, I would say that it is not supported today.

But, if you are writing a *single threaded application*, you might
remove "-fno-exceptions" from the makefiles, and it might work. :-)

Rosimildo.







_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com



More information about the Ecos-discuss mailing list