[fpc-pascal] How __FPC_specific_handler() is invoked

Matias Vara matiasevara at gmail.com
Wed Jul 25 12:55:19 CEST 2018


El mar., 24 jul. 2018 a las 13:57, Sven Barth via fpc-pascal (<
fpc-pascal at lists.freepascal.org>) escribió:

> Matias Vara <matiasevara at gmail.com> schrieb am Di., 24. Juli 2018, 11:04:
>
>> Hello,
>>
>> I am writing my own __FPC_specific_handler() but I can't figure out when
>> this function is registered. I guess this function is registered to the OS
>> to be invoked when an exception happens. In the assembler code I have
>> something like:
>>
>> .seh_handler __FPC_specific_handler, at unwind
>>
>> But I am puzzled by "@unwind". How is __FPC_specific_handler() invoked
>>
>
> To understand the .seh_*-pseudo instructions it's probably best to look at
> their initial check-in in the GNU assembler:
> https://sourceware.org/ml/binutils/2009-08/msg00193.html
>
> The handler function is invoked by Windows when an exception happens
> inside the code that is governed by the surrounding (implicit)
> .seh_(end)proc directives.
>
> Why are you writing your own handler?
>
>
Thanks for the answer, I am trying to make work the exceptions handling in
Toro kernel. Currently Toro is based on Win64 rtl. I think I will give up
with the Win64 RTL and move to a simpler RTL.

Matias



> Regards,
> Sven
>
>> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180725/33186fa1/attachment.html>


More information about the fpc-pascal mailing list