Browse Source

--- Merging r33038 into '.':
U rtl/inc/heaptrc.pp
--- Recording mergeinfo for merge of r33038 into '.':
U .
--- Merging r35886 into '.':
U rtl/inc/exeinfo.pp
--- Recording mergeinfo for merge of r35886 into '.':
G .

# revisions: 33038,35886

git-svn-id: branches/fixes_3_0@36046 -

marco 8 years ago
parent
commit
f10fc20a8c
2 changed files with 4 additions and 6 deletions
  1. 0 2
      rtl/inc/exeinfo.pp
  2. 4 4
      rtl/inc/heaptrc.pp

+ 0 - 2
rtl/inc/exeinfo.pp

@@ -23,8 +23,6 @@
 
 
 {$checkpointer off}
 {$checkpointer off}
 
 
-{$mode objfpc}
-
 unit exeinfo;
 unit exeinfo;
 interface
 interface
 
 

+ 4 - 4
rtl/inc/heaptrc.pp

@@ -86,7 +86,7 @@ const
   printleakedblock: boolean = false;
   printleakedblock: boolean = false;
   printfaultyblock: boolean = false;
   printfaultyblock: boolean = false;
   maxprintedblocklength: integer = 128;
   maxprintedblocklength: integer = 128;
-  
+
   GlobalSkipIfNoLeaks : Boolean = False;
   GlobalSkipIfNoLeaks : Boolean = False;
 
 
 implementation
 implementation
@@ -513,7 +513,7 @@ begin
   { clear the memory }
   { clear the memory }
   fillchar(p^,size,#255);
   fillchar(p^,size,#255);
   { retrieve backtrace info }
   { retrieve backtrace info }
-  CaptureBacktrace(1,tracesize-1,@pp^.calls[1]);
+  CaptureBacktrace(1,tracesize,@pp^.calls[1]);
 
 
   { insert in the linked list }
   { insert in the linked list }
   if loc_info^.heap_mem_root<>nil then
   if loc_info^.heap_mem_root<>nil then
@@ -869,7 +869,7 @@ begin
   inc(loc_info^.getmem_size,size);
   inc(loc_info^.getmem_size,size);
   inc(loc_info^.getmem8_size,(size+7) and not 7);
   inc(loc_info^.getmem8_size,(size+7) and not 7);
   { generate new backtrace }
   { generate new backtrace }
-  CaptureBacktrace(1,tracesize-1,@pp^.calls[1]);
+  CaptureBacktrace(1,tracesize,@pp^.calls[1]);
   { regenerate signature }
   { regenerate signature }
   if usecrc then
   if usecrc then
     pp^.sig:=calculate_sig(pp);
     pp^.sig:=calculate_sig(pp);
@@ -1129,7 +1129,7 @@ begin
   else
   else
     ptext:=textoutput;
     ptext:=textoutput;
   pp:=loc_info^.heap_mem_root;
   pp:=loc_info^.heap_mem_root;
-  if ((loc_info^.getmem_size-loc_info^.freemem_size)=0) and SkipIfNoLeaks then 
+  if ((loc_info^.getmem_size-loc_info^.freemem_size)=0) and SkipIfNoLeaks then
     exit;
     exit;
   Writeln(ptext^,'Heap dump by heaptrc unit');
   Writeln(ptext^,'Heap dump by heaptrc unit');
   Writeln(ptext^,loc_info^.getmem_cnt, ' memory blocks allocated : ',
   Writeln(ptext^,loc_info^.getmem_cnt, ' memory blocks allocated : ',