* i386 signal handler receives a ucontext instead of sigcontext

git-svn-id: trunk@1478 -
This commit is contained in:
peter 2005-10-18 13:41:48 +00:00
parent 38993ae7e8
commit 75c00e21c9
2 changed files with 17 additions and 3 deletions

View File

@ -32,7 +32,7 @@ begin
end;
procedure SignalToRunerror(sig : longint; SigInfo: PSigInfo; SigContext: PSigContext);cdecl;
procedure SignalToRunerror(sig : longint; SigInfo: PSigInfo; UContext: Pucontext);cdecl;
var
res,fpustate : word;
begin
@ -43,7 +43,7 @@ begin
{ this is not allways necessary but I don't know yet
how to tell if it is or not PM }
res:=200;
fpustate:=GetFPUState(SigContext^);
fpustate:=GetFPUState(UContext^.uc_mcontext);
if (FpuState and FPU_All) <> 0 then
begin
{ first check the more precise options }
@ -71,6 +71,6 @@ begin
reenable_signal(sig);
{ give runtime error at the position where the signal was raised }
if res<>0 then
HandleErrorAddrFrame(res,pointer(SigContext^.eip),pointer(SigContext^.ebp));
HandleErrorAddrFrame(res,pointer(UContext^.uc_mcontext.eip),pointer(UContext^.uc_mcontext.ebp));
end;

View File

@ -55,4 +55,18 @@ type
cr2: cardinal;
end;
tsigaltstack=record
ss_sp : pointer;
ss_flags : longint;
ss_size : longint;
end;
Pucontext=^Tucontext;
TUcontext=record
uc_flags : cardinal;
uc_link : Pucontext;
uc_stack : tsigaltstack;
uc_mcontext : tsigcontext;
uc_sigmask : tsigset;
end;