[fpc-pascal] question about _fpc_local_unwind
matiasevara at gmail.com
Fri Feb 2 15:50:22 CET 2018
Thanks for the answer, I will imitate in Toro the behavior of Win64.
2018-02-01 20:49 GMT+01:00 Jonas Maebe <jonas at freepascal.org>:
> On 01/02/18 16:24, Matias Vara wrote:
>> I partial answered my question by reading https://www.freepascal.org/doc
>> s-html/ref/refse114.html. So I think _fpc_local_unwind() is used to call
>> the finally section when "Exit" is executed in the "Try" section. It is not
>> clear yet what the parameters "frame,target: Pointer" are meant to. I
>> checked the code generated in Linux and is a bit different. It is base on
>> the functions FPC_PUSHEXCEPTADDR and FPC_POPADDRSTACK, which It seems much
>> more clear. Is it possible to generate a similar code in the case of Win64?
>> In other words, is it possible to tell the compiler "generate the
>> 'try-finally-end' block as in Linux"? I don't think so but It is worth to
> No, it is not possible. On Win64 the compiler and RTL use so-called
> structured exception handling (SEH), which is required to interoperate with
> code generated by other compilers. See https://msdn.microsoft.com/en-
> us/library/windows/desktop/ms680657(v=vs.85).aspx for more information.
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal