(Sorry for my poor English)
I am developing a kernel in C++, and would like to use RTTI and exceptions. The compiler used is the DJGPP (GCC 4). I ask this because I don't have found information anywhere.
I founded this References:
http://wiki.osdev.org/C_PlusPlus
http://www.osdever.net/tutorials/pdf/cpp_kernel.pdf
http://www.codesourcery.com/public/cxx-abi/abi-eh.html
http://www.codeproject.com/KB/cpp/exceptionhandler.aspx
http://wiki.osdev.org/Porting_GCC_to_your_OS
http://wiki.osdev.org/Porting_Newlib
http://wiki.osdev.org/OS_Specific_Toolchain
http://wiki.osdev.org/GCC_Cross-Compiler
But could not help me much. Does anyone already tried a kernel 100% in C++?
Thank you.
Exceptions & RTTI in the C++ kernel
Re: Exceptions & RTTI in the C++ kernel
First, I'd recommend making your own cross compiler rather than relying on djgpp. You can follow the GCC Cross-Compiler tutorial to achieve this (you'll also need cygwin as I don't think djgpp has the infrastructure for running configure scripts?). Once you have that, the only extra thing you need for rtti/exceptions is the libsupc++ library, which has a few extra requirements, see libsupcxx. Alternatively, the OS Specific Toolchain tutorial has complete instructions for doing it from scratch, and everything seems to fit together better.
Regards,
John.
Regards,
John.
Re: Exceptions & RTTI in the C++ kernel
I needed something more specific. Someone knows only a tutorial for that matter?
- kataklinger
- Member
- Posts: 381
- Joined: Fri Nov 04, 2005 12:00 am
- Location: Serbia
Re: Exceptions & RTTI in the C++ kernel
Here's the article that discusses Visual C++'s internal implementation of exception. The trick is that the internal implementation is not defined by the standard, so it depends on specific compiler as well as underlying operating system.