This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: C++ Exception Handling under eCos
- To: andrew dot lunn at ascom dot ch, jlarmour at redhat dot com
- Subject: Re: [ECOS] C++ Exception Handling under eCos
- From: "Rosimildo daSilva" <rosimildo at hotmail dot com>
- Date: Sat, 17 Mar 2001 10:55:25 -0600
- Cc: ecos-discuss at sources dot redhat dot com
>From: Andrew Lunn <andrew.lunn@ascom.ch>
>To: Jonathan Larmour <jlarmour@redhat.com>
>CC: Rosimildo daSilva <rosimildo@hotmail.com>,
>ecos-discuss@sources.redhat.com
>Subject: Re: [ECOS] C++ Exception Handling under eCos
>
>Could you point me towards some documentation as to what is
>required. eCos already has mutex and per thread data storage, so at
>least that part is done.
As far I can tell, the docs for this is the GCC source code. :-)
Look at: gcc/configure.in
Study what is done with 'thread_file'. This variable
is set to the proper header file when the option
./configure --enable-threads
is given. So, a ecos dependent header needs to be added.
Study the posix header file:
gcc/gthr-posix.h
or others RTOS' ones, such as VxWorks if you are familiar with it.
A couple trick things:
+ Remember that you do not have the Ecos header files
at the time that you are building the toolset.
+ I would suggest to make all typedefs 'opaque' using
'void *' to avoid dependency on eCos header files.
+ Add an API layer, similar to POSIX, that make calls
to the implementation that will be provided by Ecos
libraries. A default implementation would be emtpy functions
( when no kernel is configured ) for GDB stubs compilation.
Another reason to do this, is that you cab change, fix, optimize,
etc, the implementation on Ecos wihtout worring about
GCC releases.
+ If you want examples, look at the RTEMS or vxWorks implementations. But,
you would need a very recent
snapshot of GCC.
...
Take care. As I said before, this is not a picnic
at the park. :-)
Rosimildo.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com