mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-23 22:52:13 +02:00
Merged revisions 1478 via svnmerge from
http://peter@svn.freepascal.org/svn/fpc/trunk r1478 (peter) * i386 signal handler receives a ucontext instead of sigcontext git-svn-id: branches/fixes_2_0@1513 -
This commit is contained in:
parent
05c8579e63
commit
5f8bf1570f
@ -32,7 +32,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure SignalToRunerror(sig : longint; SigInfo: PSigInfo; SigContext: PSigContext);cdecl;
|
procedure SignalToRunerror(sig : longint; SigInfo: PSigInfo; UContext: Pucontext);cdecl;
|
||||||
var
|
var
|
||||||
res,fpustate : word;
|
res,fpustate : word;
|
||||||
begin
|
begin
|
||||||
@ -43,7 +43,7 @@ begin
|
|||||||
{ this is not allways necessary but I don't know yet
|
{ this is not allways necessary but I don't know yet
|
||||||
how to tell if it is or not PM }
|
how to tell if it is or not PM }
|
||||||
res:=200;
|
res:=200;
|
||||||
fpustate:=GetFPUState(SigContext^);
|
fpustate:=GetFPUState(UContext^.uc_mcontext);
|
||||||
if (FpuState and FPU_All) <> 0 then
|
if (FpuState and FPU_All) <> 0 then
|
||||||
begin
|
begin
|
||||||
{ first check the more precise options }
|
{ first check the more precise options }
|
||||||
@ -71,6 +71,6 @@ begin
|
|||||||
reenable_signal(sig);
|
reenable_signal(sig);
|
||||||
{ give runtime error at the position where the signal was raised }
|
{ give runtime error at the position where the signal was raised }
|
||||||
if res<>0 then
|
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;
|
end;
|
||||||
|
|
||||||
|
@ -55,4 +55,18 @@ type
|
|||||||
cr2: cardinal;
|
cr2: cardinal;
|
||||||
end;
|
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