mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-09 22:46:16 +02:00
* i386 signal handler receives a ucontext instead of sigcontext
git-svn-id: trunk@1478 -
This commit is contained in:
parent
38993ae7e8
commit
75c00e21c9
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user