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]
Other format: [Raw text]

C++ Exceptions in eCos


I'm using C++ to develop in eCos (386), and I discovered that gcc's standard exception handling is not supported. A simple program like this one:

int
main(void)
{
   try { throw 100; } catch(int i) { printf("%d\n", i); }
   return 0;
}

produces an unexpected exit. Adding -fexceptions to the compiler flags doesn't change anything. I have read in the archives that monothreaded exceptions are supported, but I couldn't make this silly example work under eCos. In any case, my application is multithreaded, so I would need the multithreaded exception handling support anyway.
I found Øyvind's patch (being the last thing I heard this one: http://sources.redhat.com/ml/ecos-discuss/2004-02/msg00446.html), but even though his patch was not approved because of symbol naming issues, I couldn't make it work, I have all sorts of linker problems after patching the gcc and the eCos kernel. What's the current state of this problem? Is there a working patch I could use to have C++ exceptions, even though not the final one? If so, what are the exact steps to patch, compiler flags, etc, to make that example I wrote work correctly? If not, is someone working on this, and we could expect something in a reasonable time?
I can provide the steps I followed to patch gcc (3.3.1) and eCos, and what linker errors I have, if necessary. Thank you very much.


Leandro Fanzone.

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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