Re: [fpc-pascal] How do FreePascal implement hardware exceptions handling?

2012-12-17 Thread Andrzej Borucki
2012/12/16 Sven Barth pascaldra...@googlemail.com

 Why are you doing this? install_exception_handlers is called during
 process entry of Win32/Win64 programs already, so calling this twice can be
 considered a bad(TM) idea.

 Regards,

Maybe hence problems. I want to create own compiler for simplified language
with exceptions. I analyze exceptions handling by copying fpc_NNN and
setJmp routines to Delphi.

Regards,Andrzej
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] How do FreePascal implement hardware exceptions handling?

2012-12-16 Thread Andrzej Borucki
I analyze FreePascal exceptions handling. Instead use of try-excpt-finally
statement I rather use fpc_LongJmp,fpc_PushExceptAddr etc. It works fine
for software exceptions (fpc_RaiseException) but not handle hardware
exceptions. I use install_exception_handlers at start program. This call
SetUnhandledExceptionFilter(@syswin32_i386_exception_handler) but is
problem:
in syswin32_i386_exception_handler is comparing if
excep^.ContextRecord^.SegSs = _SS then - _SS is correct stack segment but
excep^.ContextRecord^.SegSs - no, it is a different value, why?
I can attach my files

best,
Andrzej Borucki
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal