[RFC] Win64 SEH support

Richard Henderson rth@redhat.com
Fri Oct 22 18:30:00 GMT 2010


On 10/22/2010 10:52 AM, Arnaud Charlet wrote:
>> diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c
>> index 512ff36..d23ecf5 100644
>> --- a/gcc/ada/raise-gcc.c
>> +++ 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".

Would it be clearer if that penultimate line were written
using the PERSONALITY_FUNCTION macro?

r~



More information about the Gcc-patches mailing list