berkus wrote:
torshie wrote:
Hi, I have created wiki page
http://wiki.osdev.org/C%2B%2B_Exception_Support , it's about how to add exception support for Itanium C++ ABI compiles. Currenty it's an orphaned page.
Feel free to correct any errors and make any improvements.
Thanks, torshie, this looks really helpful. I thought about implementing some exception support for my IDL stubs, and native C++ support seems like a reasonable idea. libcxxrt is indeed very clean and simple, but libunwind is kinda big. I will look into ripping off only relevant parts of it into a simple package for kernel exceptions support. (LGPL is not an option, unfortunately).
Before I ported libgcc_eh, I succeeded (partially) in porting libunwind. Yes, it's kinda big, compiled binaries is about 200k, so I gave it up. I ported it in a similar way as I ported libgcc_eh. First try to compile all the source files under libunwind/src/unwind, then try to solve all the undefined references and missing headers. Delete some unnecessary funtions. The most difficult two depended headers are <elf.h> & <sys/ucontext.h>. You also need to implement a full-blown dl_iterate_phdr() and rewrite two libunwind asm files: getcontext.S & setcontext.S. All in all it's not that difficult to port libunwind. If you don't need multi-thread support, it can be done within 8 hours