On 24 Aug 2009, at 11:40, Graeme Geldenhuys wrote:
OK, my 64bit FPC does have INTERNAL_BACKTRACE defined, but does NOT
have
FPC_SYSTEM_HAS_GET_FRAME.
So it seems my FPC doesn't have get_frame() function, but yet FPC is
able to compile DUnit2. This is weird and I don't understand how
get_cal
Jonas Maebe wrote:
>>
>> {$IFDEF INTERNAL_BACKTRACE}
>> // nothing
>> {$ELSE}
>> function get_frame:pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
>> {$ENDIF}
>
> Compile with -va and look whether the compiler defines
> INTERNAL_BACKTRACE. Whether or not is irrelevant to the actual
> functional
On 24 Aug 2009, at 11:09, Graeme Geldenhuys wrote:
By the way... Simply adding {$ASMMODE intel} at the top of the unit,
does not solve the problem either. It just moves the compiler message
down a few lines giving the following error.
Oh, so we do support Intel syntax for x86_64 :)
Jonas
_
On 24 Aug 2009, at 11:20, Graeme Geldenhuys wrote:
I found get_frame() function definition and noticed that it is wrapped
in IFDEF as shown below. When is the INTERNAL_BACKTRACE active? I'm
using Core 2 Quad processor with 64bit Ubuntu Linux. Do I fall in the
ELSE part or not?
{$IFDEF INTERNA
Jonas Maebe wrote:
>>
>> Is there an existing function in FPC that does the same as
>> CallerAddr(..), but in a cross platform way?
>
> get_caller_addr(get_frame)
Just what I was looking for. Thank you! :-) It compiles now without
problem, but Lazarus IDE can't seem to resolve the get_frame() fu
Graeme Geldenhuys schreef:
Hi,
I have ported the DUnit2 testing framework from Delphi to FPC. DUnit2
works perfectly under 32bit FPC, but I am getting a compiler error when
trying to compile DUnit2 with 64bit FPC. The error 'Unknown identifier
"EAX"' occurs in the first line of function CallerA
Graeme Geldenhuys wrote:
>
> function CallerAddr: Pointer; assembler;
> const
> CallerIP = $4;
> asm
>mov eax, ebp
>call IsBadPointer
>test eax,eax
>jne @@Error
>
>mov eax, [ebp].CallerIP
>sub eax, 5 // 5 bytes for call
>
>push eax
>call IsBadPoint
On 24 Aug 2009, at 11:02, Graeme Geldenhuys wrote:
I have ported the DUnit2 testing framework from Delphi to FPC. DUnit2
works perfectly under 32bit FPC, but I am getting a compiler error
when
trying to compile DUnit2 with 64bit FPC. The error 'Unknown
identifier
"EAX"' occurs in the firs