This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Win64 SEH support
> >> +++ b/gcc/ada/raise-gcc.c
> >> @@ -1029,6 +1029,8 @@ extern void __gnat_notify_unhandled_exception
> >> (void);
> >>
> >> #ifdef __USING_SJLJ_EXCEPTIONS__
> >> #define PERSONALITY_FUNCTION __gnat_personality_sj0
> >> +#elif defined(__SEH__)
> >> +#define PERSONALITY_FUNCTION __gnat_personality_imp
> >
> > Shouldn't that be __gnat_personality_seh0 instead?
> >
> >> +#ifdef __SEH__
> >> +EXCEPTION_DISPOSITION
> >> +__gnat_personality_seh0 (PEXCEPTION_RECORD ms_exc, void
> >> *this_frame,
> >> + PCONTEXT ms_orig_context,
> >> + PDISPATCHER_CONTEXT ms_disp)
> >> +{
> >> + return _GCC_specific_handler (ms_exc, this_frame,
> >> ms_orig_context,
> >> + ms_disp, __gnat_personality_imp);
> >> +}
>
> No, look closer. The _imp function is passed via argument to
> the generic _GCC_specific_handler function which does the
> conversion between "GCC exceptions" and "SEH exceptions".
OK, I see now. Thanks.
> Would it be clearer if that penultimate line were written
> using the PERSONALITY_FUNCTION macro?
Possibly yes. Olivier, what you think?
Arno