diff --git a/compiler/dbgbase.pas b/compiler/dbgbase.pas index 86d43adcae..aee90d1f88 100644 --- a/compiler/dbgbase.pas +++ b/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 diff --git a/compiler/dbgstabs.pas b/compiler/dbgstabs.pas index 5d0586062b..cef5968e8f 100644 --- a/compiler/dbgstabs.pas +++ b/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;