Pārlūkot izejas kodu

* Some cleanup.

git-svn-id: trunk@13099 -
yury 16 gadi atpakaļ
vecāks
revīzija
16e19aaef3
1 mainītis faili ar 3 papildinājumiem un 6 dzēšanām
  1. 3 6
      compiler/dbgdwarf.pas

+ 3 - 6
compiler/dbgdwarf.pas

@@ -2347,8 +2347,6 @@ implementation
         flist : TFPList;
         flist : TFPList;
       begin
       begin
         { insert DEBUGSTART and DEBUGEND labels }
         { insert DEBUGSTART and DEBUGEND labels }
-        current_module.flags:=current_module.flags or uf_has_dwarf_debuginfo;
-
         new_section(current_asmdata.asmlists[al_start],sec_code,make_mangledname('DEBUGSTART',current_module.localsymtable,''),0,secorder_begin);
         new_section(current_asmdata.asmlists[al_start],sec_code,make_mangledname('DEBUGSTART',current_module.localsymtable,''),0,secorder_begin);
         current_asmdata.asmlists[al_start].concat(tai_symbol.Createname_global(make_mangledname('DEBUGSTART',current_module.localsymtable,''),AT_DATA,0));
         current_asmdata.asmlists[al_start].concat(tai_symbol.Createname_global(make_mangledname('DEBUGSTART',current_module.localsymtable,''),AT_DATA,0));
 
 
@@ -2541,6 +2539,7 @@ implementation
         i : longint;
         i : longint;
         def: tdef;
         def: tdef;
       begin
       begin
+        current_module.flags:=current_module.flags or uf_has_dwarf_debuginfo;
         storefilepos:=current_filepos;
         storefilepos:=current_filepos;
         current_filepos:=current_module.mainfilepos;
         current_filepos:=current_module.mainfilepos;
 
 
@@ -2666,14 +2665,12 @@ implementation
       var
       var
         hp : tmodule;
         hp : tmodule;
       begin
       begin
-        { Reference all DEBUGSTART and DEBUGEND labels from the main .fpc section }
+        { Reference all DEBUGINFO sections from the main .fpc section }
+        { to prevent eliminating them by smartlinking                 }
         if (target_info.system in ([system_powerpc_macos]+systems_darwin)) then
         if (target_info.system in ([system_powerpc_macos]+systems_darwin)) then
           exit;
           exit;
         list.concat(Tai_section.create(sec_fpc,'links',0));
         list.concat(Tai_section.create(sec_fpc,'links',0));
 
 
-        list.concat(Tai_const.Createname(make_mangledname('DEBUGSTART',main_module.localsymtable,''),0));
-        list.concat(Tai_const.Createname(make_mangledname('DEBUGEND',main_module.localsymtable,''),0));
-
         { include reference to all debuginfo sections of used units }
         { include reference to all debuginfo sections of used units }
         hp:=tmodule(loaded_units.first);
         hp:=tmodule(loaded_units.first);
         while assigned(hp) do
         while assigned(hp) do