mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 10:40:13 +02:00
* finally it works on linux also from the testsuite script
git-svn-id: trunk@11012 -
This commit is contained in:
parent
38df5b4eae
commit
4dfd59a6f8
@ -1,12 +1,13 @@
|
||||
{ %opt=-gl }
|
||||
{ %opt=-gl -O- }
|
||||
{ %needlibrary }
|
||||
{$goto on}
|
||||
|
||||
{ test lineinfo in libraries }
|
||||
{ test lineinfo in libraries, to get always proper results, the optimizer
|
||||
must be turned off with -O- }
|
||||
|
||||
{$ifdef unix}
|
||||
uses
|
||||
dl;
|
||||
dl,sysutils;
|
||||
{$endif unix}
|
||||
|
||||
procedure p(var a : pointer);external 'tlib1a' name 'p';
|
||||
@ -22,6 +23,7 @@ w:
|
||||
{ library }
|
||||
p(a);
|
||||
GetLineInfo(PtrUInt(a),s1,s2,l);
|
||||
s2:=ExtractFilename(s2);
|
||||
writeln({ 'Func: ',s1,'} 'Source: ',s2,' Line: ',l);
|
||||
{ GetLineInfo of dwarf doesn't return the function name }
|
||||
if { (s1<>'P') or } (s2<>'tlib1a.pp') or (l<>9) then
|
||||
@ -29,9 +31,10 @@ w:
|
||||
|
||||
{ main program }
|
||||
GetLineInfo(PtrUInt(@w),s1,s2,l);
|
||||
s2:=ExtractFilename(s2);
|
||||
writeln({ 'Func: ',s1,'} 'Source: ',s2,' Line: ',l);
|
||||
{ GetLineInfo of dwarf doesn't return the function name }
|
||||
if { (s1<>'P') or } (s2<>'tlib1.pp') or (l<>20) then
|
||||
if { (s1<>'P') or } (s2<>'tlib1.pp') or (l<>21) then
|
||||
halt(1);
|
||||
|
||||
writeln('ok');
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %opt=-gl -O- }
|
||||
{ %norun }
|
||||
{ %opt=-gl }
|
||||
{$goto on}
|
||||
library tlib1a;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user