* first shared library link path fixes

* PowerPC64/Linux signal handler now differs between different FP exceptions

git-svn-id: trunk@1452 -
This commit is contained in:
tom_at_work 2005-10-17 21:30:21 +00:00
parent 4176b71277
commit 4db863d076
2 changed files with 13 additions and 15 deletions

View File

@ -193,7 +193,11 @@ begin
{$ifdef x86_64} {$ifdef x86_64}
LibrarySearchPath.AddPath('/lib64;/usr/lib64;/usr/X11R6/lib64',true); LibrarySearchPath.AddPath('/lib64;/usr/lib64;/usr/X11R6/lib64',true);
{$else} {$else}
{$ifdef powerpc64}
LibrarySearchPath.AddPath('/lib64;/usr/lib64;/usr/X11R6/lib64',true);
{$else powerpc64}
LibrarySearchPath.AddPath('/lib;/usr/lib;/usr/X11R6/lib',true); LibrarySearchPath.AddPath('/lib;/usr/lib;/usr/X11R6/lib',true);
{$endif powerpc64}
{$endif x86_64} {$endif x86_64}
end; end;
@ -276,7 +280,7 @@ begin
{$endif powerpc} {$endif powerpc}
{$ifdef powerpc64} {$ifdef powerpc64}
DynamicLinker:='/lib64/ld.so.1'; DynamicLinker:='/lib64/ld64.so.1';
libctype:=glibc2; libctype:=glibc2;
{$endif powerpc64} {$endif powerpc64}

View File

@ -19,7 +19,7 @@
procedure SignalToRunerror(sig : longint; SigInfo: PSigInfo; SigContext: PSigContext);cdecl; procedure SignalToRunerror(sig : longint; SigInfo: PSigInfo; SigContext: PSigContext);cdecl;
var var
res : word; res : word;
fpustate : qword; fpustate : dword;
{$IFDEF EXCDEBUG} {$IFDEF EXCDEBUG}
p : pbyte; p : pbyte;
i, j : integer; i, j : integer;
@ -54,19 +54,18 @@ begin
SIGFPE : SIGFPE :
begin begin
{ ugly typecast to get the FPSCR register contents } { ugly typecast to get the FPSCR register contents }
fpustate := QWord(PQWord(@SigContext^.fp_regs[PT_FPSCR])^); fpustate := DWord(PDWord(@SigContext^.fp_regs[PT_FPSCR])^);
{$IFDEF EXCDEBUG} {$IFDEF EXCDEBUG}
writeln('fpustate = ', hexstr(fpustate, sizeof(fpustate)*2)); writeln('fpustate = ', hexstr(fpustate, sizeof(fpustate)*2));
{$ENDIF} {$ENDIF}
{ distinguish between the different FPU exceptions }
{ TODO: distinguishing FPU signal type does not work as it should
if (fpustate and ppc_fpu_underflow) <> 0 then if (fpustate and ppc_fpu_underflow) <> 0 then
res := 206 res := 206
else if (fpustate and ppc_fpu_overflow) <> 0 then else if (fpustate and ppc_fpu_overflow) <> 0 then
res := 205 res := 205
else if (fpustate and ppc_fpu_divbyzero) <> 0 then else if (fpustate and ppc_fpu_divbyzero) <> 0 then
res := 200 res := 200
else } else
res := 207; res := 207;
end; end;
SIGBUS : SIGBUS :
@ -84,16 +83,11 @@ begin
writeln('sigcontext^...regs = ', hexstr(ptrint(sigcontext^.regs), 16)); writeln('sigcontext^...regs = ', hexstr(ptrint(sigcontext^.regs), 16));
{$ENDIF} {$ENDIF}
// reenable signals { reenable signal }
reenable_signal(sig); reenable_signal(sig);
// give runtime error at the position where the signal was raised, using the { handle error }
// system trampoline if res<>0 then
if res<>0 then begin HandleErrorAddrFrame(res, Pointer(SigContext^.gp_regs[PT_NIP]), Pointer(SigContext^.gp_regs[PT_R1]));
SigContext^.gp_regs[PT_R3] := res;
SigContext^.gp_regs[PT_R4] := SigContext^.gp_regs[PT_NIP];
SigContext^.gp_regs[PT_R5] := SigContext^.gp_regs[PT_R1];
SigContext^.handler := ptruint(@HandleErrorAddrFrame);
end;
end; end;