Forráskód Böngészése

* prevent duplicate symbol errors when compiling code with debug info
on AIX due to the extra inserted local symbols (although in case e.g
multiple procedures contain a typed constant with the same name, only
one can be accessible)
* removed '.' suffix of local symbols inserted for debug info of typed
constants for AIX (gdb couldn't find those symbols; it seems the
address calculated by gdb for typed constants is still not correct
though)

git-svn-id: trunk@20966 -

Jonas Maebe 13 éve
szülő
commit
d7247c9bd9
2 módosított fájl, 6 hozzáadás és 4 törlés
  1. 2 1
      compiler/ncgutil.pas
  2. 4 3
      compiler/ptconst.pas

+ 2 - 1
compiler/ncgutil.pas

@@ -2589,7 +2589,8 @@ implementation
               Moreover, such a local symbol will be removed if it's not
               referenced anywhere, so also create a reference }
             if (target_dbg.id=dbg_stabx) and
-               (cs_debuginfo in current_settings.moduleswitches) then
+               (cs_debuginfo in current_settings.moduleswitches) and
+               not assigned(current_asmdata.GetAsmSymbol(sym.name)) then
               begin
                 list.concat(tai_symbol.Create(current_asmdata.DefineAsmSymbol(sym.name,AB_LOCAL,AT_DATA),0));
                 list.concat(tai_directive.Create(asd_reference,sym.name));

+ 4 - 3
compiler/ptconst.pas

@@ -1560,10 +1560,11 @@ implementation
           begin
             { see same code in ncgutil.insertbssdata }
             if (target_dbg.id=dbg_stabx) and
-               (cs_debuginfo in current_settings.moduleswitches) then
+               (cs_debuginfo in current_settings.moduleswitches) and
+               not assigned(current_asmdata.GetAsmSymbol(sym.name)) then
               begin
-                list.concat(tai_symbol.Create(current_asmdata.DefineAsmSymbol(sym.name+'.',AB_LOCAL,AT_DATA),0));
-                list.concat(tai_directive.Create(asd_reference,sym.name+'.'));
+                list.concat(tai_symbol.Create(current_asmdata.DefineAsmSymbol(sym.name,AB_LOCAL,AT_DATA),0));
+                list.concat(tai_directive.Create(asd_reference,sym.name));
               end;
             list.concat(Tai_symbol.Createname_global(sym.mangledname,AT_DATA,0))
           end