From 3a9f8e88fd69ed73be0092ccd6b9eaf2bdb635d8 Mon Sep 17 00:00:00 2001 From: svenbarth Date: Fri, 26 Aug 2016 15:09:24 +0000 Subject: [PATCH] * don't write or reference debug information for a unit if it belongs to a/another package git-svn-id: trunk@34382 - --- compiler/dbgbase.pas | 2 +- compiler/dbgdwarf.pas | 2 +- compiler/dbgstabs.pas | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/dbgbase.pas b/compiler/dbgbase.pas index c1182fc972..eaf0786461 100644 --- a/compiler/dbgbase.pas +++ b/compiler/dbgbase.pas @@ -589,7 +589,7 @@ implementation pu:=tused_unit(hp.used_units.first); while assigned(pu) do begin - if not pu.u.is_dbginfo_written then + if not pu.u.is_dbginfo_written and not assigned(pu.u.package) then begin { prevent infinte loop for circular dependencies } pu.u.is_dbginfo_written:=true; diff --git a/compiler/dbgdwarf.pas b/compiler/dbgdwarf.pas index a16ea93bad..575c5750d2 100644 --- a/compiler/dbgdwarf.pas +++ b/compiler/dbgdwarf.pas @@ -3368,7 +3368,7 @@ implementation hp:=tmodule(loaded_units.first); while assigned(hp) do begin - If (hp.flags and uf_has_dwarf_debuginfo)=uf_has_dwarf_debuginfo then + If ((hp.flags and uf_has_dwarf_debuginfo)=uf_has_dwarf_debuginfo) and not assigned(hp.package) then begin list.concat(Tai_const.Createname(make_mangledname('DEBUGSTART',hp.localsymtable,''),0)); list.concat(Tai_const.Createname(make_mangledname('DEBUGEND',hp.localsymtable,''),0)); diff --git a/compiler/dbgstabs.pas b/compiler/dbgstabs.pas index 142e9bac82..28c14b1f2a 100644 --- a/compiler/dbgstabs.pas +++ b/compiler/dbgstabs.pas @@ -1854,7 +1854,7 @@ implementation hp:=tmodule(loaded_units.first); while assigned(hp) do begin - If (hp.flags and uf_has_stabs_debuginfo)=uf_has_stabs_debuginfo then + If ((hp.flags and uf_has_stabs_debuginfo)=uf_has_stabs_debuginfo) and not assigned(hp.package) then begin list.concat(Tai_const.Createname(make_mangledname('DEBUGINFO',hp.localsymtable,''),0)); list.concat(Tai_const.Createname(make_mangledname('DEBUGSTART',hp.localsymtable,''),0));