[fpc-devel] BacktraceStrFunc on linux x86_64?

Nikolai Zhubr n-a-zhubr at yandex.ru
Mon May 1 10:13:39 CEST 2017


Hello all,

I'm having some trouble to get BacktraceStrFunc to find line numbers.
This is with fpc 3.0.0 on linux x86_64 (Centos 7 if it matters).
If I compile the following example with

#fpc -gl tt.pas

I only get this output:

Started...
Exception:   $0000000000455540
Done.

Evidently line info is somehow not present here.
Am I doing smth wrong or maybe lineinfo is not yet implemented for x86_64?

Thank you,
Nikolai
==============================================================
program tt; {$mode delphi }

uses SysUtils, Classes;

procedure Test3;
var list: TList;
begin
   list := TList.Create;
   if list[10] = nil then
     writeln('Wow?');
end;

procedure Test2;
begin
   Test3;
end;

procedure Test;
begin
   writeln('Started...');
   try
     Test2;
   except
     writeln('Exception: ', BackTraceStrFunc(ExceptAddr));
   end;
   writeln('Done.');
end;

begin
   Test;
end.



More information about the fpc-devel mailing list