This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ Exception Handling under eCos


Andrew Lunn wrote:
> 
> > I have already been working on this too. The complication with eCos is that
> > at the time you build the toolchains, there's no guarantee that the kernel
> > is present. I have a solution to this, but it's trickier than a
> > straightforward hack.
> 
> Well rather than putting the functionality in libgcc2.a you could put
> it into the eCos kernel. Don't change libgcc and let the linker sort
> it all out.

Alas it doesn't work like that. The meshing between the threaded
environment and the exception handling code is the "gthread" interface,
which includes inline functions and a mutex type that must be available at
compiler build time.

> > I've attached a very minimal patch for the EBSA (which wasn't my primary
> > target, hence the minimal nature at this stage) which I believe should give
> > you something that works (no promises :)). It's relative to hal/arm.
> 
> This provides the linker stuff, but what about libgcc2. Do you only
> need that if you have multi-threaded applications and want to be
> thread safe?

Yes. The patch I gave should allow you to use exceptions at all. But they
won't be thread-safe.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]