mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 06:59:24 +02:00
Third field of SignalToRunError must be PUContext type
git-svn-id: trunk@21842 -
This commit is contained in:
parent
92b4c84dae
commit
b0fcb8cb2f
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
**********************************************************************}
|
**********************************************************************}
|
||||||
|
|
||||||
procedure SignalToRunerror(sig : longint; SigInfo: PSigInfo; SigContext: PSigContext);cdecl;
|
procedure SignalToRunerror(sig : longint; SigInfo: PSigInfo; UContext: PUContext);cdecl;
|
||||||
var
|
var
|
||||||
res : word;
|
res : word;
|
||||||
addr : pointer;
|
addr : pointer;
|
||||||
@ -59,10 +59,10 @@ begin
|
|||||||
{ 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
|
||||||
begin
|
begin
|
||||||
if assigned(SigContext) then
|
if assigned(UContext) then
|
||||||
begin
|
begin
|
||||||
frame:=pointer(ptruint(SigContext^.sigc_regs[29])); { stack pointer }
|
frame:=pointer(ptruint(UContext^.uc_mcontext.sigc_regs[29])); { stack pointer }
|
||||||
addr:=pointer(ptruint(SigContext^.sigc_pc)); { program counter }
|
addr:=pointer(ptruint(UContext^.uc_mcontext.sigc_pc)); { program counter }
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
@ -45,14 +45,31 @@ struct sigcontext {
|
|||||||
unsigned long sc_lo2;
|
unsigned long sc_lo2;
|
||||||
unsigned long sc_hi3;
|
unsigned long sc_hi3;
|
||||||
unsigned long sc_lo3;
|
unsigned long sc_lo3;
|
||||||
}; *)
|
};
|
||||||
|
typedef struct ucontext
|
||||||
|
{
|
||||||
|
unsigned long int uc_flags;
|
||||||
|
struct ucontext *uc_link;
|
||||||
|
stack_t uc_stack;
|
||||||
|
mcontext_t uc_mcontext;
|
||||||
|
__sigset_t uc_sigmask;
|
||||||
|
} ucontext_t;
|
||||||
|
|
||||||
|
*)
|
||||||
|
FPReg = record
|
||||||
|
case byte of
|
||||||
|
0 : (fp_dreg : double;);
|
||||||
|
1 : (fp_reg : single;
|
||||||
|
fp_pad : cint; );
|
||||||
|
end;
|
||||||
|
|
||||||
PSigContext = ^TSigContext;
|
PSigContext = ^TSigContext;
|
||||||
TSigContext = record
|
TSigContext = record
|
||||||
sigc_regmask,
|
sigc_regmask,
|
||||||
sigc_status: cuint;
|
sigc_status: cuint;
|
||||||
sigc_pc : culonglong;
|
sigc_pc : culonglong;
|
||||||
sigc_regs : array[0..31] of culonglong;
|
sigc_regs : array[0..31] of culonglong;
|
||||||
sigc_fpregs : array[0..31] of culonglong;
|
sigc_fpregs : array[0..31] of fpreg;
|
||||||
sigc_fpc_csr, sigc_fpc_eir : cuint;
|
sigc_fpc_csr, sigc_fpc_eir : cuint;
|
||||||
sigc_used_math : cuint;
|
sigc_used_math : cuint;
|
||||||
sigc_dsp : cuint;
|
sigc_dsp : cuint;
|
||||||
@ -62,3 +79,18 @@ struct sigcontext {
|
|||||||
sigc_hi3,sigc_lo3 : culong;
|
sigc_hi3,sigc_lo3 : culong;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TStack = record
|
||||||
|
ss_sp : pointer;
|
||||||
|
ss_size : size_t;
|
||||||
|
ss_flags : cint;
|
||||||
|
end;
|
||||||
|
|
||||||
|
PUContext = ^TUContext;
|
||||||
|
TUContext = record
|
||||||
|
uc_flags : culong;
|
||||||
|
uc_link : PUContext;
|
||||||
|
uc_stack : TStack;
|
||||||
|
uc_mcontext : TSigContext;
|
||||||
|
uc_sigmask : TSigSet;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user