This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Win64 SEH support
Arnaud Charlet wrote:
> > +#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);
> > +}
> > The _imp function is passed via argument to the generic
> > _GCC_specific_handler function which does the conversion between
> > "GCC exceptions" and "SEH exceptions".
> > Would it be clearer if that penultimate line were written
> > using the PERSONALITY_FUNCTION macro?
>
> Possibly yes. Olivier, what you think?
I think it would clarify a bit, yes.
My understanding is that we have two functions named "personality"
with different conceptual roles in the processing chain; very roughly:
interfacing with the unwinding engine, via indirect call through pointer
in the unwind info for a frame, vs decoding the gcc exception tables to
decide for a given context.
PERSONALITY_FUNCTION denotes a specific one of those roles (the latter),
and everything that can be done to make the relationships explicit seems
useful to me. In many cases, the same function plays the two roles so
there's no ambiguity.
Thanks Richard for this very nice piece of work :)
Olivier