This is the mail archive of the 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]
Other format: [Raw text]

RE: eCos and C++

> From: graham labdon
> Hello everyone
> Can anyone please tell me if eCos supports C++ STL

The problem with the C++ library (not just containers, but C++ strings too)
is that it relies on exceptions to report out-of-memory, and off-the-shelf
eCos doesn't properly support C++ exception handling. (At least 2.x
doesn't--I don't think 3.0 does either.)

But if you have so much RAM that you know you'll never run out, then you may
be able to fudge it. I would assume you'd have to change the compiler flags
manually, and I can't promise that the compiler won't generate code that
breaks something even when exceptions aren't actually thrown. I'd write some
test code that contains automatic objects with destructors, and maybe a
try/catch block, and read the assembler output to make sure it doesn't refer
to some data structure that eCos doesn't initialize. And of course, this
hackery might work on some CPUs but not others.

The right way to do this is to buy the eCosCentric version of eCos, which
has a modified kernel that properly supports C++ exceptions in a thread-safe
manner. Don't know if the 3.0 version is ready yet.


Ciao,               Paul D. DeRocco

Before posting, please read the FAQ:
and search the list archive:

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