Browse Source

* fixed getting the FPC_BREAK_ERROR parameters on i386

git-svn-id: trunk@29803 -
nickysn 10 years ago
parent
commit
3b55dd919d
1 changed files with 6 additions and 2 deletions
  1. 6 2
      ide/fpdebug.pas

+ 6 - 2
ide/fpdebug.pas

@@ -1311,8 +1311,12 @@ const
 begin
 begin
   // Procedure HandleErrorAddrFrame (Errno : longint;addr : CodePointer; frame : Pointer);
   // Procedure HandleErrorAddrFrame (Errno : longint;addr : CodePointer; frame : Pointer);
   //  [public,alias:'FPC_BREAK_ERROR']; {$ifdef cpui386} register; {$endif}
   //  [public,alias:'FPC_BREAK_ERROR']; {$ifdef cpui386} register; {$endif}
-  {TODO: handle archs with register calling conventions}
-{$if defined(x86_64)}
+{$if defined(i386)}
+  GetFPCBreakErrorParameters :=
+    GetIntRegister('eax', ExitCode) and
+    GetIntRegister('edx', ExitAddr) and
+    GetIntRegister('ecx', ExitFrame);
+{$elseif defined(x86_64)}
   {$ifdef Win64}
   {$ifdef Win64}
     GetFPCBreakErrorParameters :=
     GetFPCBreakErrorParameters :=
       GetIntRegister('rcx', ExitCode) and
       GetIntRegister('rcx', ExitCode) and