mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-03 05:49:38 +01:00
* don't write (stabs)line info when inlining a procedure
This commit is contained in:
parent
70028e433d
commit
ecb430a8eb
@ -338,8 +338,8 @@ var
|
||||
(cs_gdb_lineinfo in aktglobalswitches) then
|
||||
WriteFileLineInfo(hp.fileinfo);
|
||||
{$endif GDB}
|
||||
|
||||
if do_line then
|
||||
{ no line info for inlined code }
|
||||
if do_line and (inlinelevel=0) then
|
||||
begin
|
||||
{ load infile }
|
||||
if lastfileinfo.fileindex<>hp.fileinfo.fileindex then
|
||||
@ -800,7 +800,10 @@ var
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.10 2002-08-18 22:16:14 florian
|
||||
Revision 1.11 2002-08-20 16:55:38 peter
|
||||
* don't write (stabs)line info when inlining a procedure
|
||||
|
||||
Revision 1.10 2002/08/18 22:16:14 florian
|
||||
+ the ppc gas assembler writer adds now registers aliases
|
||||
to the assembler file
|
||||
|
||||
|
||||
@ -979,13 +979,16 @@ Implementation
|
||||
|
||||
function TInternalAssembler.TreePass1(hp:Tai):Tai;
|
||||
var
|
||||
InlineLevel,
|
||||
i,l : longint;
|
||||
begin
|
||||
inlinelevel:=0;
|
||||
while assigned(hp) do
|
||||
begin
|
||||
{$ifdef GDB}
|
||||
{ write stabs }
|
||||
if ((cs_debuginfo in aktmoduleswitches) or
|
||||
{ write stabs, no line info for inlined code }
|
||||
if (inlinelevel=0) and
|
||||
((cs_debuginfo in aktmoduleswitches) or
|
||||
(cs_gdb_lineinfo in aktglobalswitches)) then
|
||||
begin
|
||||
if (objectalloc.currsec<>sec_none) and
|
||||
@ -1145,6 +1148,11 @@ Implementation
|
||||
ait_cut :
|
||||
if SmartAsm then
|
||||
break;
|
||||
ait_marker :
|
||||
if tai_marker(hp).kind=InlineStart then
|
||||
inc(InlineLevel)
|
||||
else if tai_marker(hp).kind=InlineEnd then
|
||||
dec(InlineLevel);
|
||||
end;
|
||||
hp:=Tai(hp.next);
|
||||
end;
|
||||
@ -1154,17 +1162,20 @@ Implementation
|
||||
|
||||
function TInternalAssembler.TreePass2(hp:Tai):Tai;
|
||||
var
|
||||
InlineLevel,
|
||||
l : longint;
|
||||
{$ifdef i386}
|
||||
co : comp;
|
||||
{$endif i386}
|
||||
begin
|
||||
inlinelevel:=0;
|
||||
{ main loop }
|
||||
while assigned(hp) do
|
||||
begin
|
||||
{$ifdef GDB}
|
||||
{ write stabs }
|
||||
if ((cs_debuginfo in aktmoduleswitches) or
|
||||
{ write stabs, no line info for inlined code }
|
||||
if (inlinelevel=0) and
|
||||
((cs_debuginfo in aktmoduleswitches) or
|
||||
(cs_gdb_lineinfo in aktglobalswitches)) then
|
||||
begin
|
||||
if (objectdata.currsec<>sec_none) and
|
||||
@ -1277,6 +1288,11 @@ Implementation
|
||||
ait_cut :
|
||||
if SmartAsm then
|
||||
break;
|
||||
ait_marker :
|
||||
if tai_marker(hp).kind=InlineStart then
|
||||
inc(InlineLevel)
|
||||
else if tai_marker(hp).kind=InlineEnd then
|
||||
dec(InlineLevel);
|
||||
end;
|
||||
hp:=Tai(hp.next);
|
||||
end;
|
||||
@ -1592,7 +1608,10 @@ Implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.42 2002-08-12 15:08:39 carl
|
||||
Revision 1.43 2002-08-20 16:55:38 peter
|
||||
* don't write (stabs)line info when inlining a procedure
|
||||
|
||||
Revision 1.42 2002/08/12 15:08:39 carl
|
||||
+ stab register indexes for powerpc (moved from gdb to cpubase)
|
||||
+ tprocessor enumeration moved to cpuinfo
|
||||
+ linker in target_info is now a class
|
||||
|
||||
@ -1405,17 +1405,11 @@ implementation
|
||||
inlineexitcode:=TAAsmoutput.Create;
|
||||
ps:=para_size;
|
||||
make_global:=false; { to avoid warning }
|
||||
aktfilepos.line:=0;
|
||||
aktfilepos.column:=0;
|
||||
aktfilepos.fileindex:=0;
|
||||
genentrycode(inlineentrycode,make_global,0,ps,nostackframe,true);
|
||||
if po_assembler in aktprocdef.procoptions then
|
||||
inlineentrycode.insert(Tai_marker.Create(asmblockstart));
|
||||
exprasmList.concatlist(inlineentrycode);
|
||||
secondpass(inlinetree);
|
||||
aktfilepos.line:=0;
|
||||
aktfilepos.column:=0;
|
||||
aktfilepos.fileindex:=0;
|
||||
genexitcode(inlineexitcode,0,false,true);
|
||||
if po_assembler in aktprocdef.procoptions then
|
||||
inlineexitcode.concat(Tai_marker.Create(asmblockend));
|
||||
@ -1475,7 +1469,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.13 2002-08-19 19:36:42 peter
|
||||
Revision 1.14 2002-08-20 16:55:38 peter
|
||||
* don't write (stabs)line info when inlining a procedure
|
||||
|
||||
Revision 1.13 2002/08/19 19:36:42 peter
|
||||
* More fixes for cross unit inlining, all tnodes are now implemented
|
||||
* Moved pocall_internconst to po_internconst because it is not a
|
||||
calling type at all and it conflicted when inlining of these small
|
||||
|
||||
@ -179,13 +179,6 @@ implementation
|
||||
curptree:=@p;
|
||||
p^.usableregs:=usablereg32;
|
||||
{$endif TEMPREGDEBUG}
|
||||
if inlining_procedure then
|
||||
begin
|
||||
aktfilepos.line:=0;
|
||||
aktfilepos.column:=0;
|
||||
aktfilepos.fileindex:=0;
|
||||
end
|
||||
else
|
||||
aktfilepos:=p.fileinfo;
|
||||
aktlocalswitches:=p.localswitches;
|
||||
codegenerror:=false;
|
||||
@ -337,7 +330,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.37 2002-08-19 19:36:44 peter
|
||||
Revision 1.38 2002-08-20 16:55:38 peter
|
||||
* don't write (stabs)line info when inlining a procedure
|
||||
|
||||
Revision 1.37 2002/08/19 19:36:44 peter
|
||||
* More fixes for cross unit inlining, all tnodes are now implemented
|
||||
* Moved pocall_internconst to po_internconst because it is not a
|
||||
calling type at all and it conflicted when inlining of these small
|
||||
|
||||
Loading…
Reference in New Issue
Block a user