Browse Source

* More comments can never harm.

git-svn-id: trunk@27161 -
sergei 11 years ago
parent
commit
1d5dc8c3bd
1 changed files with 8 additions and 0 deletions
  1. 8 0
      rtl/win64/seh64.inc

+ 8 - 0
rtl/win64/seh64.inc

@@ -379,6 +379,8 @@ begin
   Result:=True;
   Result:=True;
 end;
 end;
 
 
+{ This is an outermost exception handler, installed using assembler around the
+  entrypoint and thread procedures. Its sole purpose is to provide sensible exitcode. }
 function __FPC_default_handler(
 function __FPC_default_handler(
   var rec: TExceptionRecord;
   var rec: TExceptionRecord;
   frame: Pointer;
   frame: Pointer;
@@ -415,12 +417,18 @@ begin
         Halt(217);
         Halt(217);
       end;
       end;
 L1:
 L1:
+      { RtlUnwindEx above resets execution context to the point where the handler
+        was installed, i.e. main_wrapper. It makes exiting this procedure no longer
+        possible, halting is the only possible action here. }
       RunError(217);
       RunError(217);
     end;
     end;
   end;
   end;
   result:=ExceptionContinueSearch;
   result:=ExceptionContinueSearch;
 end;
 end;
 
 
+
+{ This handler is installed by compiler for every try..finally and try..except statement,
+  including implicit ones. }
 function __FPC_specific_handler(
 function __FPC_specific_handler(
   var rec: TExceptionRecord;
   var rec: TExceptionRecord;
   frame: Pointer;
   frame: Pointer;