Browse Source

* check for cache entry before even trying to open the file containing the debug info

git-svn-id: trunk@49086 -
florian 4 years ago
parent
commit
45b3d8e0bf
1 changed files with 3 additions and 3 deletions
  1. 3 3
      rtl/inc/lnfodwrf.pp

+ 3 - 3
rtl/inc/lnfodwrf.pp

@@ -1316,9 +1316,6 @@ begin
   source := '';
   source := '';
   GetLineInfo:=false;
   GetLineInfo:=false;
 
 
-  if not OpenDwarf(codepointer(addr)) then
-    exit;
-
   CacheIndex:=addr mod LineInfoCacheLength;
   CacheIndex:=addr mod LineInfoCacheLength;
 
 
   if LineInfoCache[CacheIndex].addr=addr then
   if LineInfoCache[CacheIndex].addr=addr then
@@ -1330,6 +1327,9 @@ begin
       exit;
       exit;
     end;
     end;
 
 
+  if not OpenDwarf(codepointer(addr)) then
+    exit;
+
 {$ifdef CPUI8086}
 {$ifdef CPUI8086}
   {$if defined(FPC_MM_MEDIUM) or defined(FPC_MM_LARGE) or defined(FPC_MM_HUGE)}
   {$if defined(FPC_MM_MEDIUM) or defined(FPC_MM_LARGE) or defined(FPC_MM_HUGE)}
     segment := (addr shr 16) - e.processsegment;
     segment := (addr shr 16) - e.processsegment;