|
@@ -1,4 +1,8 @@
|
|
|
{ %opt=-gl }
|
|
|
+{$goto on}
|
|
|
+
|
|
|
+{ test lineinfo in libraries }
|
|
|
+
|
|
|
{$ifdef unix}
|
|
|
uses
|
|
|
dl;
|
|
@@ -10,11 +14,24 @@ var
|
|
|
s1,s2 : string;
|
|
|
l : longint;
|
|
|
a : pointer;
|
|
|
+label
|
|
|
+ w;
|
|
|
begin
|
|
|
+w:
|
|
|
+ { library }
|
|
|
p(a);
|
|
|
GetLineInfo(PtrUInt(a),s1,s2,l);
|
|
|
- writeln('Func: ',s1,' Source: ',s2,' Line: ',l);
|
|
|
- if (s1<>'P') or (s2<>'tlib1a.pp') or (l<>9) then
|
|
|
+ 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
|
|
|
+ halt(1);
|
|
|
+
|
|
|
+ { main program }
|
|
|
+ GetLineInfo(PtrUInt(@w),s1,s2,l);
|
|
|
+ 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<>19) then
|
|
|
halt(1);
|
|
|
+
|
|
|
writeln('ok');
|
|
|
end.
|