summaryrefslogtreecommitdiff
path: root/packages/gdbint
diff options
context:
space:
mode:
authorpierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-11-08 15:37:09 +0000
committerpierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-11-08 15:37:09 +0000
commitc4c4e3ebce361be43cdfbc97d635a3f1d7db4dc0 (patch)
treef097b38d8dbaf52dcd4f69c0ef20ce30afa4e6ea /packages/gdbint
parentbd59dc4115253c1884ea5aab0889ad5c106fb789 (diff)
downloadfpc-c4c4e3ebce361be43cdfbc97d635a3f1d7db4dc0.tar.gz
* Try to compile with mingw64 gdb
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16314 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/gdbint')
-rw-r--r--packages/gdbint/examples/mingw.pas12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/gdbint/examples/mingw.pas b/packages/gdbint/examples/mingw.pas
index 626ec3b785..ada610cc13 100644
--- a/packages/gdbint/examples/mingw.pas
+++ b/packages/gdbint/examples/mingw.pas
@@ -35,15 +35,25 @@ uses gdbint; // force dependancies that hopefully make it execute at the right m
Type
TAtexitFunction = function(p:TCFUnction):longint cdecl;
+{$ifdef win64}
+var __imp_atexit : TAtExitFunction; Cvar; external; // "true" atexit in mingw libs.
+{$else not win64}
var _imp__atexit : TAtExitFunction; Cvar; external; // "true" atexit in mingw libs.
+{$endif not win64}
function atexit(p:TCFunction):longint;cdecl; [public, alias : '_atexit'];
begin
+{$ifdef win64}
+ atexit:=__imp_atexit(p); // simply route to "true" atexit
+{$else not win64}
atexit:=_imp__atexit(p); // simply route to "true" atexit
+{$endif not win64}
end;
+{$ifdef win32}
procedure __cpu_features_init; cdecl; external;
+{$endif win32}
procedure _pei386_runtime_relocator; cdecl; external;
procedure __main; cdecl;external;
@@ -52,7 +62,9 @@ procedure doinit;
begin
// not (yet) done: set mingw exception handlers:
// SetUnhandledExceptionFilter (_gnu_exception_handler);
+{$ifdef win32}
__cpu_features_init; // load CPU features. Might be useful for debugger :-)
+{$endif win32}
// fpreset; // don't do this, we init our own fp mask