WITH_LLVM_LIBUNWIND vs. WITHOUT_LLVM_LIBUNWIND, clang vs. gcc (such as devel/powerpc64-xtoolchain-gcc ): What is intended to be required for C++ exceptions to work?
David Chisnall
David.Chisnall at cl.cam.ac.uk
Fri Dec 2 10:29:49 UTC 2016
On 2 Dec 2016, at 08:12, Mark Millard <markmi at dsl-only.net> wrote:
>
> [Reminder of my context: these amd64 efforts are really
> trying to make sure that I interpret powerpc family behavior
> correctly for C++ exception handling. Still it may be that
> there are other useful side-effects of my investigations.]
There are two complexities in the unwind implementation: the generic unwinder and the language-specific unwinder (the personality function and the associated data in the language-specific data area, along with how it uses these). The C++ implementation is probably the most complicated of all of these (Ada might be more complex, but let’s not go there). The C unwinder, which just implements __attribute__((cleanup)) is very simple in comparison and should give you easier code to debug (though you’ll need something higher up the stack that actually catches the exception, as the unwinder won’t enter a cleanup unless the exception is caught). The Objective-C implementation is somewhere in between the two in terms of complexity.
David
More information about the freebsd-ppc
mailing list