KJKHyperion wrote:
Peter Dolding wrote:
Dwarf2 is stack-based and integrated into gcc on a lot of platforms. It uses a slightly different wording frame based. Basic operation is the same. Note if stack-based processor operations were patented Intel would hold the patent not Borland since they developed the processor features that let it happen.
nopes, Borland were the first to do stack-based exception handling. Everyone else used sensible architectures with native unwinding and exception handling based on function tables (yes, checked. SEH was developed in parallel on Alpha, VAX and x86 - the aforementioned Tru64, VMS and OS/2 implementations.
And the tradition started back then). And besides, wonderful. Microsoft moves away from stack-based and GCC adopts it? we're screwed. Also: does it support exception handling in C too, now? or only C++? Because we need it in C. GCC's C++ compiler is too slow to turn e.g. our whole kernel into C++, and we have the impression that it generates gigantic executables. Finally: I see no mention in the DWARF specifications of exception handling standards, is this an abusive appropriation of the name as an obscure reference to some GCC internals?
Nop You will find the worlds worse manual here. http://dwarf.freestandards.org/Home.php. Understanding the standard spec almost takes a PHD. This person tried to make it common sense. http://gcc.gnu.org/ml/gcc/2002-07/msg00391.html. Dwarf 2/3 is not locked to C++. I would not have mentioned it if it was locked to C++. I like that you mention unwinding. Guess what dwarf forces sensible unwinding. Unwinding of errors frame handling of errors comes under debuging.
stack-based SEH doesn't depend on x86, either, and I find it much better on the whole. In fact, if we can piss on non-x86 compatibility (at least temporarily), I'd be very happy to port PSEH (it needs only minimal platform-specific code) - I think our system support for exception handling could easily support both, even. It's just the way it is in the real world
Where are do you need porting to?? I really mean where. Find somewhere that Dwarf 2/3 is not there already Win32/64 is about last place for dwarf to appear. The argument over if Gcc should support SEH or Dwarf on windows platforms delayed Dwarf on Mingw. Port PSEH to support Dwarf and that is that. Note if all it needs to operate is Dwarf then OS/X, Linux, FreeBSD and even DJGPP on DOS will all support it overnight. Also gain PSEH optimization like the C++ is gaining without using C++.
Non issue. KJKHyperion not true. A system exists in gcc for frame based exception handling. Its used. Only recently did mingw catch up. Even djgpp for dos has had it for years. Mingw is the last gcc to get it.
hey, it's not like we didn't pressure them all the time. And to repeat myself, we need this in C. Not C++. Absolutely sure of it. And we'll need it to catch faults, such as memory access violations, not just program exceptions - in fact, that's what using SEH in the kernel is all about
Dwarf EH was built for C,C++, fortran. Note I might have missed a few other langs. For correct optimization of the Dwarf EH the complier and linker need to support it. Mingw Gcc until just recently has not supported Dwarf at all. Patched version now has it. You can use Dwarf Exception handling without it in the complier and linker too. Just not as effective.
Reactos is Small fish. I mean Small fish. When OS/X Linux and FreeBSD want exception handling one way and Reactos wants it the other. That is why gcc supports Dwarf. I will say that a PSEH over DWARF would be greatly like by people like me who build stuff on Linux. DWARF EH done in C is not the nicest EH you can find even using nasty C hacks are nicer.
The Dwarf handling code in gcc is in the libgcc.a included with almost all langs built with gcc. Normally it has nothing to do with C++ other than improving C++ exceptions. LD on supported platforms can optimize the Dwarf EH. I really wish Dwarf had not got into the Linux Standard Base and something better had got there. Problem there was nothing else operating cross processor at the time Dwarf won by default.
Peter Dolding