From e541f19ef59617ecfc5ac253797bceba92b8029a Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Thu, 25 Jan 2007 17:07:26 +0000 Subject: [PATCH] * fixed debug info generation for static symbols + IE in case it cannot be generated (rather than an undefined function result) git-svn-id: trunk@6187 - --- compiler/symsym.pas | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/compiler/symsym.pas b/compiler/symsym.pas index 03350d0380..68d851a305 100644 --- a/compiler/symsym.pas +++ b/compiler/symsym.pas @@ -1132,13 +1132,19 @@ implementation function tfieldvarsym.mangledname:string; var srsym : tsym; - srsymtable : TSymtable; + srsymtable : tsymtable; begin if sp_static in symoptions then begin - searchsym(lower(owner.name^)+'_'+name,srsym,srsymtable); - if assigned(srsym) then - result:=srsym.mangledname; + if searchsym(lower(owner.name^)+'_'+name,srsym,srsymtable) then + result:=srsym.mangledname + { when generating the debug info for the module in which the } + { symbol is defined, the localsymtable of that module is } + { already popped from the symtablestack } + else if searchsym_in_module(current_module,lower(owner.name^)+'_'+name,srsym,srsymtable) then + result:=srsym.mangledname + else + internalerror(2007012501); end else result:=inherited mangledname;