瀏覽代碼

Try to avoid problems with generic types for stabs/stabx

git-svn-id: trunk@27635 -
pierre 11 年之前
父節點
當前提交
356ea656e4
共有 2 個文件被更改,包括 7 次插入1 次删除
  1. 5 1
      compiler/dbgbase.pas
  2. 2 0
      compiler/dbgstabs.pas

+ 5 - 1
compiler/dbgbase.pas

@@ -527,7 +527,11 @@ implementation
           begin
             sym:=tsym(st.SymList[i]);
             if (sym.visibility<>vis_hidden) and
-               (not sym.isdbgwritten) then
+               (not sym.isdbgwritten) and
+               { avoid all generic symbols }
+               not (sp_generic_dummy in sym.symoptions) and
+               not ((sym.typ=typesym) and assigned(ttypesym(sym).typedef) and
+                    (df_generic in ttypesym(sym).typedef.defoptions)) then
               appendsym(list,sym);
           end;
         case st.symtabletype of

+ 2 - 0
compiler/dbgstabs.pas

@@ -187,6 +187,8 @@ implementation
         result := Sym.Name
       else
         result := Sym.RealName;
+      if (Sym.typ=typesym) and (ttypesym(Sym).Fprettyname<>'') then
+        result:=ttypesym(Sym).FPrettyName;
       if target_asm.dollarsign<>'$' then
         result:=ReplaceForbiddenAsmSymbolChars(result);
     end;