* some safecall issues fixed

git-svn-id: branches/debug_eh@41406 -
This commit is contained in:
florian 2019-02-20 21:53:27 +00:00
parent 4b66dc0a94
commit 3c61bb9c5d
2 changed files with 11 additions and 2 deletions

View File

@ -1354,7 +1354,11 @@ implementation
if-branch -> fc_inflowcontrol) }
if (tf_safecall_exceptions in target_info.flags) and
(current_procinfo.procdef.proccalloption=pocall_safecall) then
handle_safecall_exception
begin
handle_safecall_exception;
{ we have to jump immediatly as we have to return the value of FPC_SAFECALL }
hlcg.a_jmp_always(current_asmdata.CurrAsmList,oldCurrExitLabel);
end
else
cexceptionstatehandler.handle_reraise(current_asmdata.CurrAsmList,excepttemps,finallyexceptionstate,exceptframekind);
{ we have to load 0 into the execepttemp, else the program thinks an exception happended }

View File

@ -465,7 +465,12 @@ implementation
(current_procinfo as tpsabiehprocinfo).PushAction(action);
(current_procinfo as tpsabiehprocinfo).PushLandingPad(action);
if exceptframekind<>tek_except then
(current_procinfo as tpsabiehprocinfo).CurrentAction.AddAction(nil);
{ no safecall? }
if use_cleanup(exceptframekind) then
(current_procinfo as tpsabiehprocinfo).CurrentAction.AddAction(nil)
else
{ if safecall, catch all }
(current_procinfo as tpsabiehprocinfo).CurrentAction.AddAction(tobjectdef(-1));
flowcontrol:=[fc_inflowcontrol,fc_catching_exceptions];
if exceptframekind<>tek_except then