* Reset file name to empty at end of code section

This commit is contained in:
pierre 2000-02-18 12:31:07 +00:00
parent 723d944396
commit b3a9e650f2
2 changed files with 52 additions and 4 deletions

View File

@ -36,6 +36,7 @@ unit ag386att;
procedure WriteAsmList;virtual;
{$ifdef GDB}
procedure WriteFileLineInfo(var fileinfo : tfileposinfo);
procedure WriteFileEndInfo;
{$endif}
end;
@ -333,6 +334,16 @@ unit ag386att;
end;
stabslastfileinfo:=fileinfo;
end;
procedure ti386attasmlist.WriteFileEndInfo;
begin
AsmLn;
AsmWriteLn(ait_section2str(sec_code));
AsmWriteLn(#9'.stabs "",'+tostr(n_sourcefile)+',0,0,Letext');
AsmWriteLn('Letext:');
end;
{$endif GDB}
@ -859,6 +870,7 @@ unit ag386att;
if not UseDeffileForExport and assigned(exportssection) then
Writetree(exportssection);
Writetree(resourcesection);
WriteFileEndInfo;
countlabelref:=true;
AsmLn;
@ -872,7 +884,10 @@ unit ag386att;
end.
{
$Log$
Revision 1.26 2000-02-09 13:22:42 peter
Revision 1.27 2000-02-18 12:31:07 pierre
* Reset file name to empty at end of code section
Revision 1.26 2000/02/09 13:22:42 peter
* log truncated
Revision 1.25 2000/02/07 17:51:20 peter
@ -944,4 +959,4 @@ end.
Revision 1.6 1999/07/29 20:53:56 peter
* write .size also
}
}

View File

@ -64,6 +64,7 @@ unit ag386bin;
procedure emitstabs(s:string);
procedure WriteFileLineInfo(var fileinfo : tfileposinfo);
procedure StartFileLineInfo;
procedure EndFileLineInfo;
{$endif}
function MaybeNextList(var hp:pai):boolean;
function TreePass0(hp:pai):pai;
@ -338,6 +339,23 @@ unit ag386bin;
fileinfo.line:=1;
WriteFileLineInfo(fileinfo);
end;
procedure ti386binasmlist.EndFileLineInfo;
var
hp : pasmsymbol;
begin
objectalloc^.setsection(sec_code);
hp:=newasmsymbol('Letext');
if currpass=1 then
begin
hp^.settyp(AS_LOCAL);
hp^.setaddress(objectalloc^.currsec,objectalloc^.sectionsize,0);
end
else
objectoutput^.writesymbol(hp);
EmitStabs('"",'+tostr(n_sourcefile)+
',0,0,Letext');
end;
{$endif GDB}
@ -744,6 +762,9 @@ unit ag386bin;
hp:=TreePass1(hp);
MaybeNextList(hp);
end;
{$ifdef GDB}
EndFileLineInfo;
{$endif GDB}
{ check for undefined labels }
CheckAsmSymbolListUndefined;
{ set section sizes }
@ -766,6 +787,9 @@ unit ag386bin;
hp:=TreePass2(hp);
MaybeNextList(hp);
end;
{$ifdef GDB}
EndFileLineInfo;
{$endif GDB}
end;
@ -803,6 +827,9 @@ unit ag386bin;
StartFileLineInfo;
{$endif GDB}
TreePass1(hp);
{$ifdef GDB}
EndFileLineInfo;
{$endif GDB}
{ check for undefined labels }
CheckAsmSymbolListUndefined;
{ set section sizes }
@ -855,6 +882,9 @@ unit ag386bin;
if not MaybeNextList(hp) then
break;
{$ifdef GDB}
EndFileLineInfo;
{$endif GDB}
end;
end;
@ -931,7 +961,10 @@ unit ag386bin;
end.
{
$Log$
Revision 1.36 2000-02-09 13:22:43 peter
Revision 1.37 2000-02-18 12:31:07 pierre
* Reset file name to empty at end of code section
Revision 1.36 2000/02/09 13:22:43 peter
* log truncated
Revision 1.35 2000/01/20 00:21:49 pierre
@ -998,4 +1031,4 @@ end.
+ resourcestring implemented
+ start of longstring support
}
}